The PR fixes crash on Android when opening a new tab with dynamic NTT
after the Chromium 149 bump, caused by passing null as attach params.
Co-Authored-By: serg@brave.com
The Brave News inline promoted ads pipeline is already disabled via
https://github.com/brave/brave-core/pull/32359. This PR removes the remaining
promoted content ads Android code and mojom code that no longer has any effect.
* add migration for social media blocking prefs
* move pref change registrar to AdBlockService
* change new preference path to avoid conflict
Settings UI pages automatically check for matching preferences
registered under the profile first. They only check under local state if
nothing was found registered under the profile prefs.
This means we can't use the same preference path after the migration.
* only attempt to migrate settings from regular profiles
The first profile to initialize is the System Profile, which will never
have any meaningful settings to migrate.
* use local state in the tests
* update BraveProfilePrefsBrowserTest
* register legacy prefs as part of `AdBlockPrefService`
* add comment in normal migration path
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/7d3c16b9bb778a09b643288fe47bae4c1d8e53b7
commit 7d3c16b9bb778a09b643288fe47bae4c1d8e53b7
Author: Jingping Sun <jings@microsoft.com>
Date: Mon Apr 27 10:58:12 2026 -0700
[Unchecked] Enable -Xlint:unchecked for Chromium-owned code
Conditionally append -Xlint:unchecked to the base javac flags only when
options.chromium_code is true. This makes javac fail the build on any
new unchecked-conversion / heap-pollution / raw-type warnings in
Chromium-owned Java code, while leaving synced third-party Java sources
(chromium_code=false; auto-defaulted for third_party/ paths without
org.chromium namespace) compiled silently as before.
Why conditional, not global: Synced third-party Java code under
third_party/{junit,google-truth}/ src/ contains unchecked-warning sites
we cannot fix in chromium code base.
Bug: 358366667
Change-Id: I904b09cd4484098cee3b59e6d4aae94eba8d33ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7790536
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Peter Wen <wnwen@chromium.org>
Commit-Queue: Jingping Sun <jings@microsoft.com>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1621171}
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/c66e45550985e3570e1cf181df0ec749ab3d80f6
commit c66e45550985e3570e1cf181df0ec749ab3d80f6
Author: Yanting Yu <yyanting@google.com>
Date: Tue Apr 21 12:43:23 2026 -0700
[LogoRefactor] Branch to LegacyLogoView and introduce feature flag.
This CL branches the current LogoView implementation into LegacyLogoView
to ensure the existing functionality remains intact while we restructure
the new LogoView in the follow up CL.
Changes include:
- Branched LogoView, LogoViewBinder, layout XMLs, and corresponding unit tests into LegacyLogoView equivalents.
- Added the ChromeFeatureList.LOGO_VIEW_REFACTOR feature flag in LogoCoordinator to dynamically switch between inflating the LogoView and the LegacyLogoView.
- Extracted the ClickHandler interface from LogoView into LogoProperties to serve as a shared, domain-specific contract. This cleanly decouples the two views, allowing them to be fully independent while still being driven by the same PropertyModel and LogoMediator.
- Updated new_tab_page_layout.xml to replace the `logo_holder` FrameLayout with ViewStub.
Bug: 492453183
Change-Id: Id0ef80f8acab9c2d15928020eb3688bd9f2afc33
Bypass-Check-License: branched files
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7760153
Commit-Queue: Yanting Yu <yyanting@google.com>
Reviewed-by: Xi Han <hanxi@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1618376}
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/5ee2afaf87b258f0f692c32d17866114a996eb66
commit 5ee2afaf87b258f0f692c32d17866114a996eb66
Author: Zhe Li <zheliooo@google.com>
Date: Mon Apr 20 13:08:32 2026 -0700
[TabFavicon] Do not fallback to host for tab switcher and tab strip
- Guarded behind feature flag sFaviconDisableHostFallback.
- Sets `fallbackToHost = false` in LayerTitleCache.java and TabListFaviconProvider.java when feature is enabled.
- Default `fallbackToHost = true` for all the other callsites.
- Added histograms Favicons.AndroidHostFallbackFetchResult.* in favicon_helper.cc
Bug: 468979189
Change-Id: I5574adf85647c1d5205889dddc2bc42bfba35305
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7745223
Reviewed-by: Theresa Wellington <twellington@chromium.org>
Commit-Queue: Zhe Li <zheliooo@google.com>
Auto-Submit: Zhe Li <zheliooo@google.com>
Cr-Commit-Position: refs/heads/main@{#1617726}
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/5ee2afaf87b258f0f692c32d17866114a996eb66
commit 5ee2afaf87b258f0f692c32d17866114a996eb66
Author: Zhe Li <zheliooo@google.com>
Date: Mon Apr 20 13:08:32 2026 -0700
[TabFavicon] Do not fallback to host for tab switcher and tab strip
- Guarded behind feature flag sFaviconDisableHostFallback.
- Sets `fallbackToHost = false` in LayerTitleCache.java and TabListFaviconProvider.java when feature is enabled.
- Default `fallbackToHost = true` for all the other callsites.
- Added histograms Favicons.AndroidHostFallbackFetchResult.* in favicon_helper.cc
Bug: 468979189
Change-Id: I5574adf85647c1d5205889dddc2bc42bfba35305
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7745223
Reviewed-by: Theresa Wellington <twellington@chromium.org>
Commit-Queue: Zhe Li <zheliooo@google.com>
Auto-Submit: Zhe Li <zheliooo@google.com>
Cr-Commit-Position: refs/heads/main@{#1617726}
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/1527e1c0fa38dfb971603f9f59faf7de58c3f313
commit 1527e1c0fa38dfb971603f9f59faf7de58c3f313
Author: Samuel Huang <huangs@chromium.org>
Date: Wed Apr 8 21:43:14 2026 -0700
[Android NTP] Fix vertical gaps between adjacent main sections
The New Tab Page (NTP) has multiple "sections" that are vertically
stacked. Let's specify these with abbreviations:
* FSB: Fake Search Box.
* AIM: AI Mode Button + Incognito Button, AKA Composeplate.
* MVT: Most Visited Tiles.
* MS: Magic Stack, AKA New Tab Page Cards.
* DF: Discovery Feed.
Note that we're ignoring the Logo (above FSB) and promotion (e.g., for
Sign in) sections.
{MVT, MS, DF} may be absent sometimes:
* NTP Customization can toggle {MVT, MS, DF}.
* MS dynamically appears / disappears.
AIM is now a permanent component of the layout and cannot be optionally
removed.
Let FSB-AIM be the vertical gap between the FSB bottom and AIM top.
Similarly, define other spacings. Since {MVT, MS, DF} may be absent,
there are 7 gap cases: FSB-AIM, AIM-{MVT,MS,DF}, MVT-{MS,DF}, MS-DF.
Recently we found that these gap sizes are inconsistent. This CL fixes
the inconsistency by making FSB-AIM = 8 dp, and everything else 16 dp:
Gap Old Goal
FSB-AIM 9 dp 8 dp
AIM-MVT 25 dp 16 dp
AIM-MS 18 dp 16 dp
AIM-DF 18 dp 16 dp
MVT-MS 16 dp 16 dp
MVT-DF 16 dp 16 dp
MS-DF 16 dp 16 dp
Strategy:
* Assign top margins to 12 dp for {FSB, MVT, MS, DF} and 4 dp for AIM.
* Assign bottom margins to 4 dp. Previously this existed so that
sections can expand to accommodate shadows. This is no longer
needed, but we keep the margin anyway as buffer space.
Note that 4 dp + 12 dp = 16 dp, which will be the standard spacing
between sections; and the FSB-AIM exception is managed by 4 dp + 4 dp.
In a previous CL (crrev.com/c/7603164), we removed the dynamic resizing
logic that was previously required to accommodate the AIM view's shadow.
With that logic removed, we can now rely entirely on these static
margins, greatly simplifying the spacing definitions.
Details:
* For common dimensions define and use:
@dimen/ntp_section_top_margin = 12 dp
@dimen/ntp_section_bottom_margin = 4 dp
* For AIM top margin define and use:
@dimen/composeplate_view_margin_top = 4 dp
* Define "padding" quantities to replace previous uses of
section-specific "margin" quantities for padding.
* Update ShowNtpAtStartupTest to expect the new standardized
@dimen/ntp_section_bottom_margin on the MVT container.
* Bump revisions in TabSwitcherLayoutPTTest and FeedV2NewTabPageTest to
trigger Skia Gold rebaselines for the new spacing.
Bug: 481717794
Change-Id: I77adb4c8980a3bc2e0803a5b6cd0b2ac7a66d48a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7589698
Commit-Queue: Samuel Huang <huangs@chromium.org>
Reviewed-by: Brandon Wylie <wylieb@google.com>
Reviewed-by: Xi Han <hanxi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1611969}
The Brave News inline content ads pipeline is already disabled via
https://github.com/brave/brave-core/pull/32359. This PR removes the
remaining inline content ads Android code and mojom code that no longer
has any effect.
Move BraveConstants.java from org.chromium.chrome.browser.util to
org.chromium.chrome.browser to align with upstream's hierarchy.
Upstream's analogous ChromeStringConstants lives directly under
org.chromium.chrome.browser, and the util package is treated as
deprecated for new top-level constants/utilities.
No behavior changes — pure refactor.
Resolves: https://github.com/brave/brave-browser/issues/55685