Brave Origin builds disable rewards (enable_brave_rewards =
!is_brave_origin_branded), so the rewards_grant_* endpoints are unused
and should not be required in .env.
Add an "Affect all browser profiles" sub-label to the Tor, Privacy
preserving analytics (P3A), and Statistics reporting toggles on
brave://settings/origin, since these settings apply browser-wide rather
than to the current profile.
Fixes https://github.com/brave/brave-browser/issues/55967
Brave Origin branded builds compile out Brave Rewards
(enable_brave_rewards = !is_brave_origin_branded), but the Rewards
keyboard shortcuts were still reported as enabled because
IsCommandDisabledByPolicy only checked kDisabledByPolicy. Gate the
Rewards commands on ENABLE_BRAVE_REWARDS so they are always disabled
when Rewards is not compiled in, mirroring AI Chat, Wallet, Talk, etc.
Set WM_CLASS / app_id on Brave Origin startup dialog widget
Without these the Linux window manager has nothing to match the dialog
to the Brave .desktop file with, so the taskbar falls back to a generic
icon. Mirrors what ProfilePickerWidget does for the same reason.
shell_integration_linux lives in //chrome/browser, which would create a
dependency cycle if pulled into //brave/browser/ui/views/brave_origin
directly. Route the lookup through the existing Delegate interface,
implemented in the chromium_src startup_browser_creator override.
Fixes https://github.com/brave/brave-browser/issues/55614
* Hide Tor toggle when managed by Brave Origin policy
Fixes https://github.com/brave/brave-browser/issues/55684
* Update Incognito browsertest for hidden Tor toggle
The toggle is now removed from the DOM via dom-if when Tor is managed,
rather than just disabled. Assert element existence accordingly.
Calling chrome::ShowSettingsSubPageForProfile inline from the SKU
CredentialSummary mojo reply runs during the same dispatch frame that
just fired SetPurchased() — which reloads managed prefs via the policy
provider observer chain. Opening a settings tab synchronously from that
mid-cascade state has produced BackupRefPtr dangling raw_ptr crashes
when the Refresh button on account.brave.com first detects a purchase.
Set did_open_origin_settings_ before posting and let the helper run on
the next loop iteration; the WeakPtr guards against the service being
torn down between the post and the run.
Also drop a stray LOG(ERROR) debug print left in OnCredentialSummary.
Fixesbrave/brave-browser#55632
Brave Origin builds compile out Brave Rewards
(enable_brave_rewards = !is_brave_origin_branded), but the
BraveRewardsDisabled policy was still registered unconditionally, so
brave://policy listed it on Brave Origin builds even though the feature
isn't present.
Wrap the BraveRewardsDisabled entry in kBraveSimplePolicyMap and the
matching kBraveOriginProfileMetadata entry in #if
BUILDFLAG(ENABLE_BRAVE_REWARDS), mirroring how Wallet, Talk, AI Chat,
etc. are gated. The unit test assertions and BUILD.gn rewards deps move
under the same buildflag.
Fixesbrave/brave-browser#55558
Add an enable_brave_stats_updater buildflag that defaults to
!is_brave_origin_branded, following the pattern used by other features
(enable_brave_ads, enable_brave_rewards, etc.). On Brave Origin builds,
exclude brave_stats_updater.cc/.h and its tests via GN, guard callers
with #if BUILDFLAG, and put a static_assert in the header so any
accidental include fails with a clear error.
Resolves https://github.com/brave/brave-browser/issues/55595
When the startup dialog is dismissed before validation, delete the
first run sentinel that was created earlier in the same process.
Without this, the next launch (where the user enters a valid purchase
ID) is no longer considered first run, and onboarding is skipped in
favor of a blank new tab page.
Fixes https://github.com/brave/brave-browser/issues/55559
Constrain the dialog's minimum size to its initial dimensions
(540x500, 540x600 on Linux) so users cannot resize the window below
the designed layout.
Fixes https://github.com/brave/brave-browser/issues/55554
* Uplift skill: add Resolves links for tracked issues to PR body
The uplift skill already discovers or creates a tracking issue for every
included PR in Step 7, but never surfaces those issue references on the
uplift PR itself. Collect each issue reference into a RESOLVED_ISSUES
list as it is encountered and, after Step 7's per-PR work, edit the
uplift PR body to prepend a Resolves directive per entry so the linked
issues are discoverable from the PR.
* Uplift skill: place Resolves lines under the Uplift list
Per review on the dogfood run, the `Resolves <ref>` directives belong
underneath the `Uplift of #XXXX` list rather than prepended above it.
Update Step 7's instructions and example so the new lines are spliced in
immediately after the last `Uplift of` line, and reflect the same in
Step 5's heads-up note.
Default eligibility now covers any reasonable uplift candidate; a
trailing free-form English argument narrows it (e.g. 'only automated
test fixes and crash fixes' restores the prior behavior). For each
uplifted PR without a linked issue, create a tracking issue in
brave-browser, cross-link it on both PRs, and close it.
The window title format and captive portal title strings in
brave_origin_strings.grd were still showing "Brave" instead of
"Brave Origin", and the chrome.dll icon resources (used for the
per-window HICON via WM_SETICON) were hardcoded to the brave/
theme path with no IS_BRAVE_ORIGIN_BRANDED gating. The chrome.exe
icons (brave_exe.rc) were already correctly gated, which is why
shortcut/taskbar icons were correct but alt+tab was not.
- Add IDS_BROWSER_WINDOW_TITLE_FORMAT and
IDS_CAPTIVE_PORTAL_BROWSER_WINDOW_TITLE_FORMAT to
ORIGIN_BRANDED_MESSAGES in chromium-rebase-l10n.py so the
branding rewrite picks them up on every rebase.
- Update the currently-checked-in brave_origin_strings.grd to
apply the same branding now.
- Gate chrome/app/chrome_dll.rc icon resources on
IS_BRAVE_ORIGIN_BRANDED, mirroring brave/app/brave_exe.rc.
- Define IS_BRAVE_ORIGIN_BRANDED for the chrome_dll_resources
source_set when is_brave_origin_branded=true.
Block access to the brave://ads-internals WebUI when Brave Rewards are
disabled by enterprise policy, matching the existing gating for
brave://rewards and brave://rewards-internals.
Add best practice: Use *.mojom-forward.h in headers
CS-070: prefer the auto-generated *.mojom-forward.h over the full
*.mojom.h bindings when a header only references mojom types as
pointers, references, or function parameters. Reduces compile times
and transitive dependencies.
Source: PR #35622 review comment by netzenbot.
Adds ARCH-072 to docs/best-practices/architecture.md. A KeyedServiceFactory
may only return nullptr based on session-stable attributes (profile type,
buildflags, base::Feature). Gating creation on user-toggleable prefs forces
restarts and was repeatedly flagged in PR reviews.
The icon_suffix lookup in get_icon_artifacts() only matched
branding == "brave", so Brave Origin packages always staged the
stable product_logo PNGs regardless of channel. Brave Origin nightly
ended up registering the stable Origin icon under the
brave-origin-nightly icon name, making nightly indistinguishable
from stable in desktop environments.
Fixbrave/brave-browser#54734
Adds --skip-origin-startup-dialog so users on Linux (where Brave Origin
is free) can bypass the startup dialog from the command line. Useful for
automation and scripted launches where the donation prompt would block.
Resolves https://github.com/brave/brave-browser/issues/55151
Defaults `enable_brave_education` to off when `is_brave_origin_branded`
is true, matching siblings like `enable_playlist`, `enable_brave_news`,
and `enable_brave_wayback_machine`. Most features promoted on
brave://getting-started don't apply to Brave Origin, so neither the
WebUI page nor the post-onboarding redirect to it should be available
in Origin branded builds.
Resolvesbrave/brave-browser#55035
On is_brave_origin_branded=true builds the post-purchase flow is
driven by the startup dialog, so the service should not navigate
to brave://settings/origin after a first purchase. Gate the
OpenOriginSettings() call behind !IS_BRAVE_ORIGIN_BRANDED so the
behavior only fires for the upgrade case launched from
chrome://settings/system.
* Gate Playlist UI on BravePlaylistEnabled policy
Complements #35732, which hides Playlist via the enable_playlist buildflag
in is_brave_origin_branded=true builds, by also hiding the Playlist UI in
is_brave_origin_branded=false builds when an administrator disables it
via the BravePlaylistEnabled policy (kPlaylistEnabledPref managed=false).
Adds playlist::IsPlaylistEnabled(prefs) / IsDisabledByPolicy(prefs)
helpers alongside existing features.h / pref_names.h, mirroring the iOS
PrefService.isPlaylistAvailable check and the ai_chat::IsAIChatEnabled
pattern. The helper is used to gate the sidebar item, side panel
coordinator and entry, browser action, playlist command, tab helper,
page action icon, and the chrome-untrusted://playlist WebUI.
The SidebarService now observes kPlaylistEnabledPref so the item appears
and disappears when policy changes at runtime.
User-driven pref toggles from settings keep their existing behaviour
(UI stays reachable so the user can flip the pref back); only a managed
pref forced off hides the UI.
Fixesbrave/brave-browser#50156
* Address review: move IsPlaylistAllowed out of common, simplify settings bools
- Relocate playlist::IsPlaylistEnabled from components/playlist/core/common
(which is reachable from any process) to a new components/playlist/core/browser
target, since the helper depends on PrefService (browser-only). Rename the
function to IsPlaylistAllowed to match its semantics (feature flag is enabled
and the pref is not policy-disabled), matching bridiver's suggestion that
"allowed" = managed+feature, "enabled" = user toggle.
- Update all callers and BUILD/DEPS wiring for the new location.
- In brave_settings_ui.cc, stop combining the feature flag and the user pref
into a single isPlaylistAllowed loadTimeData bool. Instead expose
isPlaylistFeatureEnabled and isPlaylistDisabledByPolicy (the Tor pattern),
and let settings page code consult the pref directly via the prefs mixin
when it needs the managed state. page_visibility.ts now computes playlist
visibility from the two building blocks.
* Allow re-review of approved PRs when bot is re-requested
The _approved cache permanently skipped PRs in fetch-prs, so once the
bot approved a PR it would never come back — even after new commits
and an explicit re-request as reviewer.
Mirror the existing reviewer-priority escape hatch used for the
SHA-cache check a few lines down: when the bot is in reviewRequests
on an approved PR, fall through to to_review instead of skipping.
* Clear stale _approved entry on re-request with new commits
The previous commit let re-requested approved PRs fall through to
to_review, but check-can-approve.py also gates on the local _approved
set, so a clean re-review would silently fail to produce a new APPROVE.
When the re-review override fires AND the head SHA differs from the
cached SHA, remove the PR from _approved so the approval gate passes
and the bot can submit a fresh approval at the new commit. Same-SHA
re-requests still skip since there's nothing new to review.
Adds a save_cache helper and cache_dirty tracking in filter_prs so
the cleared _approved state persists to disk.
Compile the Origin .icon packages provided by design into the
channel Assets.car files so macOS 26 uses the liquid glass
rendition while older macOS continues to use the bundled PNG
fallbacks. app.icns files are kept as-is because Xcode 26.3's
actool emits a smaller bitmap set than what is already checked in.
Resolves https://github.com/brave/brave-browser/issues/54739
Introduces enable_playlist (defaults to !is_brave_origin_branded),
following the same pattern as enable_brave_wallet and enable_ai_chat,
to gate all Playlist code from compilation on origin-branded desktop
builds. enable_playlist_webui now chains through enable_playlist.
Changes are scoped to desktop: iOS and Android don't support
is_brave_origin_branded=true (enforced by asserts in
//brave/components/brave_origin/buildflags/buildflags.gni), so they
have no guards.
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.