Commit Graph
100 Commits
Author SHA1 Message Date
Brian R. BondyandFrancois Marier 581039ac87 Use origin-branded names for packages and dist artifacts (#34939)
* 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>
2026-03-25 10:56:13 -04:00
Brian R. BondyandClaude Opus 4.6 a7bade6bac Fix Origin branding strings showing "Brave Nightly" on Windows (#34870)
* 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>
2026-03-25 09:02:07 -04:00
Brian R. Bondy 92aae1ccc6 Update network endpoint best practices (#34906)
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.
2026-03-24 08:44:56 -04:00
Brian R. Bondy 0b14f04c96 Remove ARCH-052 mojom default values best practice (#34912)
Mojom code generation already value-initializes all struct fields
via the default constructor, making explicit defaults redundant.
2026-03-24 08:22:20 -04:00
Brian R. Bondy caa92cf07f Skip violations in surrounding unchanged code during reviews (#34894) 2026-03-23 11:12:13 -04:00
Brian R. Bondy 54d0a15d3a Add best practice: keep PRs focused on a single purpose (#34891) 2026-03-23 11:11:47 -04:00
Brian R. BondyandClaude Opus 4.6 1f1b6b01cb Update TUF-004: don't use sanitizer-specific filters when upstream flakes broadly (#34874)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 14:20:59 -04:00
Brian R. Bondy 358d226476 Get closer to Brave Origin startup styling (#34739) 2026-03-19 17:08:50 -04:00
Brian R. Bondy deafb8cca8 Use a different bg image for Brave Origin dmg (#34740) 2026-03-19 10:02:16 -04:00
Brian R. Bondy 1b75c1f19f Remove Profiles menu while Brave Origin startup dialog is swhown (#34699) 2026-03-18 20:43:18 -04:00
Brian R. Bondy a2771982cb Move review-prs skill to brave-core (#34703)
* 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
2026-03-17 09:14:15 -04:00
Brian R. Bondy 7ceb66df03 Add Linux-specific free tier to Origin startup dialog (#34721)
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.
2026-03-17 09:13:25 -04:00
Brian R. Bondy e88f2476b2 Add best practice: use public to restrict header visibility (#34743) 2026-03-15 13:55:46 -04:00
Brian R. Bondy 628bd598c7 Update best practices for feature flags and buildflag confusion (#34722)
* Update best practice: feature flags for significant or experimental features

* Update best practice: clarify buildflag vs feature flag confusion
2026-03-13 18:26:40 -04:00
Brian R. BondyandMichael Herrmann 07d5187ec3 Fix Brave Origin macOS DMG layout (#34710)
* Add Origin-specific DS_Store files for macOS DMG layout

* Update build/mac/ds_store/update_ds_store_files.py

Co-authored-by: Michael Herrmann <michael@herrmann.io>

* Update build/mac/BUILD.gn

Co-authored-by: Michael Herrmann <michael@herrmann.io>

* Fix missing closing quote in update_ds_store_files.py

---------

Co-authored-by: Michael Herrmann <michael@herrmann.io>
2026-03-13 17:05:30 -04:00
Brian R. Bondy a8214ba5c9 Wire up BraveOrigin startup dialog to browser launch (#34555)
* 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.
2026-03-13 08:25:32 -04:00
Brian R. Bondy 8b74765985 Add best practice: PRs should include reasonable test coverage (#34696)
* Add best practice: PRs should include reasonable test coverage

* Add best practice: Use chromium_src include pattern to test upstream overrides
2026-03-12 23:11:13 -04:00
Brian R. Bondy 8ceb5f27c7 Add best practice skill: order entries by ID (#34698) 2026-03-12 20:05:49 -04:00
Brian R. Bondy 0d676b6bbe Add Brave as a browser import source for Brave Origin (#34650)
Add Brave as a browser import source

Allow users to import data from another Brave browser installation.
2026-03-12 14:57:34 -04:00
Brian R. Bondy 4bf5532630 Add BraveOrigin startup dialog view (#34554)
* 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
2026-03-12 11:13:50 -04:00
Brian R. Bondy d015da0e0f Compile out P3A infobar and disable P3A by default for Brave Origin builds (#34612)
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.
2026-03-10 20:35:53 -04:00
Brian R. Bondy c6a040c9f6 Remove CODEOWNER rule that matches nothing (#34606) 2026-03-10 16:24:33 -04:00
Brian R. Bondy eda7296dab Remove components/constants CODEOWNERS since brave-dev-bot warns abou… (#34605)
Remove components/constants CODEOWNERS since brave-dev-bot warns about it now
2026-03-10 14:28:52 -04:00
Brian R. Bondy 7c78493998 Add BraveOrigin startup dialog mojo, WebUI, frontend, and tests (#34553)
Adds the mojo interface, WebUI handler + UI classes, frontend
resources (HTML/CSS/TS), storybook stories, string resources,
and unit tests for the Brave Origin startup purchase dialog.
2026-03-10 12:48:37 -04:00
Brian R. Bondy 391da523ab Add Claude skills documentation (#34603) 2026-03-10 10:53:54 -04:00
Brian R. Bondy af22939d2e Import Claude Code skills and helper scripts (#34569)
* Import best-practice docs from brave-experiments/brave-core-tools

* Add Claude Code skills and helper scripts

Skills for: code review, CI management,
branch management, crash analysis, upstream flake detection, PR
creation, preflight checks, and more.
2026-03-09 21:15:46 -04:00
Brian R. Bondy e7235b16de Skip CheckLongLines for web files formatted by prettier (#34584) 2026-03-09 21:14:15 -04:00
Brian R. Bondy 66d25b65b5 Import best-practice docs from brave-experiments/brave-core-tools (#34568) 2026-03-09 14:15:22 -04:00
Brian R. Bondy 1cbc3afe9a Narrow DEPS codeowners to root and chromium_src only (#34376)
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.
2026-03-02 16:36:04 -05:00
Brian R. Bondy e886177073 Remove CODEOWNERS rules for Brave Account (#34372)
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.
2026-03-02 16:02:38 -05:00
Brian R. Bondy d6db5f12d7 Remove dead CODEOWNERS rules (#34371)
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
2026-03-02 16:02:22 -05:00
Brian R. Bondy 20fd971d87 Add contributor guidelines for PR volume and AI-assisted contributions (#34346) 2026-03-01 18:05:43 -05:00
Brian R. Bondy 693b54c1d7 Remove arch from daily usage ping (#34277)
* Remove arch from daily usage ping

* Fix formatting

* Fix GN check and DEPS for brave_stats_updater_util include
2026-02-28 19:22:47 -05:00
Brian R. Bondy 9be34f4a6d Move time_period_storage unit tests to brave_components_unittests (#34133) 2026-02-25 09:10:18 -05:00
Brian R. Bondy 6c4d84a58b Move assist_ranker unit tests to brave_components_unittests (#34128) 2026-02-24 20:18:28 -05:00
Brian R. Bondy 034e05e626 Move brave_private_cdn unit tests to brave_components_unittests (#34130) 2026-02-24 20:18:08 -05:00
Brian R. Bondy eb8b247c12 Move brave_sync crypto unit test to brave_components_unittests (#34132) 2026-02-24 20:17:55 -05:00
Brian R. Bondy 4c01567ce4 Move ntp_background_images unit tests to brave_components_unittests (#34134)
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.
2026-02-24 20:16:51 -05:00
Brian R. Bondy f086800037 Make Origin upgrade case free for Linux users (#34115)
* 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.
2026-02-24 00:51:09 -05:00
Brian R. Bondy 32e89c0aa0 Force BraveOriginService enabled for Brave Origin branded builds (#33258)
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.
2026-02-23 19:04:13 -05:00
Brian R. Bondy 5b613d6e35 Remove official build guard origin policy (#34096)
* 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.
2026-02-23 13:27:49 -05:00
Brian R. Bondy 6e1112330a Brave origin add purchase state for upgrade case (#34044)
* 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
2026-02-20 10:50:58 -05:00
Brian R. Bondy 0ee7b3846d Disable web discovery native for Origin branded builds (#33816)
* 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.
2026-02-12 07:36:42 -05:00
Brian R. Bondy abd5e9f7cc Use brave_domains for Origin buy URL instead of hardcoding (#33838) 2026-02-11 12:36:35 -05:00
Brian R. Bondy f23676687a Assert that Brave Origin branding is desktop-only (#33846)
Add build assertions to fail early if is_brave_origin_branded is
enabled on Android or iOS, since it is only supported on desktop
platforms.
2026-02-11 07:42:29 -05:00
Brian R. Bondy 907a7c60fa Add missing buildflag guards to Origin settings page (#33812)
Only Speedreader had an <if expr> guard. Add guards for all
feature toggles so they don't render when compiled out.

Resolves https://github.com/brave/brave-browser/issues/52687
2026-02-10 13:00:13 -05:00
Brian R. BondyandMichael Herrmann f92f3ae680 Configure unique GUIDs, installer names, and update paths for Brave Origin (#33184)
* 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>
2026-01-29 13:13:05 -05:00
Brian R. Bondy 139d44583b Fix Windows build when enable_brave_vpn is false and create_dist (#33372)
* 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
2026-01-23 10:29:27 -05:00
Brian R. Bondy a806704585 Intermittent fail fix for AIChatUIPageHandlerBrowserTest.ProcessImageFile (#33360) 2026-01-22 10:45:18 -05:00
Brian R. Bondy 8cba0357eb Fix linking on Windows for Origin builds (#33347) 2026-01-21 17:30:04 -05:00
Brian R. Bondy 03fb5d327d Split out pref and feature Brave Origin targets (#33322)
Add Brave Origin targets for features and prefs
2026-01-21 15:39:10 -05:00
Brian R. Bondy 55db41dced Brave Origin purchase option in system settings (#33325) 2026-01-21 13:34:48 -05:00
Brian R. Bondy 638f571834 Fix Tor intermittent failures (#33301)
* 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
2026-01-21 10:05:53 -05:00
Brian R. Bondy f1b31634cd Fix Brave Origin Settings Handler file path (#33321) 2026-01-20 19:09:12 -05:00
Brian R. Bondy 13bf5e3a82 Modify onboarding for Brave Origin (#33257)
Skip WDP onboarding step and modify last step
2026-01-20 13:20:51 -05:00
Brian R. Bondy 94e064b2a7 Get rid of BraveOrigin mojo common dir (#33277) 2026-01-20 13:18:27 -05:00
Brian R. Bondy af374e6aab Fix Brave Origin win installer brand rc generation (#33279) 2026-01-19 16:35:49 -05:00
Brian R. Bondy 3c76bb88a9 Brave Origin Strings XTB handling (#33261)
* 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
2026-01-19 12:40:47 -05:00
Brian R. Bondy 326c6ed16f Update welcome page branding (#33245) 2026-01-16 11:36:31 -05:00
Brian R. Bondy 2c89122b01 Use Brave Origin theme assets (#33239)
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
2026-01-15 16:54:52 -05:00
Brian R. Bondy 3379695d54 Fix git exclusion for /brave/ (#33225)
It was meant to cover only /brave/ and not themedirs and possibly more
2026-01-15 14:28:11 -05:00
Brian R. Bondyandbrave-builds 662e87dc32 Convert CODEOWNER users to teams (#32070)
1.88.31

Co-authored-by: brave-builds <brave-builds+devops@brave.com>
2026-01-15 14:27:47 -05:00
Brian R. Bondy 2feaeccbae Fix URL bar icon for Brave Origin brave:// pages (#33186)
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.
2026-01-14 07:11:28 -05:00
Brian R. Bondy fda7bbfbc7 Add brave_origin to gitignore (#33151)
So that it doesn't show up as changed files in ../ (the same as brave
dirs)
2026-01-13 09:05:21 -05:00
Brian R. Bondy 4049b8799f Add enable_brave_news buildflag (#32852) 2026-01-12 13:22:17 -05:00
Brian R. Bondy 9bd028ca71 Copy Brave Origin branding and grd (#33045)
* 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
2026-01-08 08:13:28 -05:00
Brian R. Bondy d63dbd841f Update Brave Origin icon sizing (#33031) 2026-01-05 20:39:13 -05:00
Brian R. Bondy 9651416994 Remove wallet usage from daily usage (#32948) 2025-12-25 19:34:27 -05:00
Brian R. Bondy d69955f09c Fix vector icons for Brave Origin build (#32949)
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.
2025-12-24 15:30:22 -05:00
Brian R. Bondy facb8df1e1 Add Brave talk build flag (#32917)
* Add Brave talk buildflag

* Review comments
2025-12-23 09:16:42 -05:00
Brian R. Bondy 71c0ca7899 Brave Origin theme assets (#32873)
* 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
2025-12-19 15:26:28 -05:00
Brian R. Bondy 042e9ef7b4 Remove unused component resources (#32890)
* Remove unused component resources

* Remove unused ipfs_logo.png

* Remove README that seemed wrongly copied
2025-12-19 15:25:25 -05:00
Brian R. Bondy 6273b459be Consolidate wallet pref files into pref_names.h (#32825)
Merge brave_wallet_prefs.h/cc into pref_names.h/cc and move
k*PrefKey constants from brave_wallet_constants.h to pref_names.h.
2025-12-16 12:55:39 -05:00
Brian R. Bondy ec771286d7 Remove unused Brave theme assets (#32822) 2025-12-14 10:16:38 -05:00
Brian R. Bondy 690102bfc3 Revert "Fix intermittent failure BraveSearchTestEnabled.DefaultAPIVisibleKnownHost" (#32700)
Revert "Fix intermittent failure BraveSearchTestEnabled.DefaultAPIVisibleKnow…"

This reverts commit 81e8e952cb.
2025-12-09 14:19:43 -05:00
Brian R. Bondy 6744853b96 Intermittent failure fix for clickjacking test (#32604)
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
2025-12-01 09:08:50 -05:00
Brian R. Bondy f0656b06f9 Consolidate pref_names.h files (common -> browser) (#32603)
Consolidate pref_names duplicates (common -> browser)
2025-11-29 22:15:10 -05:00
Brian R. Bondy 69a0b8db1c Remove brave_infura_project_id gn var and build flag (#32602) 2025-11-28 20:00:15 -05:00
Brian R. Bondy 81e8e952cb Fix intermittent failure BraveSearchTestEnabled.DefaultAPIVisibleKnownHost (#32575) 2025-11-28 19:59:07 -05:00
Brian R. Bondy a4d9248fcb Add enable_brave_wallet gn var and build flag (#32484)
* 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
2025-11-28 15:54:27 -05:00
Brian R. Bondy 72cadbd0c6 AIChat build flag and gn var (#31988)
* 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
2025-11-11 11:20:34 -05:00
Brian R. Bondy c879c7877a Remove some unused Python script tooling code (#32220) 2025-11-07 15:47:12 -05:00
Brian R. Bondy 059995b375 Hide Tor settings only when Tor is disabled and managed (#32162)
Disable Tor settings only when Tor is disabled and managed
2025-11-01 08:13:36 -04:00
Brian R. Bondy 5c186f889d Forward Brave Origin env to gn and build fixups (#32069)
* Forward Brave Origin env to gn

* Fix test should not run when no speedreader

* Fix Android build deps for Brave Origin
2025-10-31 14:49:38 -04:00
Brian R. Bondy 8b843d2819 Fix image_fetcher dep when tor is disabled (#32067) 2025-10-29 10:44:55 -04:00
Brian R. Bondy c1fc2d2680 Fix crash in guest profiles when loading settings w/ Brave Origin (#31897)
* 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
2025-10-20 12:53:10 -04:00
Brian R. Bondy 85bd5d8b04 When Tor is disabled via buildflag, settings errors from braveTorDisabledByPolicy check (#31900)
Don't check braveTorDisabledByPolicy from settings when !enable_tor
2025-10-20 12:52:41 -04:00
Brian R. Bondy b82e6c86d9 is_brave_origin_branded should disable various gn variables (#31812)
* 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
2025-10-19 18:29:05 -04:00
Brian R. Bondy 6b811cdf9e CHECK_IS_TEST for g_browser_process and browser_policy_connector (#31870) 2025-10-19 18:28:01 -04:00
Brian R. Bondy 8d643db8ac Gate Brave Origin policies on non-official builds instead of DCHECK_IS_ON (#31869)
Gate Brave Origin policies on non-official builds instead of dcheck
2025-10-19 18:27:39 -04:00
Brian R. Bondy caea64fda6 Fix enable_speedreader=false build (#31811) 2025-10-17 11:11:12 -04:00
Brian R. Bondy 2b6290a1bf Fix enable_tor=false build (#31809) 2025-10-15 17:58:38 -04:00
Brian R. Bondy 10b52ba035 Fix enable_brave_wayback_machine=false builds (#31810) 2025-10-15 14:05:07 -04:00
Brian R. Bondy 28f8ad137a Create is_brave_origin_branded build variable and buildflag (#31766) 2025-10-14 19:45:00 -04:00
Brian R. BondyandBrian Clifton 868687478d Add Brave Origin Settings UI (#31677)
* 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>
2025-10-10 13:49:33 -04:00
Brian R. Bondy 4b73a2ca64 Hide Managed UI when there are only internal Brave policies (#31457)
Don't show Profile Managed UI for Brave policy sources
2025-09-29 11:35:30 -04:00
Brian R. Bondy 1f1cafb840 Brave Origin mojo for Settings UI (#31404)
* 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.
2025-09-26 20:20:16 -04:00
Brian R. Bondy aa66b627d1 Brave origin working end to end (#31249)
* Add chromium_src override for GetPolicyServiceFromProfile and factory initialization

* Implement Brave Origin Policy Manager functionality

* Update Brave Origin Service with policy manager integration and build dependencies

* Mirror Brave Origin feature changes in user prefs when user-settable

* Update Brave policy providers with profile policy integration

* Update existing tests for delayed policy loading

* Brave Origin Policy Manager Set* unittests

* Add Brave Origin service unittests

* Shutdown policy manager to avoid dangling pointer

* Review comments

* Move Debug check to policy providers only
2025-09-23 16:31:43 -04:00
Brian R. Bondy 32ff9d9898 Fix DataDecoder memory kept in memory (#31319)
Replaces NoDestructor<DataDecoder> with a member variable so it does not stay in memory
2025-09-22 13:44:53 -04:00
Brian R. Bondy befd4f3317 Hide Speedreader header when speedreader is hidden by admin policy (#31320) 2025-09-22 13:40:13 -04:00