* 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
These changes affect these things:
- about://settings at the bottom
- brave://settings/help
- chrome://theme/current-channel-logo@1x
- chrome://theme/current-channel-logo@2x
The reason this is needed is because there is no way to do multi-brand
chromium_src overrides right now.
The chromium_src/components/omnibox/browser/vector_icons/product_chrome_refresh.icon file contains the standard Brave lion logo.
* Script and config to copy Brave Origin branding and grd
* Copy grd files for brave_origin
* Conditionally include dev resources
Brave Origin doesn't have dev resources
0f and 24f are invalid in C++ because the `f` suffix is only allowed on
floating-point literals; `0` and `24` are integer literals. Use `0.0f`
and `24.0f` instead.
components/vector_icons/aggregate_vector_icons.py reads all .icon files and generates a single C++ source file (gen/components/vector_icons/vector_icons.cc
The .icon files were not used yet, but were originally created from a
one-time conversion script which converted .svg files to .icon format.
* Brave Origin theme assets
The optimization used optipng -o7 which is 100% lossless
* Fix PRESUBMIT.py check for brave_origin theme
* Fix PRESUBMIT.py lint
DecentralizedDnsNavigationThrottleBrowserTest.ClickjackingProtectionPreventsEarlyClicks
Directly control the proceedClicksEnabled JS variable instead of racing against the 500ms timer.
The test was flaky because the timer starts at DOMContentLoaded but the test waits for
document.readyState=='complete', which can take >500ms on slow CI machines, causing the protection to
expire before the test runs.
[ RUN ] DecentralizedDnsNavigationThrottleBrowserTest.ClickjackingProtectionPreventsEarlyClicks
[19651:1178558:1117/200021.772078:INFO:brave/components/brave_referrals/browser/brave_referrals_service.cc:84] Could not get promo code from /Users/jenkins/jenkins/workspace/brave-browser-build-macos-arm64-nightly/src/out/Release_arm64. The extended attribute com.brave.refcode was not found.
[19651:1178493:1117/200021.848031:ERROR:chrome/browser/ui/views/user_education/impl/browser_user_education_interface_impl.cc:154] Attempting to show IPH IPH_DiscardRing before browser initialization complete; IPH will not be shown.
../../brave/browser/decentralized_dns/test/decentralized_dns_navigation_throttle_browsertest.cc:327: Failure
Expected equality of these values:
static_cast<int>(ResolveMethodTypes::ASK)
Which is: 0
local_state()->GetInteger(kENSResolveMethod)
Which is: 3
Stack trace:
0 brave_browser_tests 0x00000001028ed558 cxxbridge1$string$len + 847592
1 brave_browser_tests 0x000000010d10375c secp256k1_ecdsa_recover + 2729628
4 brave_browser_tests 0x000000010515cdd0 _v8_internal_Node_Print(void*) + 7890684
10 brave_browser_tests 0x000000010d102bc8 secp256k1_ecdsa_recover + 2726664
* Add enable_brave_wallet GN variable and build flag
This adds a new GN build flag 'enable_brave_wallet' that can be set to
false to exclude Brave Wallet from the build. The flag is true by default
to maintain current behavior.
Changes include:
- Add enable_brave_wallet declare_args in build/config/BUILDCONFIG.gn
- Create brave_wallet/common/buildflags with ENABLE_BRAVE_WALLET flag
- Update all BUILD.gn and sources.gni files to use the new flag
- Add wallet buildflags dependencies via minimal one-line imports
* Add patches for wallet buildflags in Chromium BUILD files
Adds minimal one-line patches to import wallet buildflags dependencies
in Chromium source files. This allows Chromium code to conditionally
depend on wallet headers.
Patches:
- chrome/browser/ui/hid/BUILD.gn
- net/BUILD.gn
- third_party/blink/common/BUILD.gn
- third_party/blink/public/common/BUILD.gn
- third_party/blink/renderer/modules/permissions/BUILD.gn
* Guard wallet code in Chromium source overrides
Updates chromium_src overrides to conditionally compile wallet-related
code based on enable_brave_wallet flag. This includes:
- Adding DEPS files to allow buildflags dependencies
- Guarding wallet permission handling with #if BUILDFLAG(ENABLE_BRAVE_WALLET)
- Keeping wallet permission enum values unconditionally to maintain profile
interchangeability between wallet-enabled and wallet-disabled builds
- Updating component registration and preference handling
Key changes:
- Permission enums remain stable across build configs for UMA and persistence
- Wallet permission handling code only compiled when wallet enabled
- DEPS files updated to allow buildflags includes
* Guard wallet UI code in front-end TypeScript and Mojom
Conditionally compiles wallet-related UI code in TypeScript and Mojom
interfaces based on enable_brave_wallet preprocessor flag.
Changes:
- Settings menu: Use lastInserted pattern for menu item ordering
- Page visibility: Guard wallet page visibility checks
- Browser commands: Guard wallet command handling
- Routes: Conditionally include wallet routes
- Add non-null assertions for DOM insertions in TypeScript
- Update Mojom interfaces to conditionally include wallet enums
Front-end code uses <if expr="enable_brave_wallet"> preprocessor
directives to exclude wallet UI when the feature is disabled.
* Guard wallet usage in non-wallet Brave code
Conditionally compiles wallet-related code in non-wallet Brave files
based on enable_brave_wallet build flag.
Changes include:
- browser/: Guard wallet service factories, preferences, and helpers
- components/: Guard wallet dependencies in rewards, sidebar, and DNS
- renderer/: Conditionally register wallet content settings
- utility/: Guard wallet component registration
- ios/: Add optional chaining for wallet feature flags
- test/: Guard wallet-related test code
Key files:
- brave_stats_updater.cc: Guard wallet pref registration with #if
- brave_profile_prefs.cc: Conditionally register wallet preferences
- sidebar_service.cc: Guard wallet panel items
- iOS WalletConstants.swift: Use optional chaining for feature checks
This allows building Brave without wallet while maintaining profile
compatibility between wallet-enabled and wallet-disabled builds.
* Add static_assert for ENABLE_BRAVE_WALLET in wallet headers
Adds compile-time assertions to wallet headers to ensure they are only
included when wallet is enabled. This prevents accidental usage of wallet
APIs when enable_brave_wallet=false.
Added static_assert(BUILDFLAG(ENABLE_BRAVE_WALLET)) to:
browser/brave_wallet/ (11 files):
- asset_ratio_service_factory.h
- brave_wallet_context_utils.h
- brave_wallet_ipfs_service_factory.h
- brave_wallet_provider_delegate_impl.h
- brave_wallet_service_factory.h
- brave_wallet_tab_helper.h
- meld_integration_service_factory.h
- wallet_notification_service_factory.h
- simulation_service_factory.h
- swap_service_factory.h
- wallet_data_files_installer_delegate_impl.h
components/brave_wallet/browser/ (15 files):
- brave_wallet_p3a_private.h
- brave_wallet_prefs.h
- brave_wallet_service.h
- brave_wallet_utils.h
- ens_resolver_task.h
- json_rpc_service_test_utils.h
- json_rpc_service.h
- keyring_service_observer_base.h
- keyring_service.h
- network_manager.h
- permission_utils.h
- pref_names.h
- test_utils.h
- tx_service.h
- wallet_data_files_installer.h
components/brave_wallet/common/ (6 files):
- brave_wallet_types.h
- common_utils.h
- eth_abi_utils.h
- features.h
- hex_utils.h
- pref_names.h
Also includes minor wallet code updates to use buildflags and
guard zcash-specific test code.
* Follow up fixes after Parts 1-7
* Add AI Chat build flag to components/ai_chat
* Add AI Chat build flag to browser/ui
* Add AI Chat build flag to browser/resources
* Add AI Chat build flag to chromium overrides
* Add AI Chat build flag to other components
* Add AI Chat build flag to core browser files
* Add AI Chat build flag to app and renderer
* Add AI Chat build flag to remaining files
* Set enable_ai_chat to !is_brave_origin_branded
* Review comments
Including gn_check errors in chromium_src
* Exclude ai_chat Jest tests when not enabled
* Fix crash in guest profiles when loading settings w/ Brave Origin
* Add test for guest profile returning nullptr
* Add test for loading chrome://settings in guest profile
* Gate VPN on !brave_origin_only_mode
* Gate Tor on !brave_origin_only_mode
* Gate speedreader on !brave_origin_only_mode
* Gate Wayback machine on !brave_origin_only_mode
* Add Settings UI for Brave Origin
Adds the user interface components for Brave Origin settings,
including toggles, strings, and icons for managing various Brave features.
* Use Brave Origin handler API in settings UI
* Review comments
---------
Co-authored-by: Brian Clifton <brian@clifton.me>
* Add browser policy service support for BraveOrigin
Browser Policies need to be checked, not only profile policies.
* Add Brave Origin mojo handler
Add BraveOriginSettingsHandler mojo interface and implementation
* Consolidate separate browser/profile API
* Use profile manager observer events for refreshing policies in providers
* Change from pref to policy key lookups
* Simplify parameter passing for some Brave Origin functions
* Remove policy_key from PolicyInfo class
The map that stores these already associates the policy_key as the key
name.