The previous fix (brave/brave-core#35600) used
brave_origin::IsBraveOriginPurchased() which calls
PrefService::GetBoolean() directly. This crashed because the ads code
calls UserHasOptedInToSurveyPanelist() from a DB worker thread via
Mojo, violating PrefService's UI-thread sequence check.
Instead, gate Survey Panelist on the BraveRewardsDisabled admin policy
pref (kDisabledByPolicy). Origin builds set this policy so the effect
is the same, but the pref access in the ads internal code goes through
GetProfileBooleanPref() → Mojo IPC, which is thread-safe.
Resolves https://github.com/brave/brave-browser/issues/54584
Resolves https://github.com/brave/brave-browser/issues/54718
These files in build/chromium/resources/ targeted the same destination
as the explicit per-branding product_logo_16.png copy added in #35566,
causing branding.js to re-copy and overwrite the destination on every
run. Removing them so a single source writes favicon_product.png.
* Hide Survey Panelist in settings for Origin builds
Resolvesbrave/brave-browser#54584
* Also handle Brave Origin upgrade case for Survey Panelist
Extend the Origin check to `IsBraveOriginPurchased()` so users who
upgrade a regular build to Brave Origin also see the Survey Panelist
row hidden, and force the backend opt-in check and the virtual pref
`[virtual]:is_survey_panelist` to `false` on Origin so the feature
does not remain active (90-day ad event retention, ads targeting) for
users who previously opted in.
The reset to defaults row on chrome://settings/origin is an action
button, not a link to another page, so the trailing chevron was
misleading. Hide it via the cr-link-row icon part.
Hide Switch to Brave Search banners for Brave Origin
Suppress the omnibox and NTP Brave Search conversion banners on
is_brave_origin_branded=true builds, and on non-branded builds when
Brave Origin has been purchased.
* Fix cookies page settings override after upstream 3PCD cleanup
Chromium removed the dom-if template with
`is3pcdRedesignEnabled_` as part of the 3PCD experiment cleanup.
The #generalControls element still exists but is no longer wrapped
in a conditional template, so find it directly on templateContent
like the other elements.
* Fix settings search crash in site settings page
The getAssociatedControlFor override was using querySelector on the
page's shadow root, but list item link rows (e.g. #autoplay, #ethereum)
are rendered inside settings-site-settings-list shadow DOMs. The
querySelector couldn't find them, falling through to the base mixin's
assertNotReached().
Search through the list components' shadow DOMs instead.
Fix chrome://version favicon race showing wrong icon on Origin builds
The version page favicon (IDR_PRODUCT_FAVICON) was always the standard
Brave icon regardless of Origin branding. On Origin builds this caused
the wrong icon to appear in the tab and omnibox.
Fix by copying the branding-specific product_logo_16.png as
favicon_product.png via branding.js based on isBraveOriginBranded —
the same pattern used for product_logo.png and product_logo_white.png.
The kPdfInfoBar feature (enabled by default in Chromium) prompts users
to set Chrome as the default PDF viewer. Brave should not show this
Chrome-specific upsell.
* Hide Origin settings page in branded Origin builds
In is_brave_origin_branded builds, the browser itself is the Origin
product, so the Origin settings page is redundant and should not appear
in the settings menu or search results.
* Guard Leo settings page insertion with enable_ai_chat
The Leo page import was already wrapped in // <if expr="enable_ai_chat">
but the template insertion into the view manager was not. When
enable_ai_chat is off, the element class is never registered, but the
page visibility Proxy defaults missing properties to true, so the
element gets stamped as an unregistered HTMLElement with no
searchContents method, crashing the entire settings search.
Add Linux free tier proceed option to Origin settings page
Add chrome://flags entry for Brave Origin, enable the feature flag
by default on all platforms (including Linux), and add a "Proceed
with Origin for free on Linux" button to the settings onboarding
page. The proceed functionality is compile-time gated to Linux only.
* Open Origin settings page on first purchase detection
- Add Delegate interface to BraveOriginService for browser-layer actions
- Watch skus::prefs::kSkusState changes to re-check purchase state
when credentials update (e.g. after purchasing on account.brave.com)
- On first purchase detection, open brave://settings/origin via the
delegate so the user can configure Origin policies
- Add BraveOriginNavigationDelegate (browser layer) implementing the
delegate using chrome::ShowSettingsSubPageForProfile
- Move navigation impl to its own source_set to avoid adding sources
directly to browser/ui/BUILD.gn
- Add unit tests for delegate, one-shot behavior, and pref-triggered
recheck
* Address review feedback on PR #35460
- Move Delegate from SetDelegate() setter to constructor parameter
per ARCH-025 (constructor injection over setter methods)
- Add //chrome/browser/ui dep in browser/ui/brave_origin/BUILD.gn
for chrome_pages.h include per BS-012
- Move //brave/components/brave_origin to public_deps in
browser/brave_origin/BUILD.gn since the header exposes it per BS-024
* Guard brave_origin UI dep on !is_android
chrome::ShowSettingsSubPageForProfile is only compiled for desktop
(chrome_pages.cc is in the !is_android sources block). Move the
//brave/browser/ui/brave_origin dep and its allow_circular_includes_from
entry behind !is_android to fix the Android linker error.
* Address remaining review feedback on PR #35460
- Move SkusServiceGetter into Delegate::GetSkusService() so the
component layer no longer depends on the browser-layer SKU factory
- Track first-purchase settings open with a boolean instead of
resetting the delegate; delegate is only dropped in Shutdown()
- Change BraveOriginNavigationDelegate to use raw_ref<Profile>
- Add TODO comment in config.gni for the circular dependency
- Add //brave/browser/skus dep to browser/ui/brave_origin BUILD.gn
* Fix Android linker error for ShowSettingsSubPageForProfile
chrome::ShowSettingsSubPageForProfile is not available on Android.
Guard the call and its include with #if !BUILDFLAG(IS_ANDROID),
matching the pattern used in ai_chat and other Brave features.
* Register kOriginFreeTierAccepted pref in settings handler unit tests on Linux
The three test fixtures in this file manually register prefs but were
missing kOriginFreeTierAccepted, which is registered in production code
via RegisterLocalStatePrefs and read during BraveOriginService
construction on Linux. This caused a CHECK failure on Linux:
"Trying to access an unregistered pref: brave.origin.free_tier_accepted"
* Fix linker errors for BraveOriginNavigationDelegate on Android/tests and iOS constructor mismatch
The brave_origin_navigation.cc implementation was only compiled for
desktop (!is_android) but the factory references it on all platforms.
Move the dep outside the platform guard so it links on Android too, and
add it to the unit_tests target. For iOS, create a BraveOriginDelegateIOS
that wraps the SKU service getter to match the new Delegate-based
constructor signature.
* Fix default browser detection for Origin branded builds
The upstream IsAnotherChromeChannel() on macOS compares only the first
3 bundle ID components, causing Brave Origin (com.brave.Browser.origin)
to incorrectly match regular Brave (com.brave.Browser) as "another
channel". This made Origin think it was already the default when regular
Brave was, suppressing the default browser infobar.
On Linux, the check searched for "brave-browser" in xdg-settings output
regardless of brand, so Origin builds matched regular Brave desktop
files as "another channel" too.
* Guard IsRegularBraveBundleId with buildflag to fix unused function error
Wraps IsRegularBraveBundleId in #if !BUILDFLAG(IS_BRAVE_ORIGIN_BRANDED)
since it is only called in the non-Origin branch of IsAnotherBraveChannel,
fixing -Werror,-Wunused-function on Origin-branded macOS builds.
Fix two errors triggered when typing in settings search:
- Add null check in isPrefManaged_ and move <if expr> to wrap
the dom-if template so web_discovery_enabled binding doesn't
evaluate when web discovery is disabled at build time.
- Add searchContents to settings-brave-origin-page so settings
search can enumerate it without throwing.
* [Brave Origin] Set window icon on startup dialog
The BraveOriginStartupView did not override any WidgetDelegate icon
methods, causing incorrect icons in taskbars/menus on Linux and macOS.
Override GetWindowAppIcon(), GetWindowIcon(), and ShouldShowWindowIcon()
to return the branded product logo (IDR_PRODUCT_LOGO_128).
* Add chrome_unscaled_resources GN dependency for window icon
* Show restart banner on Brave Origin settings page when dirty
Adds a restart notification bar to the Brave Origin settings page
that appears when policy values have changed since browser startup
or when a first purchase is detected mid-session.
Backend: BraveOriginService snapshots policy values at construction
and exposes NeedsRestart() via a new Mojo GetNeedsRestart() method.
A new kOriginPoliciesWereEnforced pref persists enforcement state
across sessions to reliably detect first-purchase vs existing.
Frontend: Uses Chromium's RelaunchMixin for proper restart handling,
shows a fixed-bottom banner with an Origin-specific message, and
re-checks restart state after every toggle or reset.
* Remove redundant in-class initializer for startup_was_enforcing_
The constructor always sets this from the pref, so the default is
never used.
* Fix rebase: register both kOriginPurchaseValidated and kOriginPoliciesWereEnforced
The rebase conflict resolution incorrectly replaced kOriginPurchaseValidated
with kOriginPoliciesWereEnforced, but these are separate prefs.
SetPurchased() still writes kOriginPurchaseValidated, so both must be
registered in test SetUp.
In V1 mode, Brave's custom SidePanel class replaces upstream's globally
via chromium_src. This means the toolbar_height_side_panel_ (an upstream
feature) gets Brave's GetMinimumSize() returning kDefaultSidePanelWidth
(400) instead of upstream's kSidePanelDefaultContentWidth (360).
Upstream's CalculateHorizontalLayout checks whether the toolbar-height
side panel fits beside the toolbar: remainder = window_width -
toolbar_min - padding. The test sets window_width = toolbar_min + 400,
giving remainder ~392. With upstream's min of 360, 392 >= 360 passes
and the panel is clamped correctly. With Brave's 400, 392 < 400 forces
the panel into content-height mode where it gets full width unclamped.
On normal Brave builds this was masked: when the sidebar is visible, its
minimum width contribution to the browser's overall GetMinimumSize()
prevents the window from being sized small enough to trigger the issue.
PR #35233 set kShowNever for Origin builds, removing that sidebar
contribution and exposing the incompatible minimum width.
Fix by making GetMinimumSize() type-aware: toolbar-height panels use the
upstream-compatible minimum (360), content-height panels (inside the
sidebar) keep kDefaultSidePanelWidth (400).
Resolvesbrave/brave-browser#54206
* Block brave://wallet WebUI on desktop when disabled by policy
Previously, the wallet WebUI on desktop relied solely on
WalletPageUIConfig::IsWebUIEnabled() to prevent loading when wallet is
disabled by policy (e.g. via Brave Origin). Unlike brave://rewards which
has a second check in GetWebUIType(), wallet lacked this, allowing the
page to load and fail with "Mojo is not defined".
Add an IsAllowedForContext check in GetWebUIType() for wallet page and
panel hosts on desktop, matching the rewards blocking pattern.
* Format: fix line wrapping in wallet WebUI block
* Block wallet WebUI when BraveOrigin feature is enabled
The previous IsAllowedForContext check only blocked wallet when the
managed pref was set by admin policy. BraveOrigin policies are only
loaded after purchase verification, so enabling BraveOrigin via feature
flag without purchase left wallet accessible.
Add IsBraveOriginFeatureEnabled() check to GetWebUIType(),
WalletPageUIConfig::IsWebUIEnabled, and
WalletPanelUIConfig::IsWebUIEnabled to block wallet WebUI in all
BraveOrigin configurations.
* Use persisted purchase pref for IsPurchased check
BraveOriginPolicyManager::IsPurchased() only returned true after the
async SKU credential check completed. On startup, this meant policies
weren't applied yet when wallet WebUI tried to load.
Fall back to the kOriginPurchaseValidated local state pref so policies
are applied immediately on startup. Remove BraveOrigin-specific checks
from wallet code — the admin policy pref check is sufficient.
GetDesktopName() hardcoded brave-browser-*.desktop for all builds,
ignoring the IS_BRAVE_ORIGIN_BRANDED buildflag. This caused the
running binary to report a different .desktop name than the one
installed by the package (brave-origin-*.desktop), making the window
manager group Brave Origin windows with regular Brave in the taskbar.
The Origin settings page was showing for both branded builds
(is_brave_origin_branded=true) and upgrade purchases. It should
only show when the user has purchased the Origin upgrade.
* Add Web Discovery build flag
* Remove obsolete kDontAskEnableWebDiscovery pref
This legacy pref was only being registered and immediately cleared
during migration. Remove it entirely.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add disable-model-invocation: true to all skills
Skills are always loaded at session start, consuming context tokens
even when not invoked. Setting disable-model-invocation: true makes
them lazy-loaded, only entering context when explicitly invoked via
slash command.
* Clarify best practice applicability and reduce upstream hallucinations
- ARCH-020: Clarify rule applies to bypassing access control, not
normal inheritance patterns (calling protected methods from subclasses)
- ARCH-062: Clarify CUJ test requirement applies to UI features, not
backend services or infrastructure
- Review rules: Add explicit instruction to verify upstream code claims
by reading actual files rather than relying on training data
* Update ARCH-020 friend class example to modern #define pattern
Replace outdated BRAVE_CLASS_NAME_H guidance with the current
chromium_src #define approach for adding friend declarations.
* Fix upgrade case to show purchase UI in System settings
* Guard NTP and rewards BindInterface against null services
When admin or BraveOrigin policies disable rewards or AI chat,
the service factories return null. The NTP was CHECKing these
non-null and crashing on startup. Guard all affected
BindInterface methods with null checks. Also always register
wallet mojo binders so the renderer is not killed when wallet
is disabled by policy.
* Hide NTP Leo chat input when AI chat is disabled by policy
* Refresh sidebar items when policy prefs change
When BraveOrigin policies disable features like AI chat, wallet,
or Brave Talk, the sidebar needs to remove the corresponding
built-in items. Watch the relevant policy prefs and re-evaluate
built-in item visibility when they change.
brave_exe.rc hardcoded theme\brave\win\ icon paths for all builds.
Use a BRAVE_ICON macro that switches between theme\brave\win and
theme\brave_origin\win based on IS_BRAVE_ORIGIN_BRANDED define.
Clarify that CSA-053 only applies to temporary workarounds, not
permanent design decisions. Comments explaining why an alternative
API was not used due to a known limitation do not need TODO tracking
issues when the current code is the intended long-term solution.
The wiki content was moved into the docs folder, so the external
link to brave-browser/wiki/Patching-Chromium#making-methods-virtual
now just redirects. Use a local anchor instead.
* Use origin-branded names for Linux packages and dist artifacts
When is_brave_origin_branded=true, use brave-origin instead of
brave-browser for DEB/RPM package names and brave-origin instead
of brave for Linux symbols zip filenames.
- Add brave-origin/chromium-browser.info and appdata.xml.template
- Add brave_dist_name and brave_linux_package_name to config.gni
- Use brave_linux_package_name in Linux installer patch
- Conditionally select branding directory in sources.gni
* Use origin-branded dist name for all platform artifacts
Use brave_dist_name for dist zips, symbols, and native symbols
on all platforms. For origin builds this renames artifacts from
brave-v* to brave-origin-v* on Windows, Mac, and Android.
* Update chromium_src/chrome/installer/linux/common/brave-origin/appdata.xml.template
Co-authored-by: Francois Marier <francois@brave.com>
* Apply suggestion from @fmarier
Co-authored-by: Francois Marier <francois@brave.com>
* Use separate install dirs for origin to allow coexistence
Use /opt/brave.com/brave-origin and /etc/brave-origin for origin
builds so that regular Brave and Brave Origin can be installed
side by side on the same machine.
* Use origin screenshot URL in appdata template
* Match project_license with brave-browser appdata template
* Use distinct PROGNAME for origin to avoid conflicts with brave-browser
* Use brave-origin as binary name on Linux for origin builds
* Revert brave_exe and PROGNAME changes for origin
PROGNAME must match the actual binary name (brave) since the
wrapper script uses it to exec the binary. Coexistence between
brave-browser and brave-origin is handled by distinct PACKAGE,
INSTALLDIR, and ENROLLMENTDIR values, not the binary name.
---------
Co-authored-by: Francois Marier <francois@brave.com>
* Fix Origin branding strings showing "Brave Nightly" on Windows
The brave_origin_strings.grd file had identical strings to
brave_strings.grd, causing Origin builds to display "Brave Nightly"
instead of "Brave Origin Nightly" on Windows. Update all user-facing
product name strings to use "Brave Origin" branding across Windows
shortcut names, accessible window titles, Start Menu folders, firewall
rules, and Mac helper names.
* Generate Origin branding via chromium-rebase-l10n.py
Update the python rebase script to apply "Brave Origin" branding
to brave_origin_strings.grd after it is copied from brave_strings.grd,
so the changes survive future l10n rebases.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Only apply Origin branding to non-translatable strings
Remove translatable strings from the Origin branding list to avoid
breaking XTB fingerprint matching. Only strings with
translateable="false" or with their translateable attribute stripped
by the brave_strings processing are modified.
* Also update XTB fingerprints for Origin-branded strings
Apply Origin branding to all user-visible strings (not just
translateable=false) and update XTB files with new fingerprints
and "Brave Origin" text in translations.
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Clarify that network auditor entries are only needed for
endpoints that do not require user opt-in. Add new best
practice (BS-056) requiring all new Brave endpoints be
added to the HSTS pin list.
* Copy review-prs skill and dependencies from brave-dev-bot
Raw copy of the review-prs skill files and their dependency scripts
(check-can-approve, resolve-bot-threads, extract-pr-images, load_config)
from brave-dev-bot. Paths still reference the bot directory structure
and will be fixed in the next commit.
* Fix paths for review-prs skill in brave-core repo
- Replace load_config with hardcoded brave-core config values
- Update all _BOT_DIR references to _REPO_DIR (brave repo root)
- Point best practices docs to docs/best-practices/ in repo
- Point manage-bp-ids.py to script/manage-bp-ids.py in repo
- Move dependency script paths to .claude/skills/review-prs/scripts/
- Store cache files under .claude/.ignore/ instead of bot .ignore/
- Remove Signal notification support (bot-specific)
- Update SKILL.md to use SKILL_DIR instead of BOT_DIR
* [review-prs] Add date context, rule links, and batch dedup
- Include current UTC date in subagent prompts to prevent false
copyright year flags
- Embed rule_link as clickable markdown in posted comments
- Deduplicate cross-chunk violations before prioritization
* Add nosemgrep suppression for urllib.request.urlopen
The https:// scheme check on line 180 prevents file:// SSRF, but
opengrep doesn't recognize the nosec directive — add nosemgrep.
* Revert nosemgrep addition — reviewdog ignores inline suppressions
* Remove ineffective nosec B310 comment from urlopen call
* Address review: harden URL redirect and input validation
On Linux (and macOS for testing), the startup dialog shows
a different view that allows users to proceed without a
purchase. Adds ProceedFree Mojo method, platform-gated
isLinuxFreeEligible flag, and new localized strings.
* Add BraveOrigin startup dialog view
Adds BraveOriginStartupView, a standalone modal window that hosts
the startup WebUI dialog. Manages system profile creation, web
contents lifecycle, and buy window navigation.
* Address review feedback for BraveOrigin startup view
- Use WidgetDelegate instead of deprecated WidgetDelegateView
- Use WebView(profile) + LoadInitialURL instead of manual WebContents
- Remove redundant GetAccessibleWindowTitle/CalculatePreferredSize overrides
- Simplify SetTitle to use message ID directly
- Fix g_startup_view leak with unique_ptr + cleanup in WindowClosing
- Remove chromium_src WidgetDelegateView friend class override
* Wire up BraveOrigin startup dialog to browser launch
Intercepts StartupBrowserCreator::Start to show the purchase
validation dialog before any browser window opens. Blocks Mac
app commands while the dialog is showing.
* Address review feedback and add test coverage for startup view
Refactor BraveOriginStartupView to use a Delegate interface instead of
raw callbacks, making the code more testable and readable. Move the
--test-type guard into ShouldShowDialog() and add
SetShouldShowDialogForTesting() for browser test support. Use
__VA_ARGS__ in the startup_browser_creator.h macros. Add unit tests
covering ShouldShowDialog with various pref/SKU credential states.
* Add browser tests for BraveOrigin startup dialog
* Add integration tests for StartupBrowserCreator::Start override
Exercise the real startup interception logic that shows the
BraveOrigin dialog, covering both validation and close paths.
* Add BraveOrigin startup dialog view
Adds BraveOriginStartupView, a standalone modal window that hosts
the startup WebUI dialog. Manages system profile creation, web
contents lifecycle, and buy window navigation.
* Address review feedback for BraveOrigin startup view
- Use WidgetDelegate instead of deprecated WidgetDelegateView
- Use WebView(profile) + LoadInitialURL instead of manual WebContents
- Remove redundant GetAccessibleWindowTitle/CalculatePreferredSize overrides
- Simplify SetTitle to use message ID directly
- Fix g_startup_view leak with unique_ptr + cleanup in WindowClosing
- Remove chromium_src WidgetDelegateView friend class override
The P3A infobar was showing on Brave Origin branded builds even though
P3A should be disabled. This compiles out the infobar code entirely
for branded builds and sets the P3A pref defaults to off.
Other DEPS files are covered by netzenbot's automated checks
and gn check. Root DEPS is a code execution channel on checkout
and chromium_src DEPS can't be validated by gn check, so those
still need manual review.
Remove land-grab CODEOWNERS rules for Brave Account
The *brave_account* and *BraveAccount* wildcard rules match any file
path containing those strings, which is overly broad and triggers
unnecessary reviews. This is a "land-grab" pattern that taxes
productivity for developers who trigger those reviews.
Remove dead CODEOWNERS rules for deleted files
- script/build-bisect.py: file was removed
- browser/ui/webui/brave_web_uicontroller_factory.cc: file was removed
- browser/ui/webui/brave_rewards_page_ui.{cc,h}: files were removed
- browser/ui/webui/brave_rewards_ui.{cc,h}: files were removed
- third_party/boost: directory was removed
- brave/components/l10n/: wrong path prefix (brave/) so it never
matched anything, and the component is deprecated anyway
Also fix incorrect !is_ios guards on production sources and tests
that don't actually depend on content, and replace
content::BrowserTaskEnvironment with base::test::TaskEnvironment
in view_counter_model_unittest.cc.
* Make Origin upgrade case free for Linux users
This still requires the feature flag to be passed
* Address review: use ASSERT_FALSE for precondition check
Change EXPECT_FALSE to ASSERT_FALSE for the IsPurchased() precondition
in CheckPurchaseState_Linux_AlwaysReturnsPurchased, since subsequent
assertions depend on this being false.
Everything else will be compiled out, but this re-uses the
BraveOriginService to keep things in sync and relies on it for these
things:
- P3A → off
- Web Discovery → off
- Stats reporting → off
This is safest for the future too that it uses it.
* Remove OFFICIAL_BUILD guard and add SKU purchase state to Origin policy
IsBraveOriginEnabled() now checks both the feature flag and purchase
state from BraveOriginPolicyManager, replacing the #if !defined
(OFFICIAL_BUILD) compile-time guard with a runtime check.
* Use BraveOriginPolicyManager as single source of truth for purchase state
Remove duplicate is_purchased_ field from BraveOriginService and delegate
to BraveOriginPolicyManager. OnCredentialSummary now calls
SetPurchased() on the policy manager, wiring SKU purchase detection to
the policy system so IsBraveOriginEnabled() returns the correct value.
* Add SKU purchase state check to Origin settings
Integrate SKUs service to verify purchase state before showing
the Origin settings page. Shows onboarding view for unpurchased
users and re-checks on tab visibility change.
* Use TetFuture instead of RunLoop
* Move FakeSkusService to skus/browser:test_support target
Makes the fake reusable by any component that depends on the SKU
service, not just brave_origin tests.
* Convert remaining RunLoop to TestFuture
* Disable web discovery native for Origin branded builds
* Move non-web-discovery deps back to common deps in browser_tests
//net:test_support and //services/service_manager/public/cpp are not
web-discovery-specific and should not be gated behind the
enable_web_discovery_native flag.
* Configure unique GUIDs, installer names, and update paths for Brave Origin
* Fix buildflag_header template to support invoker's public_deps
Chromium Issue number: 7486518 (https://chromium-review.googlesource.com/7486518)
The template was forwarding public_deps from the invoker via
forward_variables_from(), but then unconditionally assigning to it.
This is incompatible - you can't forward a variable and also directly
assign to it.
The fix removes public_deps from forward_variables_from and explicitly
checks for invoker.public_deps after initializing the required
//build:buildflag_header_h dependency.
* Update signing helper to support Origin
With Sparkle (what we currently use):
- Lives in each app bundle separately (Brave and Brave Origin separate)
- There is no priviledged helper in use
- SMAuthorizedClients is not used
With Omaha v4 (not yet in use):
The privileged helper is part of the browser app bundle and not the updater.
The privileged helper is the thing that contains the SMAuthorizedClients value.
The privileged helper gets copied to /Library/PrivilegedHelperTools/<helper name>
The Brave updater is BraveUpdater.app and is the same for both products.
When the browser first runs (or during installation), it registers itself with the updater and the updater installs itself to a shared location like
- /Library/Application Support/BraveSoftware/BraveUpdater/ (system)
- ~/Library/Application Support/BraveSoftware/BraveUpdater/ (user)
Each app register with the updater with its own unique app guid (build/config.gni changes in my pr)
The updater maintains a list of registered apps and checks for updates for each.
Uninstalling one product doesn't remove the updater - it still serves the other.
* Use Origin Sparkle feed URL for Brave Origin builds
* Fix branding files for Origin to not have Browser in the name
This also fixes the wrong info for the Release channel.
* Fix wrong number of strings error because of Origin missing Dev channel
../../chrome/installer/util/l10n_string_util.cc(200,3): error: static assertion failed due to requirement 'std::size(kIDS_APP_SHORTCUTS_SUBDIR_NAME_BASEStrings) ==
13:52:59 install_static::NUM_INSTALL_MODES': resource IDS_APP_SHORTCUTS_SUBDIR_NAME_BASE has the wrong number of mode-specific strings.
13:52:59 200 | DO_MODE_STRINGS
13:52:59 | ^~~~~~~~~~~~~~~
* Adjust product path names for Brave Origin
* Update chromium_src/chrome/browser/component_updater/updater_state_win.cc
Co-authored-by: Michael Herrmann <michael@herrmann.io>
* Update chromium_src/chrome/installer/util/google_update_constants.cc
Co-authored-by: Michael Herrmann <michael@herrmann.io>
* Update browser/mac/sparkle_glue.mm
Co-authored-by: Michael Herrmann <michael@herrmann.io>
* Review fixes
---------
Co-authored-by: Michael Herrmann <michael@herrmann.io>
* Fix Windows build when enable_brave_vpn is false
When VPN is disabled (e.g. Origin builds), copy chrome's resource
allowlist instead of trying to merge with wireguard resources.
* create_dist Origin fixes
* Use universal binary for Tor tests
The test data binary at brave/test/data/tor/components/mac/cldoidikboihgcjfkhdeidbpclkineef/1.0.0/tor-0.3.3.8-darwin-brave-5 is x86_64 only.
But the component is a universal binary: cldoidikboihgcjfkhdeidbpclkineef
Tor tests BraveTorBrowserTest and BraveTorWithCustomProfileBrowserTest are failing with EBADARCH.
* Ensure component cleanup finishes before test exits
When PRE_ResetBridges sets bridges to not used, it triggers cleanup of the pluggable transport component. The test was only waiting for the snowflake process to exit (WaitProcessExit), but the component cleanup happens asynchronously on a separate thread
* Script changes to copy XTB files for Brave Origin
This is done when rebasing Chromium with `npm run chromium_rebase_l10n`
* Update GRD file to use Brave Origin's own XTB files
* Lint fix