diff --git a/BUILD.gn b/BUILD.gn index 9af62206eff9..5372051630f6 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -5,12 +5,16 @@ import("//build/config/locales.gni") import("//build/config/zip.gni") import("//build/util/process_version.gni") import("//extensions/buildflags/buildflags.gni") -import("//media/cdm/library_cdm/cdm_paths.gni") +import("//media/media_options.gni") import("//third_party/icu/config.gni") import("//tools/grit/repack.gni") import("//tools/v8_context_snapshot/v8_context_snapshot.gni") import("//ui/base/ui_features.gni") +if (enable_library_cdms) { + import("//media/cdm/library_cdm/cdm_paths.gni") +} + if (!is_ios) { import("//brave/brave_paks.gni") } diff --git a/android/brave_java_sources.gni b/android/brave_java_sources.gni index bdc53efea585..4602782a9ab9 100644 --- a/android/brave_java_sources.gni +++ b/android/brave_java_sources.gni @@ -346,6 +346,7 @@ brave_java_sources = [ "../../brave/android/java/org/chromium/chrome/browser/upgrade/NotificationIntent.java", "../../brave/android/java/org/chromium/chrome/browser/util/BraveConstants.java", "../../brave/android/java/org/chromium/chrome/browser/util/BraveDbUtil.java", + "../../brave/android/java/org/chromium/chrome/browser/util/BraveDynamicColors.java", "../../brave/android/java/org/chromium/chrome/browser/util/ConfigurationUtils.java", "../../brave/android/java/org/chromium/chrome/browser/util/ImageUtils.java", "../../brave/android/java/org/chromium/chrome/browser/util/LiveDataUtil.java", diff --git a/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/BraveTabGroupUiCoordinator.java b/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/BraveTabGroupUiCoordinator.java index edcec7ed5be2..3330a8954df7 100644 --- a/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/BraveTabGroupUiCoordinator.java +++ b/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/BraveTabGroupUiCoordinator.java @@ -15,6 +15,7 @@ import androidx.annotation.NonNull; import org.chromium.base.ApiCompatibilityUtils; +import org.chromium.base.Callback; import org.chromium.base.supplier.ObservableSupplier; import org.chromium.base.supplier.OneshotSupplier; import org.chromium.base.supplier.Supplier; @@ -85,8 +86,9 @@ public BraveTabGroupUiCoordinator(@NonNull Activity activity, @NonNull ViewGroup @Override public void initializeWithNative(Activity activity, - BottomControlsCoordinator.BottomControlsVisibilityController visibilityController) { - super.initializeWithNative(activity, visibilityController); + BottomControlsCoordinator.BottomControlsVisibilityController visibilityController, + Callback onModelTokenChange) { + super.initializeWithNative(activity, visibilityController, onModelTokenChange); mIncognitoStateObserver = (isIncognito) -> { if (!isIncognito) { diff --git a/android/java/org/chromium/chrome/browser/app/BraveActivity.java b/android/java/org/chromium/chrome/browser/app/BraveActivity.java index 7001d357d9a5..07dd3d1c2ff6 100644 --- a/android/java/org/chromium/chrome/browser/app/BraveActivity.java +++ b/android/java/org/chromium/chrome/browser/app/BraveActivity.java @@ -1610,12 +1610,6 @@ public void initializeCompositor() { ContextUtils.getApplicationContext()); } - @Override - protected boolean supportsDynamicColors() { - // Dynamic colors cause styling issues with Brave theme. - return false; - } - private void InitBraveWalletService() { if (mBraveWalletService != null) { return; diff --git a/android/java/org/chromium/chrome/browser/crypto_wallet/permission/BraveEthereumPermissionPromptDialog.java b/android/java/org/chromium/chrome/browser/crypto_wallet/permission/BraveEthereumPermissionPromptDialog.java index 00fbb847f659..6feb74ab0ef9 100644 --- a/android/java/org/chromium/chrome/browser/crypto_wallet/permission/BraveEthereumPermissionPromptDialog.java +++ b/android/java/org/chromium/chrome/browser/crypto_wallet/permission/BraveEthereumPermissionPromptDialog.java @@ -96,6 +96,9 @@ public BraveEthereumPermissionPromptDialog(long nativeDialogController, } } + // TODO: It is much more efficient to retrieve resources by identifier (e.g. R.foo.bar) than by + // name (e.g. getIdentifier("bar", "foo", null)). + @SuppressLint("DiscouragedApi") @CalledByNative void show() { View customView = LayoutInflaterUtils.inflate( diff --git a/android/java/org/chromium/chrome/browser/settings/BraveSettingsActivity.java b/android/java/org/chromium/chrome/browser/settings/BraveSettingsActivity.java index 68035a6ddd01..88c71ac9e377 100644 --- a/android/java/org/chromium/chrome/browser/settings/BraveSettingsActivity.java +++ b/android/java/org/chromium/chrome/browser/settings/BraveSettingsActivity.java @@ -38,10 +38,4 @@ public boolean onOptionsItemSelected(MenuItem item) { } return super.onOptionsItemSelected(item); } - - @Override - protected boolean supportsDynamicColors() { - // Dynamic colors cause styling issues with Brave theme. - return false; - } } diff --git a/android/java/org/chromium/chrome/browser/toolbar/BraveToolbarManager.java b/android/java/org/chromium/chrome/browser/toolbar/BraveToolbarManager.java index 369b4c381608..3faaa9f3c862 100644 --- a/android/java/org/chromium/chrome/browser/toolbar/BraveToolbarManager.java +++ b/android/java/org/chromium/chrome/browser/toolbar/BraveToolbarManager.java @@ -236,7 +236,7 @@ public void enableBottomControls() { mActivity, mWindowAndroid, mLayoutManager, mCompositorViewHolder.getResourceManager(), mBrowserControlsSizer, mFullscreenManager, mBottomControls, mTabGroupUi, - mOverlayPanelVisibilitySupplier)); + mOverlayPanelVisibilitySupplier, getConstraintsProxy())); mBottomControls.setBottomControlsCoordinatorSupplier( mBottomControlsCoordinatorSupplier); updateBottomToolbarVisibility(); @@ -345,4 +345,13 @@ private boolean isToolbarPhone() { return mToolbar instanceof BraveTopToolbarCoordinator && ((BraveTopToolbarCoordinator) mToolbar).isToolbarPhone(); } + + private ObservableSupplier getConstraintsProxy() { + if (mToolbar instanceof BraveTopToolbarCoordinator) { + return ((BraveTopToolbarCoordinator) mToolbar).getConstraintsProxy(); + } + + assert false : "Wrong top toolbar type!"; + return null; + } } diff --git a/android/java/org/chromium/chrome/browser/toolbar/bottom/BraveBottomControlsCoordinator.java b/android/java/org/chromium/chrome/browser/toolbar/bottom/BraveBottomControlsCoordinator.java index 11ca690c94af..3f1b0effdfd9 100644 --- a/android/java/org/chromium/chrome/browser/toolbar/bottom/BraveBottomControlsCoordinator.java +++ b/android/java/org/chromium/chrome/browser/toolbar/bottom/BraveBottomControlsCoordinator.java @@ -62,9 +62,11 @@ public BraveBottomControlsCoordinator( ResourceManager resourceManager, BrowserControlsSizer controlsSizer, FullscreenManager fullscreenManager, ScrollingBottomViewResourceFrameLayout root, BottomControlsContentDelegate contentDelegate, - ObservableSupplier overlayPanelVisibilitySupplier) { + ObservableSupplier overlayPanelVisibilitySupplier, + ObservableSupplier constraintsSupplier) { super(activity, windowAndroid, layoutManager, resourceManager, controlsSizer, - fullscreenManager, root, contentDelegate, overlayPanelVisibilitySupplier); + fullscreenManager, root, contentDelegate, overlayPanelVisibilitySupplier, + constraintsSupplier); mTabSwitcherLongclickListener = tabSwitcherLongclickListener; mTabProvider = tabProvider; diff --git a/android/java/org/chromium/chrome/browser/toolbar/top/BraveTopToolbarCoordinator.java b/android/java/org/chromium/chrome/browser/toolbar/top/BraveTopToolbarCoordinator.java index 4c8636545812..2c64753467ea 100644 --- a/android/java/org/chromium/chrome/browser/toolbar/top/BraveTopToolbarCoordinator.java +++ b/android/java/org/chromium/chrome/browser/toolbar/top/BraveTopToolbarCoordinator.java @@ -42,6 +42,7 @@ public class BraveTopToolbarCoordinator extends TopToolbarCoordinator { private ToolbarLayout mBraveToolbarLayout; private MenuButtonCoordinator mBraveMenuButtonCoordinator; private boolean mIsBottomToolbarVisible; + private ObservableSupplier mConstraintsProxy; public BraveTopToolbarCoordinator(ToolbarControlContainer controlContainer, ViewStub toolbarStub, ViewStub fullscreenToolbarStub, ToolbarLayout toolbarLayout, @@ -65,7 +66,9 @@ public BraveTopToolbarCoordinator(ToolbarControlContainer controlContainer, HistoryDelegate historyDelegate, BooleanSupplier partnerHomepageEnabledSupplier, OfflineDownloader offlineDownloader, boolean initializeWithIncognitoColors, ObservableSupplier profileSupplier, - Callback startSurfaceLogoClickedCallback) { + Callback startSurfaceLogoClickedCallback, + boolean isStartSurfaceRefactorEnabled, + ObservableSupplier constraintsSupplier) { super(controlContainer, toolbarStub, fullscreenToolbarStub, toolbarLayout, toolbarDataProvider, tabController, userEducationHelper, buttonDataProviders, layoutStateProviderSupplier, normalThemeColorProvider, overviewThemeColorProvider, @@ -77,10 +80,12 @@ public BraveTopToolbarCoordinator(ToolbarControlContainer controlContainer, isTabToGtsAnimationEnabled, isStartSurfaceEnabled, isTabGroupsAndroidContinuationEnabled, historyDelegate, partnerHomepageEnabledSupplier, offlineDownloader, initializeWithIncognitoColors, - profileSupplier, startSurfaceLogoClickedCallback); + profileSupplier, startSurfaceLogoClickedCallback, isStartSurfaceRefactorEnabled, + constraintsSupplier); mBraveToolbarLayout = toolbarLayout; mBraveMenuButtonCoordinator = browsingModeMenuButtonCoordinator; + mConstraintsProxy = constraintsSupplier; if (isToolbarPhone()) { if (!isStartSurfaceEnabled) { @@ -115,4 +120,8 @@ public MenuButton getMenuButtonWrapper() { // We consider that there is no top toolbar menu button, if bottom toolbar is visible. return mIsBottomToolbarVisible ? null : mBraveMenuButtonCoordinator.getMenuButton(); } + + public ObservableSupplier getConstraintsProxy() { + return mConstraintsProxy; + } } diff --git a/android/java/org/chromium/chrome/browser/util/BraveDynamicColors.java b/android/java/org/chromium/chrome/browser/util/BraveDynamicColors.java new file mode 100644 index 000000000000..8f2d8d444825 --- /dev/null +++ b/android/java/org/chromium/chrome/browser/util/BraveDynamicColors.java @@ -0,0 +1,21 @@ +/* Copyright (c) 2022 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +package org.chromium.chrome.browser.util; + +import android.app.Activity; + +import com.google.android.material.color.DynamicColorsOptions; + +public class BraveDynamicColors { + public static void applyToActivityIfAvailable(Activity activity) { + // We disable dynamic colors as it causes styling issues with Brave theme. + } + + public static void applyToActivityIfAvailable( + Activity activity, DynamicColorsOptions dynamicColorsOptions) { + // We disable dynamic colors as it causes styling issues with Brave theme. + } +} diff --git a/android/javatests/org/chromium/chrome/browser/BytecodeTest.java b/android/javatests/org/chromium/chrome/browser/BytecodeTest.java index 01aa91671583..7192861399ef 100644 --- a/android/javatests/org/chromium/chrome/browser/BytecodeTest.java +++ b/android/javatests/org/chromium/chrome/browser/BytecodeTest.java @@ -9,6 +9,7 @@ import android.content.Context; import android.content.res.Resources; import android.os.Handler; +import android.util.AttributeSet; import android.view.ActionMode; import android.view.View; import android.view.ViewGroup; @@ -571,7 +572,7 @@ public void testConstructorsExistAndMatch() throws Exception { ObservableSupplier.class, BooleanSupplier.class, boolean.class, boolean.class, boolean.class, boolean.class, boolean.class, HistoryDelegate.class, BooleanSupplier.class, OfflineDownloader.class, boolean.class, - ObservableSupplier.class, Callback.class)); + ObservableSupplier.class, Callback.class, boolean.class, ObservableSupplier.class)); Assert.assertTrue(constructorsMatch( "org/chromium/chrome/browser/toolbar/menu_button/MenuButtonCoordinator", "org/chromium/chrome/browser/toolbar/menu_button/BraveMenuButtonCoordinator", @@ -609,7 +610,7 @@ public void testConstructorsExistAndMatch() throws Exception { Assert.assertTrue(constructorsMatch( "org/chromium/chrome/browser/share/send_tab_to_self/ManageAccountDevicesLinkView", "org/chromium/chrome/browser/share/send_tab_to_self/BraveManageAccountDevicesLinkView", - Context.class)); + Context.class, AttributeSet.class)); Assert.assertTrue(constructorsMatch( "org/chromium/chrome/browser/suggestions/tile/MostVisitedTilesMediator", "org/chromium/chrome/browser/suggestions/tile/BraveMostVisitedTilesMediator", diff --git a/app/app_management_strings.grdp b/app/app_management_strings.grdp index c2c43e89497f..987d15e0a8ad 100644 --- a/app/app_management_strings.grdp +++ b/app/app_management_strings.grdp @@ -163,7 +163,7 @@ You can open and edit supported files with this app from the File Explorer or other apps. To control which files open in this app by default, go to <a href="#">Windows settings</a>. - + You can open and edit supported files with this app from the Files app or other apps. To control which files open this app by default, <a href="#">learn how to set default apps on your device</a>. diff --git a/app/app_management_strings_override.grdp b/app/app_management_strings_override.grdp index 97a65fabd92c..b1dcdb00a238 100644 --- a/app/app_management_strings_override.grdp +++ b/app/app_management_strings_override.grdp @@ -5,7 +5,7 @@ - + diff --git a/app/brave_main_delegate_browsertest.cc b/app/brave_main_delegate_browsertest.cc index c7b335788da1..8979b5251f95 100644 --- a/app/brave_main_delegate_browsertest.cc +++ b/app/brave_main_delegate_browsertest.cc @@ -7,7 +7,7 @@ #include "build/build_config.h" #include "chrome/browser/domain_reliability/service_factory.h" #include "chrome/browser/enterprise/connectors/analysis/content_analysis_features.h" -#include "chrome/browser/prefetch/prefetch_proxy/prefetch_proxy_features.h" +#include "chrome/browser/preloading/prefetch/prefetch_proxy/prefetch_proxy_features.h" #include "chrome/common/chrome_features.h" #include "chrome/common/chrome_switches.h" #include "chrome/test/base/chrome_test_utils.h" @@ -89,6 +89,7 @@ IN_PROC_BROWSER_TEST_F(BraveMainDelegateBrowserTest, DisabledFeatures) { &autofill::features::kAutofillUpstreamAllowAdditionalEmailDomains, &blink::features::kAdInterestGroupAPI, &blink::features::kAllowURNsInIframes, + &blink::features::kAnonymousIframeOriginTrial, &blink::features::kBrowsingTopics, &blink::features::kClientHintsMetaEquivDelegateCH, &blink::features::kComputePressure, @@ -141,6 +142,7 @@ IN_PROC_BROWSER_TEST_F(BraveMainDelegateBrowserTest, DisabledFeatures) { &history_clusters::internal::kOmniboxAction, &history_clusters::internal::kPersistContextAnnotationsInHistoryDb, &lens::features::kLensStandalone, + &lens::features::kLensUnifiedSidePanelFooter, &media::kLiveCaption, &net::features::kNoncedPartitionedCookies, &net::features::kPartitionedCookies, @@ -150,8 +152,10 @@ IN_PROC_BROWSER_TEST_F(BraveMainDelegateBrowserTest, DisabledFeatures) { &optimization_guide::features::kRemoteOptimizationGuideFetching, &optimization_guide::features:: kRemoteOptimizationGuideFetchingAnonymousDataConsent, + &password_manager::features::kUnifiedPasswordManagerDesktop, #if !BUILDFLAG(IS_ANDROID) &permissions::features::kPermissionsPostPromptSurvey, + &permissions::features::kRecordPermissionExpirationTimestamps, #endif &permissions::features::kPermissionOnDeviceNotificationPredictions, &privacy_sandbox::kOverridePrivacySandboxSettingsLocalTesting, diff --git a/app/chromeos_shared_strings.grdp b/app/chromeos_shared_strings.grdp index 0631be6591f3..73619c0a8a90 100644 --- a/app/chromeos_shared_strings.grdp +++ b/app/chromeos_shared_strings.grdp @@ -1,7 +1,7 @@ + Everything in this file is wrapped in . --> @@ -47,4 +47,9 @@ Read and write access to $1FooBar 4GB has been granted. + + + Parallels Desktop + + diff --git a/app/extensions_strings.grdp b/app/extensions_strings.grdp index 41ce434455ed..9e6eef3470b7 100644 --- a/app/extensions_strings.grdp +++ b/app/extensions_strings.grdp @@ -311,6 +311,9 @@ Source + + Installed by default + Added by policy @@ -404,6 +407,9 @@ All sites + + $1 extensions + All extensions allowed diff --git a/app/generated_resources.grd b/app/generated_resources.grd index aa39c97c669b..66a0f4128fc3 100644 --- a/app/generated_resources.grd +++ b/app/generated_resources.grd @@ -293,7 +293,7 @@ are declared in tools/grit/grit_rule.gni. - + @@ -329,6 +329,11 @@ are declared in tools/grit/grit_rule.gni. + + + + + @@ -344,10 +349,6 @@ are declared in tools/grit/grit_rule.gni. - - - - - + Request mobile site @@ -1743,7 +1744,7 @@ are declared in tools/grit/grit_rule.gni. Starting... - + Downloading $1somedocument.pdf @@ -1913,19 +1914,19 @@ are declared in tools/grit/grit_rule.gni. This file is encrypted. Ask its owner to decrypt. - + Insecure download blocked - + Dangerous download blocked - + Scan file before opening? @@ -2799,9 +2800,6 @@ are declared in tools/grit/grit_rule.gni. Start menu - - Quick launch bar - Pin to Taskbar @@ -3196,7 +3194,10 @@ are declared in tools/grit/grit_rule.gni. Certificate Signature Value - E&xport selected certificate... + E&xport... + + + Export selected certificate @@ -4039,7 +4040,7 @@ are declared in tools/grit/grit_rule.gni. Reload the page to use these extensions - + Reload the page to apply your changes @@ -4638,7 +4639,7 @@ are declared in tools/grit/grit_rule.gni. Could not load '$1/path/to/file' for theme. - + $1Brave Keep installed @@ -4766,6 +4767,18 @@ are declared in tools/grit/grit_rule.gni. You previously chose to not allow any extensions on $1google.com + + When I click the extension + + + Always on $1google.com + + + Always on all sites + + + Manage site permissions + When you click the extension @@ -4809,7 +4822,7 @@ are declared in tools/grit/grit_rule.gni. When I click the extension - Always + Always on this site Always on all sites @@ -4828,6 +4841,18 @@ are declared in tools/grit/grit_rule.gni. You Previously Chose To Not Allow Any Extensions On $1google.com + + When I Click the Extension + + + Always on $1google.com + + + Always on All Sites + + + Manage Site Permissions + When You Click the Extension @@ -4880,7 +4905,7 @@ are declared in tools/grit/grit_rule.gni. When I Click the Extension - Always + Always on This Site Always on All Sites @@ -5141,9 +5166,26 @@ Keep your key file in a safe place. You will need it to create new versions of y - - Old versions of Brave Apps won't open after December 2022. Contact your administrator to update to a new version or remove this app. - + + + Old versions of Brave Apps won't open on Mac devices after December 2022. Contact your administrator to update to a new version or remove this app. + + + + + Old versions of Brave Apps won't open on Windows devices after December 2022. Contact your administrator to update to a new version or remove this app. + + + + + Old versions of Brave Apps won't open on Linux devices after December 2022. Contact your administrator to update to a new version or remove this app. + + + + + Old versions of Brave Apps won't open after December 2022. Contact your administrator to update to a new version or remove this app. + + @@ -5152,9 +5194,26 @@ Keep your key file in a safe place. You will need it to create new versions of y "$1Google Docs" is no longer supported - - Old versions of Brave apps won't open after December 2022. You can check if there's a new version available. - + + + Old versions of Brave apps won't open on Mac devices after December 2022. You can check if there's a new version available. + + + + + Old versions of Brave apps won't open on Windows devices after December 2022. You can check if there's a new version available. + + + + + Old versions of Brave apps won't open on Linux devices after December 2022. You can check if there's a new version available. + + + + + Old versions of Brave apps won't open after December 2022. You can check if there's a new version available. + + Learn more @@ -5232,7 +5291,7 @@ Keep your key file in a safe place. You will need it to create new versions of y Allowed to read and change $1google.com - Requested to read and change $1google.com + Requesting to read and change $1google.com To allow an extension, change your default setting below. @@ -5368,7 +5427,7 @@ Keep your key file in a safe place. You will need it to create new versions of y App Settings - + App settings @@ -5521,7 +5580,7 @@ Keep your key file in a safe place. You will need it to create new versions of y Saved password - + Save password? @@ -6280,6 +6339,9 @@ Keep your key file in a safe place. You will need it to create new versions of y Your administrator has set a default theme which cannot be changed. + + Pick a theme color + Default color @@ -6349,6 +6411,9 @@ Keep your key file in a safe place. You will need it to create new versions of y Dark purple + + You won't see this specific message again + @@ -6769,6 +6834,12 @@ Keep your key file in a safe place. You will need it to create new versions of y Google Lens + + Side Panel Resize Handle + + + Customize Brave + @@ -6787,6 +6858,9 @@ Keep your key file in a safe place. You will need it to create new versions of y Increase font-size + + Theme + @@ -6925,7 +6999,7 @@ Keep your key file in a safe place. You will need it to create new versions of y Open in app - + Always use the $1YouTube app to open supported web links? @@ -7172,6 +7246,16 @@ Keep your key file in a safe place. You will need it to create new versions of y Right-click on a tab and select "Add tab to new group" + + + Right-click on a tab and select "Add Tab To Group" and then select "New Group" + + + + + Right-click on a tab and select "Add tab to group" and then select "New group" + + Name your group, choose a color, then press Esc @@ -7468,7 +7552,7 @@ Check your passwords anytime in $1Brave P - + Save @@ -8019,7 +8103,7 @@ Check your passwords anytime in $1Brave P Unfollow site - + $1Brave News belongs to desk $2School @@ -8414,7 +8498,7 @@ Check your passwords anytime in $1Brave P Send feedback - + Either Brave ran out of memory or the process for the webpage was terminated for some other reason. To continue, reload or go to another page. @@ -8776,6 +8860,9 @@ Check your passwords anytime in $1Brave P Edit + + Search with Brave + Share @@ -9406,6 +9493,20 @@ Check your passwords anytime in $1Brave P + + + Welcome, $1Bob + + + Turn on sync to get your bookmarks, passwords, history, and more on this device and anywhere else you're syncing. + + + Manage sync + + + Turn on sync + + Sync is disabled by your administrator @@ -11262,7 +11363,10 @@ Please help our engineers fix this problem. Tell us what happened right before y $1Brave Search - Part of group $2 - + + $1Brave Search - Pinned + + $1Brave Search - Permission requested, press Ctrl + Forward to respond @@ -11272,7 +11376,7 @@ Please help our engineers fix this problem. Tell us what happened right before y $1Brave Search - Permission requested, press ⌘ + Option + Up arrow to respond - + $1Brave Search - Permission requested, press F6 to respond @@ -11736,9 +11840,6 @@ Please help our engineers fix this problem. Tell us what happened right before y Quarantine Service - - System Signals Utilities - @@ -11759,6 +11860,12 @@ Please help our engineers fix this problem. Tell us what happened right before y Open Anyway + + + System Signals Utilities + + + @@ -11987,6 +12094,20 @@ Please help our engineers fix this problem. Tell us what happened right before y Choose a different file + + + Save $1filename.exe? + + + This type of file can be dangerous. Only save this file if you trust $1example.com + + + Don't save + + + Save + + @@ -12137,8 +12258,8 @@ Please help our engineers fix this problem. Tell us what happened right before y accounts.google.com$1 sent a notification to your phone. To confirm it's you, tap the “Verify with this phone$2” notification and follow the steps. - - Add a new Android phone + + Use phone with a QR code @@ -12821,6 +12942,12 @@ Please help our engineers fix this problem. Tell us what happened right before y Drag over any image to search + + Select image area to search + + + Select any part of the page to search + Thumbnail tab strip for tablet mode @@ -13051,6 +13178,21 @@ Please help our engineers fix this problem. Tell us what happened right before y Opening $1example.com... + + Successfully changed the compromised password + + + Check your passwords anytime in $1Brave Password Manager. + + + Done + + + Something went wrong. + + + Check the site and try changing your password. + diff --git a/app/generated_resources_override.grd b/app/generated_resources_override.grd index 2d1eae15ca42..4712611d8c1b 100644 --- a/app/generated_resources_override.grd +++ b/app/generated_resources_override.grd @@ -97,7 +97,7 @@ are declared in tools/grit/grit_rule.gni. - + @@ -123,6 +123,9 @@ are declared in tools/grit/grit_rule.gni. + + + @@ -134,9 +137,6 @@ are declared in tools/grit/grit_rule.gni. - - - @@ -144,11 +144,11 @@ are declared in tools/grit/grit_rule.gni. - + - + @@ -225,7 +225,7 @@ are declared in tools/grit/grit_rule.gni. - + @@ -246,19 +246,19 @@ are declared in tools/grit/grit_rule.gni. - + - + - + - + @@ -473,7 +473,7 @@ are declared in tools/grit/grit_rule.gni. - + @@ -503,6 +503,22 @@ are declared in tools/grit/grit_rule.gni. This extension is not listed in the $1Web Store and may have been added without your knowledge. + + + + + + + + + + + + + + + + @@ -512,7 +528,7 @@ are declared in tools/grit/grit_rule.gni. - + @@ -593,7 +609,7 @@ are declared in tools/grit/grit_rule.gni. - + @@ -616,6 +632,10 @@ are declared in tools/grit/grit_rule.gni. To browse privately, click the dots icon menu to open a Private window + + + + @@ -701,7 +721,7 @@ are declared in tools/grit/grit_rule.gni. - + @@ -734,7 +754,7 @@ are declared in tools/grit/grit_rule.gni. - + @@ -958,11 +978,11 @@ are declared in tools/grit/grit_rule.gni. - + - + @@ -997,6 +1017,9 @@ are declared in tools/grit/grit_rule.gni. + + + diff --git a/app/mac/BUILD.gn b/app/mac/BUILD.gn index a6fe189b1674..1e4e73b505d0 100644 --- a/app/mac/BUILD.gn +++ b/app/mac/BUILD.gn @@ -1,7 +1,7 @@ import("//brave/build/config.gni") import("//build/util/branding.gni") -import("//build/util/version.gni") import("//chrome/common/features.gni") +import("//chrome/version.gni") chrome_framework_name = chrome_product_full_name + " Framework" chrome_helper_name = chrome_product_full_name + " Helper" diff --git a/app/os_settings_search_tag_strings.grdp b/app/os_settings_search_tag_strings.grdp index 801976ace2ca..f1593000661d 100644 --- a/app/os_settings_search_tag_strings.grdp +++ b/app/os_settings_search_tag_strings.grdp @@ -230,6 +230,9 @@ Disable Fast Pair + + Saved devices + @@ -718,30 +721,6 @@ Desktop - - Screen saver - - - Turn off screen saver - - - Disable screen saver - - - Choose screen saver background - - - Turn on screen saver - - - Enable screen saver - - - Google Photos album - - - Art gallery album - @@ -1338,7 +1317,7 @@ Startup sound - Play sound on startup + Play sound on device startup Caption preferences diff --git a/app/os_settings_strings.grdp b/app/os_settings_strings.grdp index 5dae2bf7a9d4..26f798acab2b 100644 --- a/app/os_settings_strings.grdp +++ b/app/os_settings_strings.grdp @@ -64,6 +64,9 @@ Restart and reset + + Restart and get automatic updates + Nearly up to date! Restart your device to finish updating. @@ -208,6 +211,12 @@ Your $1Chromebook is up to date + + Your device is not up to date + + + Your device may no longer work properly and may experience security and performance issues. + Updates are managed by your administrator @@ -273,6 +282,10 @@ Apps + + + Web apps are synced with Brave browser on non-Chrome OS devices + Printers @@ -579,6 +592,9 @@ Predictive writing + + Show accent marks and special characters + Keyboard layout @@ -714,15 +730,6 @@ Change device account image - - Screen saver - - - Enabled - - - Disabled - Set your wallpaper & style @@ -730,80 +737,6 @@ Personalize wallpaper, screen saver, accent colors, and more - - - When your screen is idle, show photos, time, weather, and media info. Enabling screen saver will keep your display on while charging. - - - On - - - Off - - - Background - - - Google Photos - - - Choose your favorite photos and albums - - - To create albums, go to Google Photos - - - Art gallery - - - Select curated artwork and images - - - $1Google Photos $2Select your memories selected, press Enter to select $1Google Photos albums - - - Select $1Google Photos $2Select your memories - - - Select $1Google Photos albums - - - Relive your favorite memories. To add or edit albums, go to <a target="_blank" href="$1https://google.com/">Google Photos</a>. - - - No albums. Create an album in <a target="_blank" href="$1https://google.com/">Google Photos</a>. - - - Your best photos, selected automatically - - - $1100 photos - - - $11 photo - - - Album $1Recent highlights $2Your best auto selected photos selected - - - Select album $1Recent highlights $2Your best auto selected photos - - - A minimum of one Art gallery album needs to be selected - - - Got it - - - Weather - - - Fahrenheit - - - Celsius - - Preferred search engine @@ -908,21 +841,24 @@ - Show navigation buttons + Show navigation buttons in tablet mode - Navigate home, back, and switch apps with buttons in tablet mode. Turned on when ChromeVox or Automatic clicks is enabled. + Use on-screen buttons to navigate home, back, and switch apps. Turns on automatically if ChromeVox or automatic clicks is turned on. - Always show accessibility options in the system menu + Show accessibility options in Quick Settings + + + Accessibility features make your device easier to use. To access Quick Settings, select the time on the bottom of your screen. Show large mouse cursor - Adjust cursor size + Cursor size Default @@ -958,25 +894,40 @@ Pink - Use high contrast mode + Color inversion + + + Turn light screens dark, and dark screens light. Press Search + Ctrl + H to turn color inversion on and off. - Enable sticky keys (to perform keyboard shortcuts by typing them sequentially) + Sticky keys + + + Press one key at a time for keyboard shortcuts instead of holding keys down at the same time - Enable ChromeVox (spoken feedback) + ChromeVox + + + Hear spoken feedback so you can use your device without looking at the screen. Braille feedback is available with a connected device. + + + Hear spoken feedback so you can use your device without looking at the screen. Braille feedback is available with a connected device. Use Ctrl + Alt + Z to turn ChromeVox on and off. Use Search + Left arrow or Right arrow to navigate. Use Search + Space to select (activate). - Open ChromeVox settings + ChromeVox settings - Open ChromeVox tutorial + ChromeVox tutorial - Enable fullscreen magnifier + Full-screen magnifier - - Press Ctrl+$1Search+M to turn fullscreen magnifier on or off. Press Ctrl+Alt+Arrow keys to move around when zoomed in. + + Zoom in to make items on the screen bigger. Use Search + Ctrl + M to turn magnifier on and off. + + + Zoom in to make items on the screen bigger. Use Search + Ctrl + M to turn magnifier on and off. Use Ctrl + Alt + Arrow keys to move around when zoomed in. Move screen continuously as mouse moves @@ -994,11 +945,14 @@ Fullscreen zoom level - Press Ctrl+Alt+Brightness up to zoom in, -and Ctrl+Alt+Brightness down to zoom out. + Use Ctrl + Alt + Brightness up to zoom in. +Use Ctrl + Alt + Brightness down to zoom out. - Enable docked magnifier + Docked magnifier + + + Use a split-screen view to see the magnified area of your screen. Use Search + Ctrl + D to turn docked magnifier on and off. Docked zoom level: @@ -1037,6 +991,9 @@ and Ctrl+Alt+Brightness down to zoom out. Enable tap dragging + Automatic clicks + + Automatically click when the cursor stops @@ -1060,11 +1017,11 @@ and Ctrl+Alt+Brightness down to zoom out. Revert to left click after action - - Stabilize click location + + Ignore minor cursor movement - Movement threshold + Cursor area size Extra small @@ -1088,7 +1045,7 @@ and Ctrl+Alt+Brightness down to zoom out. Enable dictation (speak to type) - Type with your voice. Press Search + D, then start speaking. + Type with your voice. Use Search + D, then start speaking. Downloading speech recognition files... $117% @@ -1145,13 +1102,19 @@ and Ctrl+Alt+Brightness down to zoom out. $1English (not selected) - Enable on-screen keyboard + On-screen keyboard + + + Select a text field to open the keyboard. You can also select the Keyboard icon on the bottom of your screen. - Play the same audio through all speakers (mono audio) + Mono audio + + + Play the same audio through all speakers - Play sound on startup + Play sound on device startup Display @@ -1160,22 +1123,34 @@ and Ctrl+Alt+Brightness down to zoom out. Enable accessibility features to make your device easier to use. <a>Learn more</a> - Highlight the text caret when it appears or moves + Highlight text cursor + + + Cursor is highlighted when it appears or moves + + + Navigate with text cursor (caret browsing) + + + Use the arrow keys to move through items letter by letter Highlight the mouse cursor when it's moving - Highlight the object with keyboard focus when it changes + Highlight item with keyboard focus + + + Item is highlighted when you move focus. Press tab or select an item to change focus. - Enable select-to-speak + Select-to-speak - Hear selected text + Hear specific text read aloud. First, select the Select-to-speak icon on the bottom of your screen, then highlight text. - Highlight what you want to hear, then press Search + S. You can also press and hold the Search key, or tap the Select-to-Speak icon near the status tray to make a selection. + Hear specific text read aloud. First, select the Select-to-speak icon on the bottom of your screen, then highlight text. You can also use a keyboard shortcut: Highlight text, then press Search + S. Tap the Select-to-Speak icon near your profile image, then select what you want to hear. @@ -1184,10 +1159,13 @@ and Ctrl+Alt+Brightness down to zoom out. Open select-to-speak settings - Switch Access (control the computer with just one or two switches) + Switch Access + + + Control your device with one or more switches. Switches can be keyboard keys, gamepad buttons, or dedicated devices. - Switch Access options + Switch Access settings Switch Access settings @@ -1417,46 +1395,43 @@ Press an assigned switch or key to remove assignment. Text-to-Speech - Open display device settings + Display settings - Allows you to adjust your screen resolution + Change display size to make items on your screen smaller or larger - Open appearance settings + Website text size and font - Customize your text size + Customize text size and font for the web browser Keyboard and text input - Open keyboard device settings + Keyboard settings - Allows you to adjust your keyboard repeat rate, word prediction, and more + Change keyboard key mapping, function keys, and more Mouse and touchpad - Open mouse and touchpad device settings - - - Allows you to enable/disable tap-to-click and tap dragging + Mouse and touchpad settings Audio and captions - Add additional features + Find more accessibility tools in the Web Store Text-to-Speech voice settings - Select and customize text-to-speech voices + Select and customize text-to-speech voices for ChromeVox and Select-to-speak Preferred Voices @@ -1534,25 +1509,25 @@ Press an assigned switch or key to remove assignment. Display and magnification - High-contrast mode, magnifier, and display settings + Color inversion, magnifier, and display settings Keyboard and text input - Sticky keys, on-screen keyboard, dictation, switch access, and enhanced highlight + On-screen keyboard, dictation, Switch Access, and more Cursor and touchpad - Automatic click, cursor size, cursor color, and highlight cursor + Automatic clicks, cursor size, cursor color, and more Audio and captions - Mono audio, sounds on startup, and captions + Mono audio, startup, Live Caption, and more @@ -1989,6 +1964,9 @@ Press an assigned switch or key to remove assignment. Google Play Store + + Turn on Google Play Store + Manage Android preferences @@ -2206,6 +2184,27 @@ Press an assigned switch or key to remove assignment. Devices saved to your account + + Cancel + + + Remove + + + Remove $1Beats from $2john@google.com? + + + Cancel + + + Forget + + + $1Beats will be removed from this Chromebook and won’t be saved to $2john@google.com. + + + Forget device + Connect to Bluetooth device @@ -2233,7 +2232,18 @@ Press an assigned switch or key to remove assignment. Fast Pair devices saved to $1john@google.com - + + Remove from account + + + No devices saved to $1example@google.com + + + Device $11 of $215, $3Beats + + + More actions for $1Beats + @@ -2265,6 +2275,9 @@ Press an assigned switch or key to remove assignment. Volume + + Device + @@ -3308,7 +3321,7 @@ Press an assigned switch or key to remove assignment. You can't view your phone's notifications on this managed account. Try again with a different account. <a target="_blank" href="$1https://google.com/">Learn more</a> - You can now view your phone's recent photos, media, notifications, and apps + You can now view your phone's recent photos, media, notifications, and apps You can now view your phone's recent photos, media, and notifications @@ -3317,22 +3330,22 @@ Press an assigned switch or key to remove assignment. You can now view your phone's notifications and apps - You can now view your phone's recent photos, media, and apps + You can now view your phone's recent photos, media, and apps You can now view your phone's recent photos and media - You can now view your phone's notifications + You can now view your phone's notifications - You can now view your phone's apps + You can now view your phone's apps You can set up more features in Phone Hub settings - + - Permission still needed to complete setup + Permission still needed to complete setup Learn more about Phone Hub @@ -3346,7 +3359,7 @@ Press an assigned switch or key to remove assignment. Hide sensitive content - Show lock screen when waking from sleep + Lock in sleep mode or when cover is closed Screen lock @@ -3458,6 +3471,12 @@ Press an assigned switch or key to remove assignment. Enter your password to configure security and sign-in + + Local data recovery + + + Local data can be restored if you forget your password + diff --git a/app/os_settings_strings_override.grdp b/app/os_settings_strings_override.grdp index 1592c63a8696..81565add4f35 100644 --- a/app/os_settings_strings_override.grdp +++ b/app/os_settings_strings_override.grdp @@ -10,6 +10,9 @@ Manage other profiles + + Find more accessibility tools in the Web Store + diff --git a/app/password_manager_ui_strings.grdp b/app/password_manager_ui_strings.grdp new file mode 100644 index 000000000000..e642c99f0081 --- /dev/null +++ b/app/password_manager_ui_strings.grdp @@ -0,0 +1,7 @@ + + + + + Password Manager + + diff --git a/app/printing_strings.grdp b/app/printing_strings.grdp index 30abd958316b..9dfc4c682dd8 100644 --- a/app/printing_strings.grdp +++ b/app/printing_strings.grdp @@ -262,7 +262,7 @@ These settings are enforced by your administrator - + Save to Google Drive @@ -335,7 +335,7 @@ other {Exceeds limit of {COUNT} sheets of paper}} - + Print using system dialog... $1(Shift+Ctrl+P) diff --git a/app/profiles_strings.grdp b/app/profiles_strings.grdp index 3bca371a3339..b11b815c14bd 100644 --- a/app/profiles_strings.grdp +++ b/app/profiles_strings.grdp @@ -151,6 +151,9 @@ Manage profiles + + Your administrator has disabled other profiles + Customize profile @@ -490,6 +493,9 @@ Done + + Pick a theme color + Welcome, $1Bob @@ -499,6 +505,9 @@ Skip + + Welcome! + diff --git a/app/settings_brave_strings.grdp b/app/settings_brave_strings.grdp index 0b743bdcbd27..758a9b60f48a 100644 --- a/app/settings_brave_strings.grdp +++ b/app/settings_brave_strings.grdp @@ -36,9 +36,6 @@ ChromeOS version - - To see if your device is up to date, go to <a href="chrome://os-settings/help">ChromeOS Settings</a> - Get help with ChromeOS @@ -97,15 +94,6 @@ - - - - - If a setting doesn't show on this page, look in your <a href="$1https://google.com/"> - ChromeOS settings</a> - - - To fix spelling errors, Brave sends the text you type in text fields to Brave @@ -114,7 +102,7 @@ To apply your changes, relaunch Brave - + Allow Brave sign-in @@ -127,7 +115,7 @@ Open PDFs in Brave - + When on, you'll also be signed out of Brave diff --git a/app/settings_brave_strings_override.grdp b/app/settings_brave_strings_override.grdp index 291092232a91..93563ab9dd27 100644 --- a/app/settings_brave_strings_override.grdp +++ b/app/settings_brave_strings_override.grdp @@ -11,13 +11,10 @@ - + - - - - + diff --git a/app/settings_strings.grdp b/app/settings_strings.grdp index 03bd17a9e2bd..0f231a937f2d 100644 --- a/app/settings_strings.grdp +++ b/app/settings_strings.grdp @@ -125,12 +125,12 @@ Disabled - + Browser themes - + Theme @@ -149,7 +149,7 @@ Use Classic - + Reset to default @@ -272,6 +272,18 @@ + + show passwords + + + copy passwords + + + edit passwords + + + export passwords + Autofill @@ -320,9 +332,15 @@ Edit in Google Pay + + Virtual card available + (Virtual card enabled) + + Virtual card turned on + Remove your virtual card @@ -602,8 +620,8 @@ Make sure you're saving your current password for this site - - Save in your Brave sync chain ($1username@gmail.com) + + Save to Brave Password Manager ($1username@gmail.com) Copy password @@ -766,8 +784,66 @@ Choose file - - To import passwords, select a CSV file. + + To import passwords, select a CSV file + + + To import passwords to Brave Password Manager for elisa.g.becket@gmail.com$1, select a CSV file + + + To import passwords to Brave Password Manager on this device, select a CSV file + + + {NUM_PASSWORDS, plural, + =1 {1 password imported to Brave Password Manager on this device} + other {{NUM_PASSWORDS} passwords imported to Brave Password Manager on this device}} + + + {NUM_PASSWORDS, plural, + =1 {1 password imported to Brave Password Manager for elisa.g.becket@gmail.com$1} + other {{NUM_PASSWORDS} passwords imported to Brave Password Manager for elisa.g.becket@gmail.com$1}} + + + Select where to import your passwords + + + Consider deleting file_name.csv$1, so others who use this device can't see your passwords. + + + Something went wrong and your passwords weren't imported + + + Can't import passwords. Check file_name.csv$1 and make sure it's formatted correctly. + + + Can't import passwords. You can only import up to 3000$1 passwords at a time. + + + A password is required + + + A URL is required + + + URL format should be https://www.example.com + + + Username is more than 1000 characters + + + Password is more than 1000 characters + + + A password for this account is already stored in your Brave Password Manager (elisa.g.becket@gmail.com$1) + + + A password for this account is already stored on this device + + + Passwords not imported (42$1) + + + You're already importing passwords in another tab Export passwords... @@ -817,6 +893,31 @@ Your passwords are encrypted on your device before they‘re saved to Brave Password Manager + + + + Manage passkeys + + + To manage passkeys, use a newer version of Windows + + + Passkeys + + + These passkeys are stored in Windows Hello on this computer. They aren't saved to your Brave sync chain. + + + Search passkeys + + + Can't delete passkey + + + You need this passkey to sign in to your computer + + + Show password for $1example@gmail.com on $2www.google.com @@ -825,7 +926,7 @@ - + Default browser @@ -1015,7 +1116,7 @@ There was an error while trying to write the file: $1Permission denied.. - + Certificates are being provisioned for these certificate profiles @@ -1280,14 +1381,17 @@ Show language options - - Order languages based on your preference + + Websites will show content in your preferred languages, when possible Offer to translate pages in this language - Offer to translate pages that aren't in a language you read + Use Brave Translate + + + When on, Brave Translate will offer to translate sites into your preferred language. It can also automatically translate sites. This language is used when translating pages @@ -1301,6 +1405,12 @@ No languages added + + Brave Translate + + + Translate into this language + Automatically translate these languages @@ -1390,7 +1500,7 @@ More - + Manage secure DNS in ChromeOS Flex settings @@ -1767,9 +1877,15 @@ Warning + + Review sites that recently sent a lot of notifications + Review + + Permissions removed from unused websites + Updates @@ -2199,9 +2315,6 @@ No inactive shortcuts - - Other search engines - Other saved search engines will appear here @@ -2220,9 +2333,6 @@ Inactive sites - - Keyword - Shortcut @@ -3008,20 +3118,20 @@ Ask when a site tries to download files automatically after the first file (recommended) - - Sites usually open and place windows to show additional documents or fullscreen content on your screens + + Sites usually ask for information about your displays so they can open and place windows intelligently, like showing documents or full-screen content side by side - - Sites can ask to use info about your screens to open and place windows + + Sites can ask to manage windows on all your displays - - Don't allow sites use info about your screens to open and place windows + + Don't allow sites to manage windows on all your displays - - Allowed to use info about your screens to open and place windows + + Allowed to manage windows on all your displays - - Not allowed to use info about your screens to open and place windows + + Not allowed to manage windows on all your displays Block sites from knowing when you're actively using this device @@ -3546,7 +3656,7 @@ Control how your browsing history is used to personalize Search and more - + Import bookmarks and settings @@ -3653,7 +3763,7 @@ System - + Use hardware acceleration when available diff --git a/app/settings_strings_override.grdp b/app/settings_strings_override.grdp index 6d323d3ef79e..a83bb37d4712 100644 --- a/app/settings_strings_override.grdp +++ b/app/settings_strings_override.grdp @@ -30,13 +30,13 @@ - + - + - + Show bookmarks @@ -50,11 +50,14 @@ - + + + + - + @@ -71,7 +74,7 @@ - + @@ -137,12 +140,12 @@ - + - + diff --git a/app/shared_settings_strings.grdp b/app/shared_settings_strings.grdp index cb3bbe6173f4..36fb6c73b179 100644 --- a/app/shared_settings_strings.grdp +++ b/app/shared_settings_strings.grdp @@ -375,7 +375,7 @@ - + Your data will be synced across all Brave browsers where you have turned on sync for this account. For ChromeOS sync options, go to <a>ChromeOS settings</a>. @@ -396,7 +396,7 @@ - + Confirm your password diff --git a/app/shared_settings_strings_override.grdp b/app/shared_settings_strings_override.grdp index 6273dc997a4a..b150a72d0781 100644 --- a/app/shared_settings_strings_override.grdp +++ b/app/shared_settings_strings_override.grdp @@ -10,11 +10,11 @@ - + - + diff --git a/app/web_time_limit_error_page_strings.grdp b/app/web_time_limit_error_page_strings.grdp deleted file mode 100644 index 17b9d05a2515..000000000000 --- a/app/web_time_limit_error_page_strings.grdp +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - $1App is paused - - - - The limit on $1Brave or $1Brave apps that your parent set ran out. - - - - $1Education.com is paused - - - - You reached the time limit your parent set for $1Brave. - - - - You can use it for $11 hour and 30 minutes tomorrow. - - - - $1Brave is paused - - - diff --git a/browser/brave_content_browser_client.cc b/browser/brave_content_browser_client.cc index f21122b6746a..73c5b5953e9f 100644 --- a/browser/brave_content_browser_client.cc +++ b/browser/brave_content_browser_client.cc @@ -100,6 +100,7 @@ #include "content/public/browser/storage_partition.h" #include "content/public/browser/weak_document_ptr.h" #include "content/public/browser/web_ui_browser_interface_broker_registry.h" +#include "content/public/browser/web_ui_controller_interface_binder.h" #include "content/public/common/content_client.h" #include "content/public/common/content_switches.h" #include "content/public/common/url_constants.h" @@ -430,7 +431,8 @@ void BraveContentBrowserClient:: content::RenderFrameHost& render_frame_host, // NOLINT blink::AssociatedInterfaceRegistry& associated_registry) { // NOLINT #if BUILDFLAG(ENABLE_WIDEVINE) - associated_registry.AddInterface(base::BindRepeating( + associated_registry.AddInterface< + brave_drm::mojom::BraveDRM>(base::BindRepeating( [](content::RenderFrameHost* render_frame_host, mojo::PendingAssociatedReceiver receiver) { BraveDrmTabHelper::BindBraveDRM(std::move(receiver), render_frame_host); @@ -438,7 +440,8 @@ void BraveContentBrowserClient:: &render_frame_host)); #endif // BUILDFLAG(ENABLE_WIDEVINE) - associated_registry.AddInterface(base::BindRepeating( + associated_registry.AddInterface< + brave_shields::mojom::BraveShieldsHost>(base::BindRepeating( [](content::RenderFrameHost* render_frame_host, mojo::PendingAssociatedReceiver receiver) { @@ -448,14 +451,15 @@ void BraveContentBrowserClient:: &render_frame_host)); #if BUILDFLAG(ENABLE_SPEEDREADER) - associated_registry.AddInterface(base::BindRepeating( - [](content::RenderFrameHost* render_frame_host, - mojo::PendingAssociatedReceiver - receiver) { - speedreader::SpeedreaderTabHelper::BindSpeedreaderHost( - std::move(receiver), render_frame_host); - }, - &render_frame_host)); + associated_registry.AddInterface( + base::BindRepeating( + [](content::RenderFrameHost* render_frame_host, + mojo::PendingAssociatedReceiver< + speedreader::mojom::SpeedreaderHost> receiver) { + speedreader::SpeedreaderTabHelper::BindSpeedreaderHost( + std::move(receiver), render_frame_host); + }, + &render_frame_host)); #endif ChromeContentBrowserClient:: @@ -558,28 +562,28 @@ void BraveContentBrowserClient::RegisterBrowserInterfaceBindersForFrame( base::BindRepeating(&MaybeBindBraveVpnImpl)); #endif #if !BUILDFLAG(IS_ANDROID) - chrome::internal::RegisterWebUIControllerInterfaceBinder< + content::RegisterWebUIControllerInterfaceBinder< brave_wallet::mojom::PanelHandlerFactory, WalletPanelUI>(map); - chrome::internal::RegisterWebUIControllerInterfaceBinder< + content::RegisterWebUIControllerInterfaceBinder< brave_wallet::mojom::PageHandlerFactory, WalletPageUI>(map); - chrome::internal::RegisterWebUIControllerInterfaceBinder< + content::RegisterWebUIControllerInterfaceBinder< brave_private_new_tab::mojom::PageHandler, BravePrivateNewTabUI>(map); - chrome::internal::RegisterWebUIControllerInterfaceBinder< + content::RegisterWebUIControllerInterfaceBinder< brave_shields::mojom::PanelHandlerFactory, ShieldsPanelUI>(map); if (base::FeatureList::IsEnabled( brave_shields::features::kBraveAdblockCookieListOptIn)) { - chrome::internal::RegisterWebUIControllerInterfaceBinder< + content::RegisterWebUIControllerInterfaceBinder< brave_shields::mojom::CookieListOptInPageHandlerFactory, CookieListOptInUI>(map); } if (base::FeatureList::IsEnabled( brave_rewards::features::kWebUIPanelFeature)) { - chrome::internal::RegisterWebUIControllerInterfaceBinder< + content::RegisterWebUIControllerInterfaceBinder< brave_rewards::mojom::PanelHandlerFactory, RewardsPanelUI>(map); } if (base::FeatureList::IsEnabled( brave_federated::features::kFederatedLearning)) { - chrome::internal::RegisterWebUIControllerInterfaceBinder< + content::RegisterWebUIControllerInterfaceBinder< federated_internals::mojom::PageHandlerFactory, brave_federated::FederatedInternalsUI>(map); } @@ -588,27 +592,27 @@ void BraveContentBrowserClient::RegisterBrowserInterfaceBindersForFrame( // Brave News #if !BUILDFLAG(IS_ANDROID) if (base::FeatureList::IsEnabled(brave_today::features::kBraveNewsFeature)) { - chrome::internal::RegisterWebUIControllerInterfaceBinder< + content::RegisterWebUIControllerInterfaceBinder< brave_news::mojom::BraveNewsController, BraveNewTabUI>(map); } #endif #if BUILDFLAG(ENABLE_PLAYLIST_WEBUI) if (base::FeatureList::IsEnabled(playlist::features::kPlaylist)) { - chrome::internal::RegisterWebUIControllerInterfaceBinder< + content::RegisterWebUIControllerInterfaceBinder< playlist::mojom::PageHandlerFactory, playlist::PlaylistUI>(map); } #endif #if BUILDFLAG(ENABLE_SPEEDREADER) if (speedreader::IsSpeedreaderPanelV2Enabled()) { - chrome::internal::RegisterWebUIControllerInterfaceBinder< + content::RegisterWebUIControllerInterfaceBinder< speedreader::mojom::PanelFactory, SpeedreaderPanelUI>(map); } #endif #if !BUILDFLAG(IS_ANDROID) - chrome::internal::RegisterWebUIControllerInterfaceBinder< + content::RegisterWebUIControllerInterfaceBinder< brave_new_tab_page::mojom::PageHandlerFactory, BraveNewTabUI>(map); #endif } diff --git a/browser/brave_wallet/blockchain_images_source.cc b/browser/brave_wallet/blockchain_images_source.cc index f3ad2bb17e64..f76b31474616 100644 --- a/browser/brave_wallet/blockchain_images_source.cc +++ b/browser/brave_wallet/blockchain_images_source.cc @@ -80,7 +80,8 @@ void BlockchainImagesSource::OnGotImageFile(GotDataCallback callback, std::move(callback).Run(std::move(bytes)); } -std::string BlockchainImagesSource::GetMimeType(const std::string& path) { +std::string BlockchainImagesSource::GetMimeType(const GURL& url) { + const std::string path = URLDataSource::URLToRequestPath(url); if (base::EndsWith(path, ".png", base::CompareCase::INSENSITIVE_ASCII)) return "image/png"; if (base::EndsWith(path, ".gif", base::CompareCase::INSENSITIVE_ASCII)) diff --git a/browser/brave_wallet/blockchain_images_source.h b/browser/brave_wallet/blockchain_images_source.h index bad898a08717..d5d7e83a4a8c 100644 --- a/browser/brave_wallet/blockchain_images_source.h +++ b/browser/brave_wallet/blockchain_images_source.h @@ -38,7 +38,7 @@ class BlockchainImagesSource : public content::URLDataSource { void StartDataRequest(const GURL& url, const content::WebContents::Getter& wc_getter, GotDataCallback callback) override; - std::string GetMimeType(const std::string& path) override; + std::string GetMimeType(const GURL& url) override; bool AllowCaching() override; void OnGotImageFile(GotDataCallback callback, diff --git a/browser/brave_wallet/blockchain_images_source_unittest.cc b/browser/brave_wallet/blockchain_images_source_unittest.cc index 25e10aae299d..918ed738ce2c 100644 --- a/browser/brave_wallet/blockchain_images_source_unittest.cc +++ b/browser/brave_wallet/blockchain_images_source_unittest.cc @@ -71,10 +71,11 @@ class BlockchainImagesSourceTest : public testing::Test { }; TEST_F(BlockchainImagesSourceTest, GetMimeType) { - EXPECT_EQ(source()->GetMimeType("test/img1.png"), "image/png"); - EXPECT_EQ(source()->GetMimeType("test/img1.gif"), "image/gif"); - EXPECT_EQ(source()->GetMimeType("test/img1.jpg"), "image/jpg"); - EXPECT_EQ(source()->GetMimeType("test/img1.svg"), "image/svg+xml"); + EXPECT_EQ(source()->GetMimeType(GURL("brave://test/img1.png")), "image/png"); + EXPECT_EQ(source()->GetMimeType(GURL("brave://test/img1.gif")), "image/gif"); + EXPECT_EQ(source()->GetMimeType(GURL("brave://test/img1.jpg")), "image/jpg"); + EXPECT_EQ(source()->GetMimeType(GURL("brave://test/img1.svg")), + "image/svg+xml"); } TEST_F(BlockchainImagesSourceTest, StartDataRequest) { diff --git a/browser/brave_wallet/ethereum_provider_impl_unittest.cc b/browser/brave_wallet/ethereum_provider_impl_unittest.cc index 2261a51c6cd8..c7dc7c3a5d03 100644 --- a/browser/brave_wallet/ethereum_provider_impl_unittest.cc +++ b/browser/brave_wallet/ethereum_provider_impl_unittest.cc @@ -41,9 +41,11 @@ #include "brave/components/brave_wallet/common/brave_wallet.mojom.h" #include "brave/components/brave_wallet/common/hex_utils.h" #include "brave/components/brave_wallet/common/web3_provider_constants.h" +#include "brave/components/permissions/brave_permission_manager.h" #include "brave/components/permissions/contexts/brave_wallet_permission_context.h" #include "brave/components/version_info/version_info.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h" +#include "chrome/browser/permissions/permission_manager_factory.h" #include "chrome/browser/prefs/browser_prefs.h" #include "chrome/browser/profiles/profile_manager.h" #include "chrome/test/base/testing_profile.h" @@ -210,6 +212,11 @@ class EthereumProviderImplUnitTest : public testing::Test { brave_wallet::BraveWalletServiceFactory::GetServiceForContext( browser_context()); + profile_.SetPermissionControllerDelegate( + base::WrapUnique(static_cast( + PermissionManagerFactory::GetInstance()->BuildServiceInstanceFor( + browser_context())))); + provider_ = std::make_unique( host_content_settings_map(), json_rpc_service(), tx_service(), keyring_service(), brave_wallet_service_, diff --git a/browser/brave_wallet/solana_provider_impl_unittest.cc b/browser/brave_wallet/solana_provider_impl_unittest.cc index ce74b1171ff8..0e4fbb6249ff 100644 --- a/browser/brave_wallet/solana_provider_impl_unittest.cc +++ b/browser/brave_wallet/solana_provider_impl_unittest.cc @@ -27,7 +27,9 @@ #include "brave/components/brave_wallet/common/brave_wallet_constants.h" #include "brave/components/brave_wallet/common/features.h" #include "brave/components/brave_wallet/common/solana_utils.h" +#include "brave/components/permissions/brave_permission_manager.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h" +#include "chrome/browser/permissions/permission_manager_factory.h" #include "chrome/test/base/testing_profile.h" #include "components/content_settings/core/browser/host_content_settings_map.h" #include "components/grit/brave_components_strings.h" @@ -116,6 +118,10 @@ class SolanaProviderImplUnitTest : public testing::Test { browser_context()); tx_service_ = brave_wallet::TxServiceFactory::GetServiceForContext(browser_context()); + profile_.SetPermissionControllerDelegate( + base::WrapUnique(static_cast( + PermissionManagerFactory::GetInstance()->BuildServiceInstanceFor( + browser_context())))); provider_ = std::make_unique( keyring_service_, brave_wallet_service_, tx_service_, std::make_unique( diff --git a/browser/ephemeral_storage/blob_url_browsertest.cc b/browser/ephemeral_storage/blob_url_browsertest.cc index 06d5c84a5b4a..586da205b429 100644 --- a/browser/ephemeral_storage/blob_url_browsertest.cc +++ b/browser/ephemeral_storage/blob_url_browsertest.cc @@ -7,6 +7,7 @@ #include "brave/browser/ephemeral_storage/ephemeral_storage_browsertest.h" #include "brave/components/brave_shields/browser/brave_shields_util.h" #include "chrome/browser/ui/browser.h" +#include "chrome/browser/ui/tabs/tab_enums.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/test/base/ui_test_utils.h" #include "content/public/common/url_constants.h" @@ -188,7 +189,7 @@ class BlobUrlBrowserTestBase : public EphemeralStorageBrowserTest { // Close the first a.com tab, ensure all blobs created there become obsolete // and can't be fetched. ASSERT_TRUE(browser()->tab_strip_model()->CloseWebContentsAt( - 1, TabStripModel::CloseTypes::CLOSE_NONE)); + 1, TabCloseTypes::CLOSE_NONE)); content::RunAllTasksUntilIdle(); for (size_t idx = 0; idx < a_com2_registered_blobs.size(); ++idx) { auto* rfh = a_com2_registered_blobs[idx].rfh; @@ -265,7 +266,7 @@ class BlobUrlBrowserTestBase : public EphemeralStorageBrowserTest { // Close the first a.com tab, ensure all blobs created there become obsolete // and can't be fetched. ASSERT_TRUE(browser()->tab_strip_model()->CloseWebContentsAt( - 1, TabStripModel::CloseTypes::CLOSE_NONE)); + 1, TabCloseTypes::CLOSE_NONE)); content::RunAllTasksUntilIdle(); for (size_t idx = 0; idx < a_com2_registered_blobs.size(); ++idx) { auto* rfh = a_com2_registered_blobs[idx].rfh; diff --git a/browser/ephemeral_storage/ephemeral_storage_1p_browsertest.cc b/browser/ephemeral_storage/ephemeral_storage_1p_browsertest.cc index ad4483a05a6d..0e9e34c38adc 100644 --- a/browser/ephemeral_storage/ephemeral_storage_1p_browsertest.cc +++ b/browser/ephemeral_storage/ephemeral_storage_1p_browsertest.cc @@ -11,6 +11,7 @@ #include "chrome/browser/content_settings/host_content_settings_map_factory.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" +#include "chrome/browser/ui/tabs/tab_enums.h" #include "chrome/test/base/ui_test_utils.h" #include "components/content_settings/core/browser/cookie_settings.h" #include "components/content_settings/core/browser/host_content_settings_map.h" @@ -155,7 +156,7 @@ IN_PROC_BROWSER_TEST_F(EphemeralStorage1pBrowserTest, // Close 4 tabs. for (int i = 0; i < 4; ++i) { browser()->tab_strip_model()->CloseWebContentsAt(1, - TabStripModel::CLOSE_NONE); + TabCloseTypes::CLOSE_NONE); } WaitForCleanupAfterKeepAlive(); diff --git a/browser/ephemeral_storage/ephemeral_storage_browsertest.cc b/browser/ephemeral_storage/ephemeral_storage_browsertest.cc index 3284d3a544cb..4954589a6df0 100644 --- a/browser/ephemeral_storage/ephemeral_storage_browsertest.cc +++ b/browser/ephemeral_storage/ephemeral_storage_browsertest.cc @@ -22,6 +22,7 @@ #include "chrome/browser/content_settings/host_content_settings_map_factory.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" +#include "chrome/browser/ui/tabs/tab_enums.h" #include "chrome/test/base/ui_test_utils.h" #include "components/content_settings/core/browser/cookie_settings.h" #include "components/content_settings/core/browser/host_content_settings_map.h" @@ -247,7 +248,7 @@ void EphemeralStorageBrowserTest::CloseWebContents(WebContents* web_contents) { int tab_index = browser()->tab_strip_model()->GetIndexOfWebContents(web_contents); bool was_closed = browser()->tab_strip_model()->CloseWebContentsAt( - tab_index, TabStripModel::CloseTypes::CLOSE_NONE); + tab_index, TabCloseTypes::CLOSE_NONE); EXPECT_TRUE(was_closed); } @@ -653,7 +654,7 @@ IN_PROC_BROWSER_TEST_F(EphemeralStorageBrowserTest, int tab_index = browser()->tab_strip_model()->GetIndexOfWebContents(site_a_tab); bool was_closed = browser()->tab_strip_model()->CloseWebContentsAt( - tab_index, TabStripModel::CloseTypes::CLOSE_NONE); + tab_index, TabCloseTypes::CLOSE_NONE); EXPECT_TRUE(was_closed); // Navigate the main tab to the same site. diff --git a/browser/ephemeral_storage/ephemeral_storage_qa_browsertest.cc b/browser/ephemeral_storage/ephemeral_storage_qa_browsertest.cc index 117a0fcc097e..eaefad2cac2d 100644 --- a/browser/ephemeral_storage/ephemeral_storage_qa_browsertest.cc +++ b/browser/ephemeral_storage/ephemeral_storage_qa_browsertest.cc @@ -11,6 +11,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_commands.h" +#include "chrome/browser/ui/tabs/tab_enums.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" #include "chrome/common/chrome_features.h" @@ -388,7 +389,7 @@ class EphemeralStorageTest : public InProcessBrowserTest { ASSERT_TRUE( tabs_->CloseWebContentsAt(tabs_->GetIndexOfWebContents(original_tab_), - TabStripModel::CloseTypes::CLOSE_NONE)); + TabCloseTypes::CLOSE_NONE)); ASSERT_TRUE(ui_test_utils::NavigateToURL(browser(), GURL(target))); diff --git a/browser/ethereum_remote_client/features.h b/browser/ethereum_remote_client/features.h index 0615317a5077..74cecffe7c95 100644 --- a/browser/ethereum_remote_client/features.h +++ b/browser/ethereum_remote_client/features.h @@ -6,9 +6,7 @@ #ifndef BRAVE_BROWSER_ETHEREUM_REMOTE_CLIENT_FEATURES_H_ #define BRAVE_BROWSER_ETHEREUM_REMOTE_CLIENT_FEATURES_H_ -namespace base { -struct Feature; -} // namespace base +#include "base/feature_list.h" namespace ethereum_remote_client { namespace features { diff --git a/browser/permissions/brave_wallet_permission_context_unittest.cc b/browser/permissions/brave_wallet_permission_context_unittest.cc index a0cb49e22693..acb146fe0a7f 100644 --- a/browser/permissions/brave_wallet_permission_context_unittest.cc +++ b/browser/permissions/brave_wallet_permission_context_unittest.cc @@ -6,9 +6,12 @@ #include #include +#include "base/memory/ptr_util.h" #include "brave/components/brave_wallet/browser/permission_utils.h" +#include "brave/components/permissions/brave_permission_manager.h" #include "brave/components/permissions/contexts/brave_wallet_permission_context.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h" +#include "chrome/browser/permissions/permission_manager_factory.h" #include "chrome/test/base/testing_profile.h" #include "components/content_settings/core/browser/host_content_settings_map.h" #include "components/permissions/permission_util.h" @@ -25,6 +28,10 @@ class BraveWalletPermissionContextUnitTest : public testing::Test { void SetUp() override { map_ = HostContentSettingsMapFactory::GetForProfile(&profile_); + profile_.SetPermissionControllerDelegate( + base::WrapUnique(static_cast( + PermissionManagerFactory::GetInstance()->BuildServiceInstanceFor( + browser_context())))); } HostContentSettingsMap* map() { return map_.get(); } @@ -72,7 +79,7 @@ TEST_F(BraveWalletPermissionContextUnitTest, AddPermission) { // Set blocked content setting for the url. map()->SetContentSettingDefaultScope( origin.GetURL(), origin.GetURL(), - PermissionUtil::PermissionTypeToContentSettingSafe(entry.type), + PermissionUtil::PermissionTypeToContentSettingTypeSafe(entry.type), CONTENT_SETTING_BLOCK); success = permissions::BraveWalletPermissionContext::HasPermission( entry.type, browser_context(), origin, entry.address, &has_permission); @@ -82,7 +89,7 @@ TEST_F(BraveWalletPermissionContextUnitTest, AddPermission) { // Set content setting to default map()->SetContentSettingDefaultScope( origin.GetURL(), origin.GetURL(), - PermissionUtil::PermissionTypeToContentSettingSafe(entry.type), + PermissionUtil::PermissionTypeToContentSettingTypeSafe(entry.type), CONTENT_SETTING_DEFAULT); success = permissions::BraveWalletPermissionContext::HasPermission( entry.type, browser_context(), origin, entry.address, &has_permission); @@ -121,14 +128,14 @@ TEST_F(BraveWalletPermissionContextUnitTest, ResetPermission) { // CONTENT_SETTING_BLOCK shouldn't affect reset. map()->SetContentSettingDefaultScope( origin.GetURL(), origin.GetURL(), - PermissionUtil::PermissionTypeToContentSettingSafe(entry.type), + PermissionUtil::PermissionTypeToContentSettingTypeSafe(entry.type), CONTENT_SETTING_BLOCK); // Reset the permission ASSERT_TRUE(permissions::BraveWalletPermissionContext::ResetPermission( entry.type, browser_context(), origin, entry.address)); map()->SetContentSettingDefaultScope( origin.GetURL(), origin.GetURL(), - PermissionUtil::PermissionTypeToContentSettingSafe(entry.type), + PermissionUtil::PermissionTypeToContentSettingTypeSafe(entry.type), CONTENT_SETTING_DEFAULT); // Verify the permission is reset diff --git a/browser/permissions/permission_manager_browsertest.cc b/browser/permissions/permission_manager_browsertest.cc index 8bf94559e8a6..f1831c966f98 100644 --- a/browser/permissions/permission_manager_browsertest.cc +++ b/browser/permissions/permission_manager_browsertest.cc @@ -17,6 +17,7 @@ #include "chrome/browser/permissions/permission_manager_factory.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" +#include "chrome/browser/ui/tabs/tab_enums.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/ui_test_utils.h" @@ -323,7 +324,7 @@ IN_PROC_BROWSER_TEST_F(PermissionManagerBrowserTest, // Close tab with active request pending. content::WebContentsDestroyedWatcher tab_destroyed_watcher(web_contents()); browser()->tab_strip_model()->CloseWebContentsAt(0, - TabStripModel::CLOSE_NONE); + TabCloseTypes::CLOSE_NONE); tab_destroyed_watcher.Wait(); EXPECT_TRUE(IsPendingGroupedRequestsEmpty(cases[i].type)); } @@ -348,7 +349,7 @@ IN_PROC_BROWSER_TEST_F(PermissionManagerBrowserTest, GetCanonicalOrigin) { GetLastCommitedOrigin(), cases[i].addresses, &origin)) << "case: " << i; - EXPECT_EQ(origin.GetURL(), permission_manager()->GetCanonicalOrigin( + EXPECT_EQ(origin.GetURL(), permissions::PermissionUtil::GetCanonicalOrigin( cases[i].type, origin.GetURL(), GetLastCommitedOrigin().GetURL())) << "GetCanonicalOrigin should return requesting_origin for Ethereum " diff --git a/browser/resources/settings/brave_ipfs_page/add_ipfs_peer_dialog.js b/browser/resources/settings/brave_ipfs_page/add_ipfs_peer_dialog.js index d9439080b893..38df8b0df219 100644 --- a/browser/resources/settings/brave_ipfs_page/add_ipfs_peer_dialog.js +++ b/browser/resources/settings/brave_ipfs_page/add_ipfs_peer_dialog.js @@ -3,9 +3,9 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this file, // you can obtain one at http://mozilla.org/MPL/2.0/. -import 'chrome://resources/cr_elements/cr_button/cr_button.m.js'; -import 'chrome://resources/cr_elements/cr_dialog/cr_dialog.m.js'; -import 'chrome://resources/cr_elements/cr_input/cr_input.m.js'; +import 'chrome://resources/cr_elements/cr_button/cr_button.js'; +import 'chrome://resources/cr_elements/cr_dialog/cr_dialog.js'; +import 'chrome://resources/cr_elements/cr_input/cr_input.js'; import {Polymer, html} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; import {I18nBehavior} from 'chrome://resources/js/i18n_behavior.m.js'; diff --git a/browser/resources/settings/brave_ipfs_page/add_p2p_key_dialog.js b/browser/resources/settings/brave_ipfs_page/add_p2p_key_dialog.js index fe38e8b27a9d..b88b84aa3d77 100644 --- a/browser/resources/settings/brave_ipfs_page/add_p2p_key_dialog.js +++ b/browser/resources/settings/brave_ipfs_page/add_p2p_key_dialog.js @@ -3,9 +3,9 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this file, // you can obtain one at http://mozilla.org/MPL/2.0/. -import 'chrome://resources/cr_elements/cr_button/cr_button.m.js'; -import 'chrome://resources/cr_elements/cr_dialog/cr_dialog.m.js'; -import 'chrome://resources/cr_elements/cr_input/cr_input.m.js'; +import 'chrome://resources/cr_elements/cr_button/cr_button.js'; +import 'chrome://resources/cr_elements/cr_dialog/cr_dialog.js'; +import 'chrome://resources/cr_elements/cr_input/cr_input.js'; import {Polymer, html} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; import {I18nBehavior} from 'chrome://resources/js/i18n_behavior.m.js'; diff --git a/browser/resources/settings/brave_ipfs_page/change_ipfs_gateway_dialog.js b/browser/resources/settings/brave_ipfs_page/change_ipfs_gateway_dialog.js index 8e014c7a3edf..4c8a130e5251 100644 --- a/browser/resources/settings/brave_ipfs_page/change_ipfs_gateway_dialog.js +++ b/browser/resources/settings/brave_ipfs_page/change_ipfs_gateway_dialog.js @@ -9,9 +9,9 @@ * IPFS gateway address. */ -import 'chrome://resources/cr_elements/cr_button/cr_button.m.js'; -import 'chrome://resources/cr_elements/cr_dialog/cr_dialog.m.js'; -import 'chrome://resources/cr_elements/cr_input/cr_input.m.js'; +import 'chrome://resources/cr_elements/cr_button/cr_button.js'; +import 'chrome://resources/cr_elements/cr_dialog/cr_dialog.js'; +import 'chrome://resources/cr_elements/cr_input/cr_input.js'; import {html, PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; import {I18nMixin} from 'chrome://resources/js/i18n_mixin.js'; import {PrefsMixin} from '../prefs/prefs_mixin.js'; diff --git a/browser/resources/settings/brave_ipfs_page/rotate_p2p_key_dialog.js b/browser/resources/settings/brave_ipfs_page/rotate_p2p_key_dialog.js index 796085b12f67..9d989a461ce4 100644 --- a/browser/resources/settings/brave_ipfs_page/rotate_p2p_key_dialog.js +++ b/browser/resources/settings/brave_ipfs_page/rotate_p2p_key_dialog.js @@ -3,9 +3,9 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this file, // you can obtain one at http://mozilla.org/MPL/2.0/. -import 'chrome://resources/cr_elements/cr_button/cr_button.m.js'; -import 'chrome://resources/cr_elements/cr_dialog/cr_dialog.m.js'; -import 'chrome://resources/cr_elements/cr_input/cr_input.m.js'; +import 'chrome://resources/cr_elements/cr_button/cr_button.js'; +import 'chrome://resources/cr_elements/cr_dialog/cr_dialog.js'; +import 'chrome://resources/cr_elements/cr_input/cr_input.js'; import {Polymer, html} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; import {I18nBehavior} from 'chrome://resources/js/i18n_behavior.m.js'; diff --git a/browser/resources/settings/brave_sync_page/brave_sync_code_dialog.js b/browser/resources/settings/brave_sync_page/brave_sync_code_dialog.js index dd563223ba88..dd649f9f1ade 100644 --- a/browser/resources/settings/brave_sync_page/brave_sync_code_dialog.js +++ b/browser/resources/settings/brave_sync_page/brave_sync_code_dialog.js @@ -5,9 +5,9 @@ import '../settings_shared.css.js'; -import 'chrome://resources/cr_elements/cr_dialog/cr_dialog.m.js'; -import 'chrome://resources/cr_elements/cr_button/cr_button.m.js'; -import 'chrome://resources/cr_elements/cr_icon_button/cr_icon_button.m.js'; +import 'chrome://resources/cr_elements/cr_dialog/cr_dialog.js'; +import 'chrome://resources/cr_elements/cr_button/cr_button.js'; +import 'chrome://resources/cr_elements/cr_icon_button/cr_icon_button.js'; import {Polymer, html} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; import {I18nBehavior} from 'chrome://resources/js/i18n_behavior.m.js'; diff --git a/browser/resources/settings/brave_sync_page/brave_sync_page.js b/browser/resources/settings/brave_sync_page/brave_sync_page.js index 5e4e02f0b57f..602580a76a5d 100644 --- a/browser/resources/settings/brave_sync_page/brave_sync_page.js +++ b/browser/resources/settings/brave_sync_page/brave_sync_page.js @@ -7,7 +7,7 @@ * 'settings-brave-sync-page' is the settings page containing brave's * custom sync. */ -import 'chrome://resources/cr_elements/cr_dialog/cr_dialog.m.js'; +import 'chrome://resources/cr_elements/cr_dialog/cr_dialog.js'; import 'chrome://resources/cr_elements/icons.m.js'; import '../settings_page/settings_animated_pages.js'; import '../settings_page/settings_subpage.js'; diff --git a/browser/resources/settings/brave_sync_page/brave_sync_subpage.js b/browser/resources/settings/brave_sync_page/brave_sync_subpage.js index cbb32788b37c..64cf45cb0cb7 100644 --- a/browser/resources/settings/brave_sync_page/brave_sync_subpage.js +++ b/browser/resources/settings/brave_sync_page/brave_sync_subpage.js @@ -6,8 +6,8 @@ import 'chrome://resources/js/util.m.js'; -import 'chrome://resources/cr_elements/cr_button/cr_button.m.js'; -import 'chrome://resources/cr_elements/cr_icon_button/cr_icon_button.m.js'; +import 'chrome://resources/cr_elements/cr_button/cr_button.js'; +import 'chrome://resources/cr_elements/cr_icon_button/cr_icon_button.js'; import 'chrome://resources/cr_elements/icons.m.js'; import 'chrome://resources/cr_elements/shared_style_css.m.js'; import 'chrome://resources/cr_elements/shared_vars_css.m.js'; diff --git a/browser/resources/settings/brave_tor_page/brave_tor_bridges_dialog.js b/browser/resources/settings/brave_tor_page/brave_tor_bridges_dialog.js index eb59ff78b3bd..ab7ef8e45047 100644 --- a/browser/resources/settings/brave_tor_page/brave_tor_bridges_dialog.js +++ b/browser/resources/settings/brave_tor_page/brave_tor_bridges_dialog.js @@ -3,9 +3,9 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this file, // you can obtain one at http://mozilla.org/MPL/2.0/. -import 'chrome://resources/cr_elements/cr_button/cr_button.m.js'; -import 'chrome://resources/cr_elements/cr_dialog/cr_dialog.m.js'; -import 'chrome://resources/cr_elements/cr_input/cr_input.m.js'; +import 'chrome://resources/cr_elements/cr_button/cr_button.js'; +import 'chrome://resources/cr_elements/cr_dialog/cr_dialog.js'; +import 'chrome://resources/cr_elements/cr_input/cr_input.js'; import { html, PolymerElement } from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; import { I18nMixin } from 'chrome://resources/js/i18n_mixin.js'; import { PrefsMixin } from '../prefs/prefs_mixin.js'; diff --git a/browser/resources/settings/brave_wallet_page/add_wallet_network_dialog.js b/browser/resources/settings/brave_wallet_page/add_wallet_network_dialog.js index 896b0443431b..2e113d72b398 100644 --- a/browser/resources/settings/brave_wallet_page/add_wallet_network_dialog.js +++ b/browser/resources/settings/brave_wallet_page/add_wallet_network_dialog.js @@ -3,12 +3,10 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this file, // you can obtain one at http://mozilla.org/MPL/2.0/. -import 'chrome://resources/cr_elements/cr_button/cr_button.m.js'; -import 'chrome://resources/cr_elements/cr_dialog/cr_dialog.m.js'; -import 'chrome://resources/cr_elements/cr_input/cr_input.m.js'; +import 'chrome://resources/cr_elements/cr_button/cr_button.js'; +import 'chrome://resources/cr_elements/cr_dialog/cr_dialog.js'; +import 'chrome://resources/cr_elements/cr_input/cr_input.js'; import 'chrome://resources/cr_elements/cr_searchable_drop_down/cr_searchable_drop_down.js'; -import 'chrome://resources/cr_elements/cr_radio_button/cr_radio_button.m.js'; -import 'chrome://resources/cr_elements/cr_radio_group/cr_radio_group.m.js'; import { Polymer, html } from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; import { I18nBehavior } from 'chrome://resources/js/i18n_behavior.m.js'; import { BraveWalletBrowserProxyImpl } from './brave_wallet_browser_proxy.m.js'; diff --git a/browser/resources/settings/brave_wallet_page/brave_wallet_page.js b/browser/resources/settings/brave_wallet_page/brave_wallet_page.js index 1fd38efdfa16..850cdb1ad32b 100644 --- a/browser/resources/settings/brave_wallet_page/brave_wallet_page.js +++ b/browser/resources/settings/brave_wallet_page/brave_wallet_page.js @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ -import 'chrome://resources/cr_elements/cr_input/cr_input.m.js'; +import 'chrome://resources/cr_elements/cr_input/cr_input.js'; import './wallet_networks_subpage.js'; import {BraveWalletBrowserProxy, BraveWalletBrowserProxyImpl} from './brave_wallet_browser_proxy.m.js'; diff --git a/browser/resources/settings/brave_wallet_page/wallet_networks_list.js b/browser/resources/settings/brave_wallet_page/wallet_networks_list.js index c874e3d35423..28d259165812 100644 --- a/browser/resources/settings/brave_wallet_page/wallet_networks_list.js +++ b/browser/resources/settings/brave_wallet_page/wallet_networks_list.js @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ -import 'chrome://resources/cr_elements/cr_button/cr_button.m.js'; +import 'chrome://resources/cr_elements/cr_button/cr_button.js'; import './add_wallet_network_dialog.js'; import { BraveWalletBrowserProxyImpl } from './brave_wallet_browser_proxy.m.js'; diff --git a/browser/resources/settings/brave_wallet_page/wallet_networks_subpage.js b/browser/resources/settings/brave_wallet_page/wallet_networks_subpage.js index 9ab1f44d58de..fa25cfd2cb49 100644 --- a/browser/resources/settings/brave_wallet_page/wallet_networks_subpage.js +++ b/browser/resources/settings/brave_wallet_page/wallet_networks_subpage.js @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ -import 'chrome://resources/cr_elements/cr_button/cr_button.m.js'; +import 'chrome://resources/cr_elements/cr_button/cr_button.js'; import './add_wallet_network_dialog.js'; import './wallet_networks_list.js'; diff --git a/browser/resources/settings/default_brave_shields_page/brave_adblock_subpage.js b/browser/resources/settings/default_brave_shields_page/brave_adblock_subpage.js index 737e6ac0aa44..aa613d2b7857 100644 --- a/browser/resources/settings/default_brave_shields_page/brave_adblock_subpage.js +++ b/browser/resources/settings/default_brave_shields_page/brave_adblock_subpage.js @@ -8,7 +8,7 @@ import {PolymerElement, html} from 'chrome://resources/polymer/v3_0/polymer/poly import {BaseMixin} from '../base_mixin.js'; import {PrefsMixin} from '../prefs/prefs_mixin.js'; -import 'chrome://resources/cr_elements/cr_button/cr_button.m.js'; +import 'chrome://resources/cr_elements/cr_button/cr_button.js'; import 'chrome://resources/cr_elements/icons.m.js'; import './components/brave_adblock_subscribe_dropdown.js'; import './components/brave_adblock_editor.js'; diff --git a/browser/resources/settings/default_brave_shields_page/components/brave_adblock_editor.js b/browser/resources/settings/default_brave_shields_page/components/brave_adblock_editor.js index e02720266ccb..f5488c0c72dc 100644 --- a/browser/resources/settings/default_brave_shields_page/components/brave_adblock_editor.js +++ b/browser/resources/settings/default_brave_shields_page/components/brave_adblock_editor.js @@ -8,7 +8,7 @@ import {PolymerElement, html} from 'chrome://resources/polymer/v3_0/polymer/poly import {BaseMixin} from '../../base_mixin.js'; import {PrefsMixin} from '../../prefs/prefs_mixin.js'; -import 'chrome://resources/cr_elements/cr_button/cr_button.m.js'; +import 'chrome://resources/cr_elements/cr_button/cr_button.js'; const AdBlockFiltersEditorBase = PrefsMixin(I18nMixin(BaseMixin(PolymerElement))) diff --git a/browser/resources/settings/default_brave_shields_page/components/brave_adblock_subscribe_dropdown.js b/browser/resources/settings/default_brave_shields_page/components/brave_adblock_subscribe_dropdown.js index 0ba239b2bb44..3c2628f67cee 100644 --- a/browser/resources/settings/default_brave_shields_page/components/brave_adblock_subscribe_dropdown.js +++ b/browser/resources/settings/default_brave_shields_page/components/brave_adblock_subscribe_dropdown.js @@ -8,7 +8,7 @@ import {BaseMixin} from '../../base_mixin.js'; import {PrefsMixin} from '../../prefs/prefs_mixin.js'; import 'chrome://resources/cr_elements/cr_action_menu/cr_action_menu.js'; -import 'chrome://resources/cr_elements/cr_icon_button/cr_icon_button.m.js'; +import 'chrome://resources/cr_elements/cr_icon_button/cr_icon_button.js'; import 'chrome://resources/cr_elements/icons.m.js'; const AdblockSubscribeDropDownBase = PrefsMixin(I18nMixin(BaseMixin(PolymerElement))) diff --git a/browser/share/android/java/src/org/chromium/chrome/browser/share/send_tab_to_self/BraveManageAccountDevicesLinkView.java b/browser/share/android/java/src/org/chromium/chrome/browser/share/send_tab_to_self/BraveManageAccountDevicesLinkView.java index fe2ad61319fb..339d6e834a45 100644 --- a/browser/share/android/java/src/org/chromium/chrome/browser/share/send_tab_to_self/BraveManageAccountDevicesLinkView.java +++ b/browser/share/android/java/src/org/chromium/chrome/browser/share/send_tab_to_self/BraveManageAccountDevicesLinkView.java @@ -7,12 +7,15 @@ import android.content.Context; import android.util.AttributeSet; +import android.widget.LinearLayout; -public class BraveManageAccountDevicesLinkView extends ManageAccountDevicesLinkView { - public BraveManageAccountDevicesLinkView(Context context) { - super(context, null); +public class BraveManageAccountDevicesLinkView extends LinearLayout { + public BraveManageAccountDevicesLinkView(Context context, AttributeSet attrs) { + super(context, attrs); } + // We just redirect ownership for this method from `ManageAccountDevicesLinkView` to + // `BraveManageAccountDevicesLinkView` to do nothing. public void inflateIfVisible() { // Do nothing as this feature requires Google account. } diff --git a/browser/test/disabled_features/disable_client_hints_browsertest.cc b/browser/test/disabled_features/disable_client_hints_browsertest.cc index d51487c5fc26..8f48be1f8e75 100644 --- a/browser/test/disabled_features/disable_client_hints_browsertest.cc +++ b/browser/test/disabled_features/disable_client_hints_browsertest.cc @@ -48,7 +48,6 @@ const std::reference_wrapper kTestFeatures[] = { blink::features::kViewportHeightClientHintHeader, // Client hints features blink::features::kClientHintsMetaHTTPEquivAcceptCH, - blink::features::kClientHintsMetaNameAcceptCH, blink::features::kClientHintThirdPartyDelegation, }; diff --git a/browser/themes/brave_theme_service_browsertest.cc b/browser/themes/brave_theme_service_browsertest.cc index ef1664972359..48e7e446a92d 100644 --- a/browser/themes/brave_theme_service_browsertest.cc +++ b/browser/themes/brave_theme_service_browsertest.cc @@ -171,7 +171,7 @@ IN_PROC_BROWSER_TEST_F(BraveThemeServiceTest, OmniboxColorTest) { bool dark = false; auto* color_provider = browser_view->GetColorProvider(); EXPECT_EQ(GetLocationBarBackground(dark, false /* incognito */, hovered), - color_provider->GetColor(kColorOmniboxBackground)); + color_provider->GetColor(kColorToolbarBackgroundSubtleEmphasis)); EXPECT_EQ(GetOmniboxResultBackground(kColorOmniboxResultsBackground, dark, false /* incognito */), color_provider->GetColor(kColorOmniboxResultsBackground)); @@ -182,10 +182,10 @@ IN_PROC_BROWSER_TEST_F(BraveThemeServiceTest, OmniboxColorTest) { dark = true; color_provider = browser_view->GetColorProvider(); EXPECT_EQ(GetLocationBarBackground(dark, false /* incognito */, hovered), - color_provider->GetColor(kColorOmniboxBackground)); + color_provider->GetColor(kColorToolbarBackgroundSubtleEmphasis)); // Check color is different on dark mode and incognito mode. EXPECT_NE(GetLocationBarBackground(dark, true /* incognito */, hovered), - color_provider->GetColor(kColorOmniboxBackground)); + color_provider->GetColor(kColorToolbarBackgroundSubtleEmphasis)); EXPECT_EQ(GetOmniboxResultBackground(kColorOmniboxResultsBackground, dark, false /* incognito */), diff --git a/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/brave_search/BraveSearchBannerProcessor.java b/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/brave_search/BraveSearchBannerProcessor.java index 19b187d454bc..034cfda24b34 100644 --- a/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/brave_search/BraveSearchBannerProcessor.java +++ b/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/brave_search/BraveSearchBannerProcessor.java @@ -78,4 +78,9 @@ public void onUrlFocusChange(boolean hasFocus) {} @Override public void onNativeInitialized() {} + + @Override + public boolean allowBackgroundRounding() { + return false; + } } diff --git a/browser/ui/android/strings/android_chrome_strings.grd b/browser/ui/android/strings/android_chrome_strings.grd index 312f8a094893..3c11782ad7e8 100644 --- a/browser/ui/android/strings/android_chrome_strings.grd +++ b/browser/ui/android/strings/android_chrome_strings.grd @@ -1248,143 +1248,143 @@ Your Brave account may have other forms of browsing history like searches and ac %1$s3 items deleted - - + + Privacy guide - + Review key privacy and security controls - + A guide of your privacy choices - + Take a guided tour of key privacy and security controls. For more options, go to individual settings. - + Let’s go - + When on - + Things to consider - + You’ll browse faster because content is proactively loaded based on your current webpage visit - + You’ll get improved suggestions in the address bar - + URLs you visit are sent to Brave to predict what sites you might visit next - + If you also share Brave usage reports, those reports include the URLs you visit - + History sync - + You’ll have your history on all your synced devices so you can continue what you were doing - + If Brave is also your default search engine, you’ll see better, contextually relevant suggestions - + The URLs you visit are saved to your Brave sync chain - + Choose when to block third-party cookies - + Block while using private - + While in private, sites can’t use your cookies to see your browsing activity across different sites, for example, to personalize ads. Features on some sites may break. - + Block all the time - + Sites can only use your cookies to see your browsing activity only on their own site - + Choose your Safe Browsing protection - + Enhanced protection - + Faster, proactive protection against dangerous websites, downloads, and extensions - + Standard protection - + Standard protection against websites, downloads, and extensions that are known to be dangerous - + Finish - + Review complete! - + Explore more settings below or finish now - + Privacy Sandbox trial - + See how Brave plans to safeguard you from cross-site tracking while preserving the open web - + Web & App Activity - + Choose whether to include Brave history for more personalized experiences in Brave services - + Privacy guide explanation - + Privacy guide explanation opened at half height - + Privacy guide explanation opened at full height - + Privacy guide explanation closed - + Detects and warns you about dangerous events when they happen - + Checks URLs with a list of unsafe sites stored in Brave - + If a site tries to steal your password, or when you download a harmful file, Brave may send URLs including bits of page content to Safe Browsing - + Predicts and warns you about dangerous events before they happen - + Keeps you safe on Brave and may be used to improve your security in other Brave apps when you are signed in - + Improves security for you and everyone on the web - + Warns you if passwords are exposed in a data breach - + Sends URLs to Safe Browsing to check them - + Also sends a small sample of pages, downloads, extension activity, and system information to help discover new threats - + Temporarily links this data to your Brave sync chain when you’re signed in, to protect you across Brave apps @@ -2793,6 +2793,9 @@ To change this setting, <resetlink>reset sync

Turn on Private lock + + Private tabs will be locked when you leave Brave + @@ -2896,6 +2899,18 @@ To change this setting, <resetlink>reset sync

Turn on sync? + + Turn on sync + + + Sync + + + Back up your stuff and use it on any device + + + Sync your data on all devices + Sync your passwords, history & more on all devices @@ -2905,6 +2920,18 @@ To change this setting, <resetlink>reset sync

You can always choose what to sync in <LINK1>settings</LINK1>. + + You can always choose what to sync in <LINK1>settings</LINK1>. Brave may personalize Search and other services based on your history. + + + Bookmarks + + + Autofill + + + History and more + Yes, I'm in @@ -2921,7 +2948,7 @@ To change this setting, <resetlink>reset sync

- Sign in to this site and Brave with your Brave sync chain. + Sign in to this site and Brave To send this tab to another device, sign in to Brave on both devices @@ -3834,6 +3861,17 @@ To change this setting, <resetlink>reset sync

+ + + Desktop sites requested by default + + + Update settings + + + Request desktop sites by default? + + @@ -4538,6 +4576,12 @@ To change this setting, <resetlink>reset sync

Translate this page to any language from the More options button + + Translate pages here + + + Translate pages from the More Options button + New: share a link that scrolls to this text @@ -4980,12 +5024,12 @@ To change this setting, <resetlink>reset sync

- - You can use this phone to sign in on the computer that’s displaying this QR code. + + You can use this phone to sign in on the device that’s displaying this QR code. - - You can use this tablet to sign in on the computer that’s displaying this QR code. + + You can use this tablet to sign in on the device that’s displaying this QR code. diff --git a/browser/ui/android/strings/android_chrome_strings_override.grd b/browser/ui/android/strings/android_chrome_strings_override.grd index d22c3a58bf8d..f87ee2e7d09a 100644 --- a/browser/ui/android/strings/android_chrome_strings_override.grd +++ b/browser/ui/android/strings/android_chrome_strings_override.grd @@ -140,10 +140,10 @@ Based on your interaction with a site, like regularly signing in to an account, Trust tokens improve privacy on the web and can’t be used to find out who you are. - + Block while using private - + While in private, sites can’t use your cookies to see your browsing activity across different sites, for example, to personalize ads. Features on some sites may break. @@ -187,6 +187,9 @@ Trust tokens improve privacy on the web and can’t be used to find out who you Turn on Private lock + + Private tabs will be locked when you leave Brave + Help make Brave better for profiles who use it the way you do diff --git a/browser/ui/bookmark/BUILD.gn b/browser/ui/bookmark/BUILD.gn index 3b157435de51..0189f0b008f6 100644 --- a/browser/ui/bookmark/BUILD.gn +++ b/browser/ui/bookmark/BUILD.gn @@ -26,7 +26,7 @@ source_set("bookmark") { deps += [ "//chrome/browser/cart:mojo_bindings", "//chrome/browser/new_tab_page/modules/drive:mojo_bindings", - "//chrome/browser/new_tab_page/modules/task_module:mojo_bindings", + "//chrome/browser/new_tab_page/modules/recipes:mojo_bindings", "//chrome/browser/ui/webui/new_tab_page:mojo_bindings", "//chrome/browser/ui/webui/realbox:mojo_bindings", "//ui/webui/resources/js/browser_command:mojo_bindings", diff --git a/browser/ui/brave_browser.h b/browser/ui/brave_browser.h index 1ec245bb7582..b90d918d9076 100644 --- a/browser/ui/brave_browser.h +++ b/browser/ui/brave_browser.h @@ -66,6 +66,7 @@ class BraveBrowser : public Browser { private: friend class BraveTestLauncherDelegate; friend class WindowClosingConfirmBrowserTest; + friend class InProcessBrowserTest; // static static void SuppressBrowserWindowClosingDialogForTesting(bool suppress); diff --git a/browser/ui/color/brave_color_mixer.cc b/browser/ui/color/brave_color_mixer.cc index 9ab285a39daf..b3312421fbee 100644 --- a/browser/ui/color/brave_color_mixer.cc +++ b/browser/ui/color/brave_color_mixer.cc @@ -437,10 +437,11 @@ void AddBraveOmniboxLightThemeColorMixer( const ui::ColorProviderManager::Key& key) { ui::ColorMixer& mixer = provider->AddMixer(); - mixer[kColorOmniboxBackground] = {GetLocationBarBackground( + mixer[kColorToolbarBackgroundSubtleEmphasis] = {GetLocationBarBackground( /*dark*/ false, /*private*/ false, /*hover*/ false)}; - mixer[kColorOmniboxBackgroundHovered] = {GetLocationBarBackground( - /*dark*/ false, /*private*/ false, /*hover*/ true)}; + mixer[kColorToolbarBackgroundSubtleEmphasisHovered] = { + GetLocationBarBackground( + /*dark*/ false, /*private*/ false, /*hover*/ true)}; mixer[kColorOmniboxText] = {kLightOmniboxText}; mixer[kColorOmniboxResultsBackground] = {GetOmniboxResultBackground( @@ -458,10 +459,11 @@ void AddBraveOmniboxDarkThemeColorMixer( const ui::ColorProviderManager::Key& key) { ui::ColorMixer& mixer = provider->AddMixer(); - mixer[kColorOmniboxBackground] = {GetLocationBarBackground( + mixer[kColorToolbarBackgroundSubtleEmphasis] = {GetLocationBarBackground( /*dark*/ true, /*private*/ false, /*hover*/ false)}; - mixer[kColorOmniboxBackgroundHovered] = {GetLocationBarBackground( - /*dark*/ true, /*private*/ false, /*hover*/ true)}; + mixer[kColorToolbarBackgroundSubtleEmphasisHovered] = { + GetLocationBarBackground( + /*dark*/ true, /*private*/ false, /*hover*/ true)}; mixer[kColorOmniboxText] = {kDarkOmniboxText}; mixer[kColorOmniboxResultsBackground] = {GetOmniboxResultBackground( @@ -479,10 +481,11 @@ void AddBraveOmniboxPrivateThemeColorMixer( const ui::ColorProviderManager::Key& key) { ui::ColorMixer& mixer = provider->AddMixer(); - mixer[kColorOmniboxBackground] = {GetLocationBarBackground( + mixer[kColorToolbarBackgroundSubtleEmphasis] = {GetLocationBarBackground( /*dark*/ false, /*private*/ true, /*hover*/ false)}; - mixer[kColorOmniboxBackgroundHovered] = {GetLocationBarBackground( - /*dark*/ false, /*private*/ true, /*hover*/ true)}; + mixer[kColorToolbarBackgroundSubtleEmphasisHovered] = { + GetLocationBarBackground( + /*dark*/ false, /*private*/ true, /*hover*/ true)}; mixer[kColorOmniboxText] = {kDarkOmniboxText}; mixer[kColorOmniboxResultsBackground] = {GetOmniboxResultBackground( diff --git a/browser/ui/sidebar/BUILD.gn b/browser/ui/sidebar/BUILD.gn index 32349076ac09..5ced1cc5bcf1 100644 --- a/browser/ui/sidebar/BUILD.gn +++ b/browser/ui/sidebar/BUILD.gn @@ -53,7 +53,7 @@ source_set("sidebar") { if (!is_android) { deps += [ "//chrome/browser/new_tab_page/modules/drive:mojo_bindings", - "//chrome/browser/new_tab_page/modules/task_module:mojo_bindings", + "//chrome/browser/new_tab_page/modules/recipes:mojo_bindings", "//chrome/browser/ui/webui/new_tab_page:mojo_bindings", "//chrome/browser/ui/webui/realbox:mojo_bindings", ] diff --git a/browser/ui/sidebar/sidebar_browsertest.cc b/browser/ui/sidebar/sidebar_browsertest.cc index dcb45354c556..b043051b22c4 100644 --- a/browser/ui/sidebar/sidebar_browsertest.cc +++ b/browser/ui/sidebar/sidebar_browsertest.cc @@ -20,10 +20,15 @@ #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/ui_test_utils.h" #include "content/public/test/browser_test.h" +#include "testing/gmock/include/gmock/gmock-matchers.h" +#include "testing/gmock/include/gmock/gmock.h" #include "ui/events/base_event_utils.h" #include "ui/events/event.h" #include "ui/gfx/geometry/point.h" +using ::testing::Eq; +using ::testing::Optional; + namespace sidebar { class SidebarBrowserTest : public InProcessBrowserTest { @@ -72,7 +77,7 @@ class SidebarBrowserTest : public InProcessBrowserTest { IN_PROC_BROWSER_TEST_F(SidebarBrowserTest, BasicTest) { // Initially, active index is not set. - EXPECT_EQ(-1, model()->active_index()); + EXPECT_THAT(model()->active_index(), Eq(absl::nullopt)); // Check sidebar UI is initalized properly. EXPECT_TRUE(!!controller()->sidebar()); @@ -81,7 +86,7 @@ IN_PROC_BROWSER_TEST_F(SidebarBrowserTest, BasicTest) { EXPECT_EQ(4UL, model()->GetAllSidebarItems().size()); // Activate item that opens in panel. controller()->ActivateItemAt(2); - EXPECT_EQ(2, model()->active_index()); + EXPECT_THAT(model()->active_index(), Optional(2u)); EXPECT_TRUE(controller()->IsActiveIndex(2)); // Try to activate item at index 1. @@ -90,18 +95,18 @@ IN_PROC_BROWSER_TEST_F(SidebarBrowserTest, BasicTest) { const auto item = model()->GetAllSidebarItems()[1]; EXPECT_FALSE(item.open_in_panel); controller()->ActivateItemAt(1); - EXPECT_EQ(2, model()->active_index()); + EXPECT_THAT(model()->active_index(), Optional(2u)); - // Setting -1 means deactivate current active tab. - controller()->ActivateItemAt(-1); - EXPECT_EQ(-1, model()->active_index()); + // Setting absl::nullopt means deactivate current active tab. + controller()->ActivateItemAt(absl::nullopt); + EXPECT_THAT(model()->active_index(), Eq(absl::nullopt)); controller()->ActivateItemAt(2); // Remove Item at index 0 change active index from 3 to 2. SidebarServiceFactory::GetForProfile(browser()->profile())->RemoveItemAt(0); EXPECT_EQ(3UL, model()->GetAllSidebarItems().size()); - EXPECT_EQ(1, model()->active_index()); + EXPECT_THAT(model()->active_index(), Optional(1u)); // If current active tab is not NTP, we can add current url to sidebar. EXPECT_TRUE(CanAddCurrentActiveTabToSidebar(browser())); @@ -113,9 +118,10 @@ IN_PROC_BROWSER_TEST_F(SidebarBrowserTest, BasicTest) { // Check |BrowserView::find_bar_host_view_| is the last child view. // If not, findbar dialog is not positioned properly. BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser()); - const size_t find_bar_host_view_index = + auto find_bar_host_view_index = browser_view->GetIndexOf(browser_view->find_bar_host_view()); - EXPECT_EQ(browser_view->children().size() - 1, find_bar_host_view_index); + EXPECT_THAT(find_bar_host_view_index, + Optional(browser_view->children().size() - 1)); } IN_PROC_BROWSER_TEST_F(SidebarBrowserTest, WebTypePanelTest) { diff --git a/browser/ui/sidebar/sidebar_controller.cc b/browser/ui/sidebar/sidebar_controller.cc index e4ee05b1afcd..1311d3979e77 100644 --- a/browser/ui/sidebar/sidebar_controller.cc +++ b/browser/ui/sidebar/sidebar_controller.cc @@ -50,7 +50,7 @@ SidebarController::SidebarController(BraveBrowser* browser, Profile* profile) SidebarController::~SidebarController() = default; -bool SidebarController::IsActiveIndex(int index) const { +bool SidebarController::IsActiveIndex(absl::optional index) const { return sidebar_model_->active_index() == index; } @@ -60,17 +60,16 @@ bool SidebarController::DoesBrowserHaveOpenedTabForItem( return !GetAllExistingTabIndexForHost(browser_, item.url.host()).empty(); } -void SidebarController::ActivateItemAt(int index, +void SidebarController::ActivateItemAt(absl::optional index, WindowOpenDisposition disposition) { - // -1 means there is no active item. - DCHECK_GE(index, -1); - if (index == -1) { + // disengaged means there is no active item. + if (!index) { sidebar_model_->SetActiveIndex(index); UpdateSidebarVisibility(); return; } - const auto& item = sidebar_model_->GetAllSidebarItems()[index]; + const auto& item = sidebar_model_->GetAllSidebarItems()[*index]; // Only an item for panel can get activated. if (item.open_in_panel) { sidebar_model_->SetActiveIndex(index); diff --git a/browser/ui/sidebar/sidebar_controller.h b/browser/ui/sidebar/sidebar_controller.h index 87b835be9893..453704764670 100644 --- a/browser/ui/sidebar/sidebar_controller.h +++ b/browser/ui/sidebar/sidebar_controller.h @@ -12,6 +12,7 @@ #include "base/memory/raw_ptr.h" #include "base/scoped_observation.h" #include "brave/components/sidebar/sidebar_service.h" +#include "third_party/abseil-cpp/absl/types/optional.h" #include "ui/base/window_open_disposition.h" class BraveBrowser; @@ -42,7 +43,7 @@ class SidebarController : public SidebarService::Observer { // |disposition| is only valid for shortcut type. If |disposition| is not // CURRENT_TAB, item at |index| is handled based on |disposition|. void ActivateItemAt( - int index, + absl::optional index, WindowOpenDisposition disposition = WindowOpenDisposition::CURRENT_TAB); void AddItemWithCurrentTab(); // If current browser doesn't have a tab for |url|, active tab will load @@ -51,7 +52,7 @@ class SidebarController : public SidebarService::Observer { // new tab. void LoadAtTab(const GURL& url); - bool IsActiveIndex(int index) const; + bool IsActiveIndex(absl::optional index) const; bool DoesBrowserHaveOpenedTabForItem(const SidebarItem& item) const; diff --git a/browser/ui/sidebar/sidebar_model.cc b/browser/ui/sidebar/sidebar_model.cc index 45b2899a3000..46a42fcf2686 100644 --- a/browser/ui/sidebar/sidebar_model.cc +++ b/browser/ui/sidebar/sidebar_model.cc @@ -63,11 +63,10 @@ SidebarModel::~SidebarModel() = default; void SidebarModel::Init(history::HistoryService* history_service) { // Start with saved item list. - int index = -1; - for (const auto& item : GetAllSidebarItems()) { - index++; - AddItem(item, index, false); - } + int index = 0u; + for (const auto& item : GetAllSidebarItems()) + AddItem(item, index++, false); + sidebar_observed_.Observe(GetSidebarService(profile_)); // Can be null in test. if (history_service) @@ -83,17 +82,16 @@ void SidebarModel::RemoveObserver(Observer* observer) { } void SidebarModel::AddItem(const SidebarItem& item, - int index, + size_t index, bool user_gesture) { // Sidebar service should always call with a valid index equal to the // index of the SidebarItem. - DCHECK_GE(index, 0); for (Observer& obs : observers_) { obs.OnItemAdded(item, index, user_gesture); } - // If active_index_ is not -1, check this addition affects active index. - if (active_index_ != -1 && active_index_ >= index) + // Check this addition affects active index. + if (active_index_ >= index) UpdateActiveIndexAndNotify(index); // Web type uses site favicon as button's image. @@ -101,15 +99,17 @@ void SidebarModel::AddItem(const SidebarItem& item, FetchFavicon(item); } -void SidebarModel::OnItemAdded(const SidebarItem& item, int index) { +void SidebarModel::OnItemAdded(const SidebarItem& item, size_t index) { AddItem(item, index, true); } -void SidebarModel::OnItemMoved(const SidebarItem& item, int from, int to) { +void SidebarModel::OnItemMoved(const SidebarItem& item, + size_t from, + size_t to) { for (Observer& obs : observers_) obs.OnItemMoved(item, from, to); - if (active_index_ == -1) + if (!active_index_) return; // Find new active items index. @@ -119,13 +119,13 @@ void SidebarModel::OnItemMoved(const SidebarItem& item, int from, int to) { if (active_index_is_unaffected) { return; } - int new_active_index = -1; + absl::optional new_active_index = absl::nullopt; if (active_index_ == from) { new_active_index = to; } else { - new_active_index = (to < from) ? active_index_ + 1 : active_index_ - 1; + new_active_index = (to < from) ? *active_index_ + 1 : *active_index_ - 1; } - DCHECK_GE(new_active_index, 0); + DCHECK(new_active_index); UpdateActiveIndexAndNotify(new_active_index); } @@ -139,19 +139,18 @@ void SidebarModel::OnItemUpdated(const SidebarItem& item, } } -void SidebarModel::OnWillRemoveItem(const SidebarItem& item, int index) { +void SidebarModel::OnWillRemoveItem(const SidebarItem& item, size_t index) { if (index == active_index_) - UpdateActiveIndexAndNotify(-1); + UpdateActiveIndexAndNotify(absl::nullopt); } -void SidebarModel::OnItemRemoved(const SidebarItem& item, int index) { +void SidebarModel::OnItemRemoved(const SidebarItem& item, size_t index) { RemoveItemAt(index); } void SidebarModel::OnURLVisited(history::HistoryService* history_service, - ui::PageTransition transition, - const history::URLRow& row, - base::Time visit_time) { + const history::URLRow& url_row, + const history::VisitRow& new_visit) { for (const auto& item : GetAllSidebarItems()) { // Don't try to update builtin items image. It uses bundled one. if (IsBuiltInType(item)) @@ -159,7 +158,7 @@ void SidebarModel::OnURLVisited(history::HistoryService* history_service, // If same url is added to history service, try to fetch favicon to update // for item. - if (item.url.host() == row.url().host()) { + if (item.url.host() == url_row.url().host()) { // Favicon seems cached after this callback. // TODO(simonhong): Find more deterministic method instead of using // delayed task. @@ -172,17 +171,17 @@ void SidebarModel::OnURLVisited(history::HistoryService* history_service, } } -void SidebarModel::RemoveItemAt(int index) { +void SidebarModel::RemoveItemAt(size_t index) { for (Observer& obs : observers_) obs.OnItemRemoved(index); if (active_index_ > index) { - active_index_--; + --(*active_index_); UpdateActiveIndexAndNotify(active_index_); } } -void SidebarModel::SetActiveIndex(int index, bool load) { +void SidebarModel::SetActiveIndex(absl::optional index, bool load) { if (index == active_index_) return; @@ -197,23 +196,24 @@ bool SidebarModel::IsSidebarHasAllBuiltInItems() const { return GetSidebarService(profile_)->GetHiddenDefaultSidebarItems().empty(); } -int SidebarModel::GetIndexOf(const SidebarItem& item) const { +absl::optional SidebarModel::GetIndexOf(const SidebarItem& item) const { const auto items = GetAllSidebarItems(); const auto iter = base::ranges::find_if(items, [&item](const auto& i) { return (item.built_in_item_type == i.built_in_item_type && item.url == i.url); }); if (iter == items.end()) - return -1; + return absl::nullopt; return std::distance(items.begin(), iter); } -void SidebarModel::UpdateActiveIndexAndNotify(int new_active_index) { +void SidebarModel::UpdateActiveIndexAndNotify( + absl::optional new_active_index) { if (new_active_index == active_index_) return; - const int old_active_index = active_index_; + auto old_active_index = active_index_; active_index_ = new_active_index; for (Observer& obs : observers_) @@ -237,8 +237,8 @@ void SidebarModel::FetchFavicon(const sidebar::SidebarItem& item) { void SidebarModel::OnGetLocalFaviconImage( const sidebar::SidebarItem& item, const favicon_base::FaviconRawBitmapResult& bitmap_result) { - const int index = GetIndexOf(item); - if (index == -1) + auto index = GetIndexOf(item); + if (!index) return; // Fetch favicon from local favicon service. diff --git a/browser/ui/sidebar/sidebar_model.h b/browser/ui/sidebar/sidebar_model.h index f381e547d972..2c6bf78cd846 100644 --- a/browser/ui/sidebar/sidebar_model.h +++ b/browser/ui/sidebar/sidebar_model.h @@ -52,12 +52,13 @@ class SidebarModel : public SidebarService::Observer, class Observer : public base::CheckedObserver { public: virtual void OnItemAdded(const SidebarItem& item, - int index, + size_t index, bool user_gesture) {} - virtual void OnItemMoved(const SidebarItem& item, int from, int to) {} - virtual void OnItemRemoved(int index) {} - virtual void OnActiveIndexChanged(int old_index, int new_index) {} - virtual void OnWillUpdateFavicon(const SidebarItem& item, int index) {} + virtual void OnItemMoved(const SidebarItem& item, size_t from, size_t to) {} + virtual void OnItemRemoved(size_t index) {} + virtual void OnActiveIndexChanged(absl::optional old_index, + absl::optional new_index) {} + virtual void OnWillUpdateFavicon(const SidebarItem& item, size_t index) {} virtual void OnFaviconUpdatedForItem(const SidebarItem& item, const gfx::ImageSkia& image) {} @@ -77,38 +78,37 @@ class SidebarModel : public SidebarService::Observer, void RemoveObserver(Observer* observer); // |false| is used in unit test. - void SetActiveIndex(int index, bool load = true); + void SetActiveIndex(absl::optional index, bool load = true); // Returns true if webcontents of item at |index| already loaded url. bool IsSidebarHasAllBuiltInItems() const; - int GetIndexOf(const SidebarItem& item) const; + absl::optional GetIndexOf(const SidebarItem& item) const; // Don't cache item list. list can be changed during the runtime. const std::vector& GetAllSidebarItems() const; - // Return -1 if sidebar panel is not opened. - int active_index() const { return active_index_; } + // Return absl::nullopt if sidebar panel is not opened. + absl::optional active_index() const { return active_index_; } // SidebarService::Observer overrides: - void OnItemAdded(const SidebarItem& item, int index) override; - void OnItemMoved(const SidebarItem& item, int from, int to) override; + void OnItemAdded(const SidebarItem& item, size_t index) override; + void OnItemMoved(const SidebarItem& item, size_t from, size_t to) override; void OnItemUpdated(const SidebarItem& item, const SidebarItemUpdate& update) override; - void OnWillRemoveItem(const SidebarItem& item, int index) override; - void OnItemRemoved(const SidebarItem& item, int index) override; + void OnWillRemoveItem(const SidebarItem& item, size_t index) override; + void OnItemRemoved(const SidebarItem& item, size_t index) override; // history::HistoryServiceObserver overrides: void OnURLVisited(history::HistoryService* history_service, - ui::PageTransition transition, - const history::URLRow& row, - base::Time visit_time) override; + const history::URLRow& url_row, + const history::VisitRow& new_visit) override; private: FRIEND_TEST_ALL_PREFIXES(SidebarModelTest, ItemsChangedTest); // Add item at last. - void AddItem(const SidebarItem& item, int index, bool user_gesture); - void RemoveItemAt(int index); - void UpdateActiveIndexAndNotify(int new_active_index); + void AddItem(const SidebarItem& item, size_t index, bool user_gesture); + void RemoveItemAt(size_t index); + void UpdateActiveIndexAndNotify(absl::optional new_active_index); // TODO(simonhong): Use separated class for fetching favicon from this model // class. @@ -123,8 +123,8 @@ class SidebarModel : public SidebarService::Observer, const gfx::Image& image, const image_fetcher::RequestMetadata& request_metadata); - // Non-negative if sidebar panel is opened. - int active_index_ = -1; + // Optional engaged if sidebar panel is opened. + absl::optional active_index_ = absl::nullopt; Profile* profile_ = nullptr; std::unique_ptr task_tracker_; base::ObserverList observers_; diff --git a/browser/ui/sidebar/sidebar_unittest.cc b/browser/ui/sidebar/sidebar_unittest.cc index 8812cd962674..a287131a57fe 100644 --- a/browser/ui/sidebar/sidebar_unittest.cc +++ b/browser/ui/sidebar/sidebar_unittest.cc @@ -18,10 +18,14 @@ #include "components/prefs/pref_service.h" #include "components/sync_preferences/testing_pref_service_syncable.h" #include "content/public/test/browser_task_environment.h" +#include "testing/gmock/include/gmock/gmock-matchers.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" #include "url/gurl.h" +using ::testing::Eq; +using ::testing::Optional; + namespace sidebar { class MockSidebarModelObserver : public SidebarModel::Observer { @@ -31,20 +35,21 @@ class MockSidebarModelObserver : public SidebarModel::Observer { MOCK_METHOD(void, OnItemAdded, - (const SidebarItem& item, int index, bool user_gesture), + (const SidebarItem& item, size_t index, bool user_gesture), (override)); MOCK_METHOD(void, OnItemMoved, - (const SidebarItem& item, int from, int to), + (const SidebarItem& item, size_t from, size_t to), (override)); - MOCK_METHOD(void, OnItemRemoved, (int index), (override)); + MOCK_METHOD(void, OnItemRemoved, (size_t index), (override)); MOCK_METHOD(void, OnActiveIndexChanged, - (int old_index, int new_index), + (absl::optional old_index, + absl::optional new_index), (override)); MOCK_METHOD(void, OnWillUpdateFavicon, - (const SidebarItem& item, int index), + (const SidebarItem& item, size_t index), (override)); MOCK_METHOD(void, OnFaviconUpdatedForItem, @@ -83,7 +88,7 @@ TEST_F(SidebarModelTest, ItemsChangedTest) { model()->Init(nullptr); - EXPECT_EQ(-1, model()->active_index()); + EXPECT_THAT(model()->active_index(), Eq(absl::nullopt)); // Add one more item to test with 5 items. SidebarItem new_item = SidebarItem::Create( @@ -124,35 +129,37 @@ TEST_F(SidebarModelTest, ItemsChangedTest) { service()->items()[2].built_in_item_type); EXPECT_EQ(item_data.url, service()->items()[2].url); EXPECT_EQ(item_data.title, service()->items()[2].title); - EXPECT_EQ(-1, model()->active_index()); + EXPECT_THAT(model()->active_index(), Eq(absl::nullopt)); EXPECT_EQ(items_size, service()->items().size()); model()->SetActiveIndex(1, false); - EXPECT_EQ(1, model()->active_index()); + EXPECT_THAT(model()->active_index(), Optional(1u)); // Move item at 1 to 2. This causes active index change because item at 1 was // active item. After moving, active item index should be 2. EXPECT_CALL(observer_, OnItemMoved(testing::_, 1, 2)).Times(1); - EXPECT_CALL(observer_, OnActiveIndexChanged(1, 2)).Times(1); + EXPECT_CALL(observer_, OnActiveIndexChanged(Optional(1), Optional(2))) + .Times(1); service()->MoveItem(1, 2); testing::Mock::VerifyAndClearExpectations(&observer_); - EXPECT_EQ(2, model()->active_index()); + EXPECT_THAT(model()->active_index(), Optional(2u)); // Moving item from 1 to 0 doesn't affect active index. EXPECT_CALL(observer_, OnItemMoved(testing::_, 1, 0)).Times(1); EXPECT_CALL(observer_, OnActiveIndexChanged(testing::_, testing::_)).Times(0); service()->MoveItem(1, 0); testing::Mock::VerifyAndClearExpectations(&observer_); - EXPECT_EQ(2, model()->active_index()); + EXPECT_THAT(model()->active_index(), Optional(2u)); // Moving item from 3 to 0 affect active index. Items behind the active // item(at 2) to the front of active index. So, active item is also moved from // 2 to 3 index. EXPECT_CALL(observer_, OnItemMoved(testing::_, 3, 0)).Times(1); - EXPECT_CALL(observer_, OnActiveIndexChanged(2, 3)).Times(1); + EXPECT_CALL(observer_, OnActiveIndexChanged(Optional(2), Optional(3))) + .Times(1); service()->MoveItem(3, 0); testing::Mock::VerifyAndClearExpectations(&observer_); - EXPECT_EQ(3, model()->active_index()); + EXPECT_THAT(model()->active_index(), Optional(3u)); } TEST_F(SidebarModelTest, CanUseNotAddedBuiltInItemInsteadOfTest) { diff --git a/browser/ui/views/omnibox/brave_search_conversion_promotion_view.cc b/browser/ui/views/omnibox/brave_search_conversion_promotion_view.cc index f104bdc4f34f..ca09b4b68144 100644 --- a/browser/ui/views/omnibox/brave_search_conversion_promotion_view.cc +++ b/browser/ui/views/omnibox/brave_search_conversion_promotion_view.cc @@ -440,7 +440,7 @@ void BraveSearchConversionPromotionView::ConfigureForButtonType() { button_type_description_->SetAutoColorReadabilityEnabled(false); button_type_description_->SetHorizontalAlignment(gfx::ALIGN_LEFT); button_type_description_->SetTextStyleRange( - ChromeTextStyle::STYLE_EMPHASIZED, gfx::Range(0, first_part.length())); + views::style::STYLE_EMPHASIZED, gfx::Range(0, first_part.length())); contents_container->SetProperty( views::kFlexBehaviorKey, diff --git a/browser/ui/views/profiles/brave_profile_menu_view.h b/browser/ui/views/profiles/brave_profile_menu_view.h index dd2f29fca16a..ed85ac5518a9 100644 --- a/browser/ui/views/profiles/brave_profile_menu_view.h +++ b/browser/ui/views/profiles/brave_profile_menu_view.h @@ -12,12 +12,11 @@ class BraveProfileMenuView : public ProfileMenuView { public: BraveProfileMenuView(const BraveProfileMenuView&) = delete; BraveProfileMenuView& operator=(const BraveProfileMenuView&) = delete; + ~BraveProfileMenuView() override = default; private: friend class ProfileMenuView; - using ProfileMenuView::ProfileMenuView; - ~BraveProfileMenuView() override = default; // Helper methods for building the menu. void BuildIdentity() override; diff --git a/browser/ui/views/profiles/brave_profile_menu_view_browsertest.cc b/browser/ui/views/profiles/brave_profile_menu_view_browsertest.cc index 5b38d002aba5..60eebb9bd7ad 100644 --- a/browser/ui/views/profiles/brave_profile_menu_view_browsertest.cc +++ b/browser/ui/views/profiles/brave_profile_menu_view_browsertest.cc @@ -10,6 +10,7 @@ #include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/ui/views/frame/browser_view.h" #include "chrome/browser/ui/views/profiles/avatar_toolbar_button.h" +#include "chrome/browser/ui/views/profiles/profile_menu_coordinator.h" #include "chrome/browser/ui/views/profiles/profile_menu_view_base.h" #include "chrome/browser/ui/views/toolbar/toolbar_view.h" #include "chrome/test/base/in_process_browser_test.h" @@ -44,11 +45,14 @@ class BraveProfileMenuViewTest : public InProcessBrowserTest { avatar_button()->OnMousePressed(press); avatar_button()->OnMousePressed(release); base::RunLoop().RunUntilIdle(); - EXPECT_TRUE(ProfileMenuViewBase::IsShowing()); + auto* coordinator = ProfileMenuCoordinator::FromBrowser(browser()); + EXPECT_TRUE(coordinator->IsShowing()); } ProfileMenuViewBase* profile_menu() { - ProfileMenuViewBase* bubble = ProfileMenuViewBase::GetBubbleForTesting(); + auto* coordinator = ProfileMenuCoordinator::FromBrowser(browser()); + ProfileMenuViewBase* bubble = + coordinator ? coordinator->GetProfileMenuViewBaseForTesting() : nullptr; DCHECK(bubble); return bubble; } diff --git a/browser/ui/views/side_panel/brave_side_panel.cc b/browser/ui/views/side_panel/brave_side_panel.cc index cbab460e783b..6d721a15580e 100644 --- a/browser/ui/views/side_panel/brave_side_panel.cc +++ b/browser/ui/views/side_panel/brave_side_panel.cc @@ -73,5 +73,14 @@ void BraveSidePanel::OnChildViewRemoved(View* observed_view, View* child) { UpdateVisibility(); } +void BraveSidePanel::SetPanelWidth(int width) { + // Only the width is used by BrowserViewLayout. + SetPreferredSize(gfx::Size(width, 1)); +} + +void BraveSidePanel::OnResize(int resize_amount, bool done_resizing) { + // Do Nothing. +} + BEGIN_METADATA(BraveSidePanel, views::View) END_METADATA diff --git a/browser/ui/views/side_panel/brave_side_panel.h b/browser/ui/views/side_panel/brave_side_panel.h index a20222ec91d3..c258634d5171 100644 --- a/browser/ui/views/side_panel/brave_side_panel.h +++ b/browser/ui/views/side_panel/brave_side_panel.h @@ -7,6 +7,7 @@ #define BRAVE_BROWSER_UI_VIEWS_SIDE_PANEL_BRAVE_SIDE_PANEL_H_ #include "ui/base/metadata/metadata_header_macros.h" +#include "ui/views/controls/resize_area_delegate.h" #include "ui/views/view.h" #include "ui/views/view_observer.h" @@ -14,7 +15,9 @@ class BrowserView; // Replacement for chromium's SidePanel which defines a // unique inset and border style compared to Brave -class BraveSidePanel : public views::View, public views::ViewObserver { +class BraveSidePanel : public views::View, + public views::ViewObserver, + public views::ResizeAreaDelegate { public: // Determines the side from which the side panel will appear. // LTR / RTL conversions are handled in @@ -31,10 +34,14 @@ class BraveSidePanel : public views::View, public views::ViewObserver { BraveSidePanel& operator=(const BraveSidePanel&) = delete; ~BraveSidePanel() override; + void SetPanelWidth(int width); void SetHorizontalAlignment(HorizontalAlignment alignment); HorizontalAlignment GetHorizontalAlignment(); bool IsRightAligned(); + // views::ResizeAreaDelegate: + void OnResize(int resize_amount, bool done_resizing) override; + private: void UpdateVisibility(); void UpdateBorder(); diff --git a/browser/ui/views/sidebar/sidebar_container_view.cc b/browser/ui/views/sidebar/sidebar_container_view.cc index 27a2405e49dc..f600ac47f851 100644 --- a/browser/ui/views/sidebar/sidebar_container_view.cc +++ b/browser/ui/views/sidebar/sidebar_container_view.cc @@ -217,9 +217,9 @@ bool SidebarContainerView::ShouldForceShowSidebar() const { // whether the active index is a panel item rather than checking if // side_panel_ is visible. bool panel_is_active = false; - if (auto active_index = sidebar_model_->active_index(); active_index != -1) { + if (auto active_index = sidebar_model_->active_index()) { const auto& items = sidebar_model_->GetAllSidebarItems(); - const auto& active_item = items[active_index]; + const auto& active_item = items[*active_index]; panel_is_active = active_item.open_in_panel; } // Always show if user is reordering or a menu is visible @@ -264,9 +264,13 @@ void SidebarContainerView::OnMouseExited(const ui::MouseEvent& event) { ShowSidebar(false, true); } -void SidebarContainerView::OnActiveIndexChanged(int old_index, int new_index) { - DVLOG(1) << "OnActiveIndexChanged: " << old_index << " to " << new_index; - if (new_index == -1) { +void SidebarContainerView::OnActiveIndexChanged( + absl::optional old_index, + absl::optional new_index) { + DVLOG(1) << "OnActiveIndexChanged: " + << (old_index ? std::to_string(*old_index) : "none") << " to " + << (new_index ? std::to_string(*new_index) : "none"); + if (!new_index) { // `is_side_panel_event_` is used because `SidePanelCoordinator::Close` // unfortunately calls both the event handler for `OnEntryHidden` as well // as removing the View. Without it, we end up calling @@ -279,7 +283,7 @@ void SidebarContainerView::OnActiveIndexChanged(int old_index, int new_index) { side_panel_coordinator_->Close(); GetFocusManager()->ClearFocus(); } else if (!is_side_panel_event_) { - const auto& item = sidebar_model_->GetAllSidebarItems()[new_index]; + const auto& item = sidebar_model_->GetAllSidebarItems()[*new_index]; if (item.open_in_panel) { // Get side panel entry information side_panel_coordinator_->Show(SidePanelIdFromSideBarItem(item)); @@ -291,12 +295,12 @@ void SidebarContainerView::OnActiveIndexChanged(int old_index, int new_index) { } void SidebarContainerView::OnItemAdded(const sidebar::SidebarItem& item, - int index, + size_t index, bool user_gesture) { UpdateToolbarButtonVisibility(); } -void SidebarContainerView::OnItemRemoved(int index) { +void SidebarContainerView::OnItemRemoved(size_t index) { UpdateToolbarButtonVisibility(); } @@ -401,7 +405,7 @@ void SidebarContainerView::OnEntryHidden(SidePanelEntry* entry) { auto side_bar_index = sidebar_model_->GetIndexOf(item); auto* controller = browser_->sidebar_controller(); if (controller->IsActiveIndex(side_bar_index)) { - controller->ActivateItemAt(-1); + controller->ActivateItemAt(absl::nullopt); } break; } diff --git a/browser/ui/views/sidebar/sidebar_container_view.h b/browser/ui/views/sidebar/sidebar_container_view.h index 774c0526754d..ba360503503a 100644 --- a/browser/ui/views/sidebar/sidebar_container_view.h +++ b/browser/ui/views/sidebar/sidebar_container_view.h @@ -80,10 +80,11 @@ class SidebarContainerView // sidebar::SidebarModel::Observer overrides: void OnItemAdded(const sidebar::SidebarItem& item, - int index, + size_t index, bool user_gesture) override; - void OnActiveIndexChanged(int old_index, int new_index) override; - void OnItemRemoved(int index) override; + void OnActiveIndexChanged(absl::optional old_index, + absl::optional new_index) override; + void OnItemRemoved(size_t index) override; // SidePanelEntryObserver: void OnEntryShown(SidePanelEntry* entry) override; diff --git a/browser/ui/views/sidebar/sidebar_control_view.cc b/browser/ui/views/sidebar/sidebar_control_view.cc index 561f75f59285..a9c67eb9a2d3 100644 --- a/browser/ui/views/sidebar/sidebar_control_view.cc +++ b/browser/ui/views/sidebar/sidebar_control_view.cc @@ -183,12 +183,12 @@ std::u16string SidebarControlView::GetTooltipTextFor( } void SidebarControlView::OnItemAdded(const sidebar::SidebarItem& item, - int index, + size_t index, bool user_gesture) { UpdateItemAddButtonState(); } -void SidebarControlView::OnItemRemoved(int index) { +void SidebarControlView::OnItemRemoved(size_t index) { UpdateItemAddButtonState(); } diff --git a/browser/ui/views/sidebar/sidebar_control_view.h b/browser/ui/views/sidebar/sidebar_control_view.h index a97e4f08fc8f..831446c382e7 100644 --- a/browser/ui/views/sidebar/sidebar_control_view.h +++ b/browser/ui/views/sidebar/sidebar_control_view.h @@ -72,9 +72,9 @@ class SidebarControlView : public views::View, // sidebar::SidebarModel::Observer overrides: void OnItemAdded(const sidebar::SidebarItem& item, - int index, + size_t index, bool user_gesture) override; - void OnItemRemoved(int index) override; + void OnItemRemoved(size_t index) override; void Update(); diff --git a/browser/ui/views/sidebar/sidebar_item_drag_context.cc b/browser/ui/views/sidebar/sidebar_item_drag_context.cc index 4ad82525031b..a2b8cb11131c 100644 --- a/browser/ui/views/sidebar/sidebar_item_drag_context.cc +++ b/browser/ui/views/sidebar/sidebar_item_drag_context.cc @@ -12,22 +12,22 @@ SidebarItemDragContext::~SidebarItemDragContext() = default; // Drag indicator is not equal to target index always. // If item is moving to higher index, target index is 1 smaller index than // indicator index because source item's room is reduced. -int SidebarItemDragContext::GetTargetIndex() const { - return drag_indicator_index_ > source_index_ ? drag_indicator_index_ - 1 - : drag_indicator_index_; +size_t SidebarItemDragContext::GetTargetIndex() const { + size_t index = drag_indicator_index_.value_or(0); + return index > source_index_ ? index - 1 : index; } bool SidebarItemDragContext::ShouldMoveItem() const { - if (drag_indicator_index_ == -1) + if (!drag_indicator_index_) return false; return GetTargetIndex() != source_index_; } void SidebarItemDragContext::Reset() { - source_index_ = -1; + source_index_ = absl::nullopt; source_ = nullptr; - drag_indicator_index_ = -1; + drag_indicator_index_ = absl::nullopt; } // static diff --git a/browser/ui/views/sidebar/sidebar_item_drag_context.h b/browser/ui/views/sidebar/sidebar_item_drag_context.h index 8686c8413c9c..1c6bbcc09667 100644 --- a/browser/ui/views/sidebar/sidebar_item_drag_context.h +++ b/browser/ui/views/sidebar/sidebar_item_drag_context.h @@ -7,6 +7,7 @@ #define BRAVE_BROWSER_UI_VIEWS_SIDEBAR_SIDEBAR_ITEM_DRAG_CONTEXT_H_ #include "base/memory/raw_ptr.h" +#include "third_party/abseil-cpp/absl/types/optional.h" #include "ui/gfx/geometry/point.h" namespace views { @@ -24,21 +25,23 @@ class SidebarItemDragContext final { bool ShouldMoveItem() const; - int source_index() const { return source_index_; } - void set_source_index(int index) { source_index_ = index; } + absl::optional source_index() const { return source_index_; } + void set_source_index(absl::optional index) { source_index_ = index; } void set_source(views::View* source) { source_ = source; } views::View* source() const { return source_; } - void set_drag_indicator_index(int index) { drag_indicator_index_ = index; } - int GetTargetIndex() const; + void set_drag_indicator_index(absl::optional index) { + drag_indicator_index_ = index; + } + size_t GetTargetIndex() const; void Reset(); private: - int source_index_ = -1; + absl::optional source_index_ = absl::nullopt; raw_ptr source_ = nullptr; - int drag_indicator_index_ = -1; + absl::optional drag_indicator_index_ = absl::nullopt; }; #endif // BRAVE_BROWSER_UI_VIEWS_SIDEBAR_SIDEBAR_ITEM_DRAG_CONTEXT_H_ diff --git a/browser/ui/views/sidebar/sidebar_items_contents_view.cc b/browser/ui/views/sidebar/sidebar_items_contents_view.cc index e4790820d3b7..3fca9c40f3db 100644 --- a/browser/ui/views/sidebar/sidebar_items_contents_view.cc +++ b/browser/ui/views/sidebar/sidebar_items_contents_view.cc @@ -110,9 +110,9 @@ void SidebarItemsContentsView::UpdateAllBuiltInItemsViewState() { if (children().size() != items.size()) return; - const int active_index = sidebar_model_->active_index(); - const int items_num = items.size(); - for (int item_index = 0; item_index < items_num; ++item_index) { + auto active_index = sidebar_model_->active_index(); + const size_t items_num = items.size(); + for (size_t item_index = 0; item_index < items_num; ++item_index) { const auto item = items[item_index]; if (!sidebar::IsBuiltInType(item)) continue; @@ -134,13 +134,9 @@ void SidebarItemsContentsView::UpdateAllBuiltInItemsViewState() { std::u16string SidebarItemsContentsView::GetTooltipTextFor( const views::View* view) const { - int index = GetIndexOf(view); - DCHECK_GE(index, 0); - - if (index == -1) - return std::u16string(); - - auto& item = sidebar_model_->GetAllSidebarItems()[index]; + auto index = GetIndexOf(view); + DCHECK(index); + auto& item = sidebar_model_->GetAllSidebarItems()[*index]; if (!item.title.empty()) return item.title; @@ -154,7 +150,7 @@ void SidebarItemsContentsView::ShowContextMenuForViewImpl( if (context_menu_runner_ && context_menu_runner_->IsRunning()) return; - if (GetIndexOf(source) == -1) + if (!GetIndexOf(source)) return; view_for_context_menu_ = source; @@ -185,25 +181,20 @@ void SidebarItemsContentsView::ShowContextMenuForViewImpl( void SidebarItemsContentsView::LaunchEditItemDialog() { DCHECK(!observation_.IsObserving()); DCHECK(view_for_context_menu_); - int index = GetIndexOf(view_for_context_menu_); + auto index = GetIndexOf(view_for_context_menu_); const auto& items = sidebar_model_->GetAllSidebarItems(); auto* bubble = views::BubbleDialogDelegateView::CreateBubble( - new SidebarEditItemBubbleDelegateView(browser_, items[index], + new SidebarEditItemBubbleDelegateView(browser_, items[*index], view_for_context_menu_)); observation_.Observe(bubble); bubble->Show(); } void SidebarItemsContentsView::ExecuteCommand(int command_id, int event_flags) { - int index = GetIndexOf(view_for_context_menu_); - DCHECK_GE(index, 0); - - if (index == -1) - return; - + auto index = GetIndexOf(view_for_context_menu_); if (command_id == kItemRemove) { - GetSidebarService(browser_)->RemoveItemAt(index); + GetSidebarService(browser_)->RemoveItemAt(*index); return; } @@ -216,19 +207,17 @@ void SidebarItemsContentsView::ExecuteCommand(int command_id, int event_flags) { } bool SidebarItemsContentsView::IsCommandIdVisible(int command_id) const { - int index = GetIndexOf(view_for_context_menu_); + auto index = GetIndexOf(view_for_context_menu_); const auto& items = sidebar_model_->GetAllSidebarItems(); - DCHECK(0 <= index && index < static_cast(items.size())); - - if (index == -1) - return false; + DCHECK(index < items.size()); + DCHECK(index); // Available for all items. if (command_id == kItemRemove) return true; if (command_id == kItemEdit) - return GetSidebarService(browser_)->IsEditableItemAt(index); + return GetSidebarService(browser_)->IsEditableItemAt(*index); NOTREACHED(); return false; @@ -250,13 +239,14 @@ void SidebarItemsContentsView::OnItemRemoved(int index) { InvalidateLayout(); } -void SidebarItemsContentsView::OnActiveIndexChanged(int old_index, - int new_index) { - if (old_index != -1) - UpdateItemViewStateAt(old_index, false); +void SidebarItemsContentsView::OnActiveIndexChanged( + absl::optional old_index, + absl::optional new_index) { + if (old_index) + UpdateItemViewStateAt(*old_index, false); - if (new_index != -1) - UpdateItemViewStateAt(new_index, true); + if (new_index) + UpdateItemViewStateAt(*new_index, true); } void SidebarItemsContentsView::OnItemMoved(const sidebar::SidebarItem& item, @@ -336,18 +326,18 @@ void SidebarItemsContentsView::ShowItemAddedFeedbackBubble( } bool SidebarItemsContentsView::IsBuiltInTypeItemView(views::View* view) const { - const int index = GetIndexOf(view); - return sidebar::IsBuiltInType(sidebar_model_->GetAllSidebarItems()[index]); + auto index = GetIndexOf(view); + return sidebar::IsBuiltInType(sidebar_model_->GetAllSidebarItems()[*index]); } void SidebarItemsContentsView::SetImageForItem(const sidebar::SidebarItem& item, const gfx::ImageSkia& image) { - int index = sidebar_model_->GetIndexOf(item); - // -1 means |item| is deleted while fetching favicon. - if (index == -1) + auto index = sidebar_model_->GetIndexOf(item); + // disengaged means |item| is deleted while fetching favicon. + if (!index) return; - SidebarItemView* item_view = GetItemViewAt(index); + SidebarItemView* item_view = GetItemViewAt(*index); item_view->SetImage( views::Button::STATE_NORMAL, gfx::ImageSkiaOperations::CreateResizedImage( @@ -360,7 +350,8 @@ void SidebarItemsContentsView::ClearDragIndicator() { } } -int SidebarItemsContentsView::CalculateTargetDragIndicatorIndex( +absl::optional +SidebarItemsContentsView::CalculateTargetDragIndicatorIndex( const gfx::Point& screen_position) { // Find which item view includes this |screen_position|. const int child_count = children().size(); @@ -376,17 +367,19 @@ int SidebarItemsContentsView::CalculateTargetDragIndicatorIndex( } NOTREACHED(); - return -1; + return absl::nullopt; } -int SidebarItemsContentsView::DrawDragIndicator(views::View* source, - const gfx::Point& position) { - const int source_view_index = GetIndexOf(source); - int target_index = CalculateTargetDragIndicatorIndex(position); +absl::optional SidebarItemsContentsView::DrawDragIndicator( + views::View* source, + const gfx::Point& position) { + auto source_view_index = GetIndexOf(source); + auto target_index = CalculateTargetDragIndicatorIndex(position); // If target position is right before or right after, don't need to draw // drag indicator. + DCHECK(source_view_index); if (source_view_index == target_index || - source_view_index + 1 == target_index) { + *source_view_index + 1 == target_index) { ClearDragIndicator(); } else { DoDrawDragIndicator(target_index); @@ -395,28 +388,30 @@ int SidebarItemsContentsView::DrawDragIndicator(views::View* source, return target_index; } -void SidebarItemsContentsView::DoDrawDragIndicator(int index) { +void SidebarItemsContentsView::DoDrawDragIndicator( + absl::optional index) { // Clear current drag indicator. ClearDragIndicator(); - if (index == -1) + if (!index) return; // Use item's top or bottom border as a drag indicator. // Item's top border is used as a drag indicator except last item. // Last item's bottom border is used for indicator when drag candidate // position is behind the last item. - const int child_count = children().size(); - const bool draw_top_border = child_count != index; - const int item_index = draw_top_border ? index : index - 1; + const size_t child_count = children().size(); + const bool draw_top_border = child_count != *index; + const size_t item_index = draw_top_border ? *index : *index - 1; GetItemViewAt(item_index)->DrawHorizontalBorder(draw_top_border); } -SidebarItemView* SidebarItemsContentsView::GetItemViewAt(int index) { +SidebarItemView* SidebarItemsContentsView::GetItemViewAt(size_t index) { return static_cast(children()[index]); } -void SidebarItemsContentsView::UpdateItemViewStateAt(int index, bool active) { +void SidebarItemsContentsView::UpdateItemViewStateAt(size_t index, + bool active) { const auto& item = sidebar_model_->GetAllSidebarItems()[index]; SidebarItemView* item_view = GetItemViewAt(index); @@ -437,11 +432,11 @@ void SidebarItemsContentsView::UpdateItemViewStateAt(int index, bool active) { void SidebarItemsContentsView::OnItemPressed(const views::View* item, const ui::Event& event) { auto* controller = browser_->sidebar_controller(); - const int index = GetIndexOf(item); + auto index = GetIndexOf(item); if (controller->IsActiveIndex(index)) { // TODO(simonhong): This is for demo. We will have another UI for closing. // De-activate active item. - controller->ActivateItemAt(-1); + controller->ActivateItemAt(absl::nullopt); return; } diff --git a/browser/ui/views/sidebar/sidebar_items_contents_view.h b/browser/ui/views/sidebar/sidebar_items_contents_view.h index 4afd1a2dc370..561decbe45ec 100644 --- a/browser/ui/views/sidebar/sidebar_items_contents_view.h +++ b/browser/ui/views/sidebar/sidebar_items_contents_view.h @@ -68,7 +68,8 @@ class SidebarItemsContentsView : public views::View, bool user_gesture); void OnItemMoved(const sidebar::SidebarItem& item, int from, int to); void OnItemRemoved(int index); - void OnActiveIndexChanged(int old_index, int new_index); + void OnActiveIndexChanged(absl::optional old_index, + absl::optional new_index); void ShowItemAddedFeedbackBubble(); @@ -78,7 +79,8 @@ class SidebarItemsContentsView : public views::View, // |source| is drag source view. // |position| is in local coordinate space of |source|. // Returns drag indicator index. - int DrawDragIndicator(views::View* source, const gfx::Point& position); + absl::optional DrawDragIndicator(views::View* source, + const gfx::Point& position); void ClearDragIndicator(); bool IsBubbleVisible() const; @@ -96,7 +98,7 @@ class SidebarItemsContentsView : public views::View, void AddItemView(const sidebar::SidebarItem& item, int index, bool user_gesture); - void UpdateItemViewStateAt(int index, bool active); + void UpdateItemViewStateAt(size_t index, bool active); bool IsBuiltInTypeItemView(views::View* view) const; // Called when each item is pressed. @@ -112,9 +114,10 @@ class SidebarItemsContentsView : public views::View, // When item count is five, drag indicator is drawn in front of first item. // If |index| is 5, it's drawn after the last item. // Pass -1 to remove indicator. - void DoDrawDragIndicator(int index); - int CalculateTargetDragIndicatorIndex(const gfx::Point& screen_position); - SidebarItemView* GetItemViewAt(int index); + void DoDrawDragIndicator(absl::optional index); + absl::optional CalculateTargetDragIndicatorIndex( + const gfx::Point& screen_position); + SidebarItemView* GetItemViewAt(size_t index); void LaunchEditItemDialog(); raw_ptr browser_ = nullptr; diff --git a/browser/ui/views/sidebar/sidebar_items_scroll_view.cc b/browser/ui/views/sidebar/sidebar_items_scroll_view.cc index a72b87892c40..acd7bd48b16a 100644 --- a/browser/ui/views/sidebar/sidebar_items_scroll_view.cc +++ b/browser/ui/views/sidebar/sidebar_items_scroll_view.cc @@ -194,7 +194,7 @@ void SidebarItemsScrollView::OnBoundsAnimatorDone( } void SidebarItemsScrollView::OnItemAdded(const sidebar::SidebarItem& item, - int index, + size_t index, bool user_gesture) { contents_view_->OnItemAdded(item, index, user_gesture); @@ -216,23 +216,24 @@ void SidebarItemsScrollView::OnItemAdded(const sidebar::SidebarItem& item, } void SidebarItemsScrollView::OnItemMoved(const sidebar::SidebarItem& item, - int from, - int to) { + size_t from, + size_t to) { contents_view_->OnItemMoved(item, from, to); } -void SidebarItemsScrollView::OnItemRemoved(int index) { +void SidebarItemsScrollView::OnItemRemoved(size_t index) { contents_view_->OnItemRemoved(index); } -void SidebarItemsScrollView::OnActiveIndexChanged(int old_index, - int new_index) { +void SidebarItemsScrollView::OnActiveIndexChanged( + absl::optional old_index, + absl::optional new_index) { contents_view_->OnActiveIndexChanged(old_index, new_index); } void SidebarItemsScrollView::OnWillUpdateFavicon( const sidebar::SidebarItem& item, - int index) { + size_t index) { contents_view_->SetDefaultImageAt(index, item); } @@ -408,13 +409,13 @@ int SidebarItemsScrollView::OnDragUpdated(const ui::DropTargetEvent& event) { gfx::Point screen_position = event.location(); views::View::ConvertPointToScreen(this, &screen_position); views::View* view = drag_context_->source(); - const int target_index = + auto target_index = contents_view_->DrawDragIndicator(view, screen_position); drag_context_->set_drag_indicator_index(target_index); ret = ui::DragDropTypes::DRAG_MOVE; } else { contents_view_->ClearDragIndicator(); - drag_context_->set_drag_indicator_index(-1); + drag_context_->set_drag_indicator_index(absl::nullopt); } return ret; @@ -434,7 +435,7 @@ void SidebarItemsScrollView::PerformDrop( output_drag_op = ui::mojom::DragOperation::kMove; auto* service = sidebar::SidebarServiceFactory::GetForProfile(browser_->profile()); - service->MoveItem(drag_context_->source_index(), + service->MoveItem(*drag_context_->source_index(), drag_context_->GetTargetIndex()); } @@ -473,7 +474,7 @@ bool SidebarItemsScrollView::CanStartDragForView(views::View* sender, } bool SidebarItemsScrollView::IsItemReorderingInProgress() const { - return drag_context_->source_index() != -1; + return drag_context_->source_index() != absl::nullopt; } bool SidebarItemsScrollView::IsBubbleVisible() const { diff --git a/browser/ui/views/sidebar/sidebar_items_scroll_view.h b/browser/ui/views/sidebar/sidebar_items_scroll_view.h index 1d4f2ce8a23a..1d3f55ce4f86 100644 --- a/browser/ui/views/sidebar/sidebar_items_scroll_view.h +++ b/browser/ui/views/sidebar/sidebar_items_scroll_view.h @@ -77,13 +77,16 @@ class SidebarItemsScrollView : public views::View, // sidebar::SidebarModel::Observer overrides: void OnItemAdded(const sidebar::SidebarItem& item, - int index, + size_t index, bool user_gesture) override; - void OnItemMoved(const sidebar::SidebarItem& item, int from, int to) override; - void OnItemRemoved(int index) override; - void OnActiveIndexChanged(int old_index, int new_index) override; + void OnItemMoved(const sidebar::SidebarItem& item, + size_t from, + size_t to) override; + void OnItemRemoved(size_t index) override; + void OnActiveIndexChanged(absl::optional old_index, + absl::optional new_index) override; void OnWillUpdateFavicon(const sidebar::SidebarItem& item, - int index) override; + size_t index) override; void OnFaviconUpdatedForItem(const sidebar::SidebarItem& item, const gfx::ImageSkia& image) override; diff --git a/browser/ui/views/toolbar/brave_toolbar_view.cc b/browser/ui/views/toolbar/brave_toolbar_view.cc index eea280d137d1..88a70cb2e9f0 100644 --- a/browser/ui/views/toolbar/brave_toolbar_view.cc +++ b/browser/ui/views/toolbar/brave_toolbar_view.cc @@ -153,7 +153,7 @@ void BraveToolbarView::Init() { bookmark_ = AddChildViewAt(std::make_unique(base::BindRepeating( callback, browser_, IDC_BOOKMARK_THIS_TAB)), - GetIndexOf(location_bar_)); + *GetIndexOf(location_bar_)); bookmark_->SetTriggerableEventFlags(ui::EF_LEFT_MOUSE_BUTTON | ui::EF_MIDDLE_MOUSE_BUTTON); bookmark_->UpdateImageAndText(); @@ -162,7 +162,7 @@ void BraveToolbarView::Init() { brave_wallet::IsAllowedForContext(profile)) { wallet_ = AddChildViewAt( std::make_unique(GetAppMenuButton(), profile->GetPrefs()), - GetIndexOf(GetAppMenuButton()) - 1); + *GetIndexOf(GetAppMenuButton()) - 1); wallet_->SetTriggerableEventFlags(ui::EF_LEFT_MOUSE_BUTTON | ui::EF_MIDDLE_MOUSE_BUTTON); wallet_->UpdateImageAndText(); @@ -175,7 +175,7 @@ void BraveToolbarView::Init() { base::BindRepeating(&BraveToolbarView::OnVPNButtonVisibilityChanged, base::Unretained(this))); brave_vpn_ = AddChildViewAt(std::make_unique(browser()), - GetIndexOf(GetAppMenuButton()) - 1); + *GetIndexOf(GetAppMenuButton()) - 1); brave_vpn_->SetVisible(show_brave_vpn_button_.GetValue()); } #endif diff --git a/browser/ui/webui/brave_rewards_source.cc b/browser/ui/webui/brave_rewards_source.cc index 27fa20ed37c4..685e17f6457a 100644 --- a/browser/ui/webui/brave_rewards_source.cc +++ b/browser/ui/webui/brave_rewards_source.cc @@ -87,7 +87,7 @@ void BraveRewardsSource::StartDataRequest( } } -std::string BraveRewardsSource::GetMimeType(const std::string&) { +std::string BraveRewardsSource::GetMimeType(const GURL& url) { // We need to explicitly return a mime type, otherwise if the user tries to // drag the image they get no extension. return "image/png"; diff --git a/browser/ui/webui/brave_rewards_source.h b/browser/ui/webui/brave_rewards_source.h index 8b17abd76158..1625c6020954 100644 --- a/browser/ui/webui/brave_rewards_source.h +++ b/browser/ui/webui/brave_rewards_source.h @@ -33,7 +33,7 @@ class BraveRewardsSource : public content::URLDataSource { const content::WebContents::Getter& wc_getter, content::URLDataSource::GotDataCallback got_data_callback) override; - std::string GetMimeType(const std::string&) override; + std::string GetMimeType(const GURL& url) override; bool AllowCaching() override; bool ShouldReplaceExistingSource() override; bool ShouldServiceRequest(const GURL& url, diff --git a/build/android/bytecode/BUILD.gn b/build/android/bytecode/BUILD.gn index f0443b546544..425d71ee8268 100644 --- a/build/android/bytecode/BUILD.gn +++ b/build/android/bytecode/BUILD.gn @@ -25,6 +25,7 @@ java_binary("java_bytecode_rewriter") { "//brave/build/android/bytecode/java/org/brave/bytecode/BraveDefaultBrowserPromoUtilsClassAdapter.java", "//brave/build/android/bytecode/java/org/brave/bytecode/BraveDropdownItemViewInfoListBuilderClassAdapter.java", "//brave/build/android/bytecode/java/org/brave/bytecode/BraveDropdownItemViewInfoListManagerClassAdapter.java", + "//brave/build/android/bytecode/java/org/brave/bytecode/BraveDynamicColorsClassAdapter.java", "//brave/build/android/bytecode/java/org/brave/bytecode/BraveEditUrlSuggestionProcessorClassAdapter.java", "//brave/build/android/bytecode/java/org/brave/bytecode/BraveFeedSurfaceCoordinatorClassAdapter.java", "//brave/build/android/bytecode/java/org/brave/bytecode/BraveFeedSurfaceMediatorClassAdapter.java", diff --git a/build/android/bytecode/java/org/brave/bytecode/BraveClassAdapter.java b/build/android/bytecode/java/org/brave/bytecode/BraveClassAdapter.java index 8fc16ebbc23b..6c5535b0a3f8 100644 --- a/build/android/bytecode/java/org/brave/bytecode/BraveClassAdapter.java +++ b/build/android/bytecode/java/org/brave/bytecode/BraveClassAdapter.java @@ -24,6 +24,7 @@ public static ClassVisitor createAdapter(ClassVisitor chain) { chain = new BraveDefaultBrowserPromoUtilsClassAdapter(chain); chain = new BraveDropdownItemViewInfoListBuilderClassAdapter(chain); chain = new BraveDropdownItemViewInfoListManagerClassAdapter(chain); + chain = new BraveDynamicColorsClassAdapter(chain); chain = new BraveEditUrlSuggestionProcessorClassAdapter(chain); chain = new BraveFeedSurfaceCoordinatorClassAdapter(chain); chain = new BraveFeedSurfaceMediatorClassAdapter(chain); diff --git a/build/android/bytecode/java/org/brave/bytecode/BraveDynamicColorsClassAdapter.java b/build/android/bytecode/java/org/brave/bytecode/BraveDynamicColorsClassAdapter.java new file mode 100644 index 000000000000..7047429db322 --- /dev/null +++ b/build/android/bytecode/java/org/brave/bytecode/BraveDynamicColorsClassAdapter.java @@ -0,0 +1,22 @@ +/* Copyright (c) 2022 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +package org.brave.bytecode; + +import org.objectweb.asm.ClassVisitor; + +public class BraveDynamicColorsClassAdapter extends BraveClassVisitor { + static String sDynamicColorsClassName = "com/google/android/material/color/DynamicColors"; + + static String sBraveDynamicColorsClassName = + "org/chromium/chrome/browser/util/BraveDynamicColors"; + + public BraveDynamicColorsClassAdapter(ClassVisitor visitor) { + super(visitor); + + changeMethodOwner(sDynamicColorsClassName, "applyToActivityIfAvailable", + sBraveDynamicColorsClassName); + } +} diff --git a/build/android/bytecode/java/org/brave/bytecode/BraveManageAccountDevicesLinkViewClassAdapter.java b/build/android/bytecode/java/org/brave/bytecode/BraveManageAccountDevicesLinkViewClassAdapter.java index 8dffac1f3fac..0bc7d30bf5cc 100644 --- a/build/android/bytecode/java/org/brave/bytecode/BraveManageAccountDevicesLinkViewClassAdapter.java +++ b/build/android/bytecode/java/org/brave/bytecode/BraveManageAccountDevicesLinkViewClassAdapter.java @@ -16,10 +16,9 @@ public class BraveManageAccountDevicesLinkViewClassAdapter extends BraveClassVis public BraveManageAccountDevicesLinkViewClassAdapter(ClassVisitor visitor) { super(visitor); - redirectConstructor(sManageAccountDevicesLinkView, sBraveManageAccountDevicesLinkView); + changeSuperName(sManageAccountDevicesLinkView, sBraveManageAccountDevicesLinkView); - makePublicMethod(sManageAccountDevicesLinkView, "inflateIfVisible"); - addMethodAnnotation( - sBraveManageAccountDevicesLinkView, "inflateIfVisible", "Ljava/lang/Override;"); + changeMethodOwner(sManageAccountDevicesLinkView, "inflateIfVisible", + sBraveManageAccountDevicesLinkView); } } diff --git a/build/config.gni b/build/config.gni index 7d69fd515d9a..8ae7b17ac40f 100644 --- a/build/config.gni +++ b/build/config.gni @@ -1,5 +1,5 @@ import("//build/util/branding.gni") -import("//build/util/version.gni") +import("//chrome/version.gni") declare_args() { # Release channel support. diff --git a/build/mac/BUILD.gn b/build/mac/BUILD.gn index 55c5c7c29122..66e69ffa5536 100644 --- a/build/mac/BUILD.gn +++ b/build/mac/BUILD.gn @@ -1,8 +1,8 @@ import("//brave/build/config.gni") import("//brave/build/mac/config.gni") import("//build/util/branding.gni") -import("//build/util/version.gni") import("//chrome/common/features.gni") +import("//chrome/version.gni") import("//third_party/widevine/cdm/widevine.gni") packaging_dir = "$brave_packaging_base_dir/" + diff --git a/chromium_src/base/check.cc b/chromium_src/base/check.cc deleted file mode 100644 index 1da20c9ab955..000000000000 --- a/chromium_src/base/check.cc +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (c) 2020 The Brave Authors. All rights reserved. - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "base/check.h" - -// Xcode's clang doesn't know about #pragma clang max_tokens_here -#if !defined(ANDROID) && defined(__APPLE__) -#include -#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE -#define NACL_TC_REV 1 -#endif -#endif -#include "src/base/check.cc" diff --git a/chromium_src/base/check_op.cc b/chromium_src/base/check_op.cc deleted file mode 100644 index 7f82fcf16045..000000000000 --- a/chromium_src/base/check_op.cc +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (c) 2020 The Brave Authors. All rights reserved. - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "base/check_op.h" - -// Xcode's clang doesn't know about #pragma clang max_tokens_here -#if !defined(ANDROID) && defined(__APPLE__) -#include -#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE -#define NACL_TC_REV 1 -#endif -#endif -#include "src/base/check_op.cc" diff --git a/chromium_src/base/debug/alias.cc b/chromium_src/base/debug/alias.cc deleted file mode 100644 index 3b6902e7ebae..000000000000 --- a/chromium_src/base/debug/alias.cc +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (c) 2020 The Brave Authors. All rights reserved. - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "base/debug/alias.h" - -// Xcode's clang doesn't know about #pragma clang max_tokens_here -#if !defined(ANDROID) && defined(__APPLE__) -#include -#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE -#define NACL_TC_REV 1 -#endif -#endif -#include "src/base/debug/alias.cc" diff --git a/chromium_src/base/logging.cc b/chromium_src/base/logging.cc deleted file mode 100644 index aad55e8eb17a..000000000000 --- a/chromium_src/base/logging.cc +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (c) 2020 The Brave Authors. All rights reserved. - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "base/logging.h" - -// Xcode's clang doesn't know about #pragma clang max_tokens_here -#if !defined(ANDROID) && defined(__APPLE__) -#include -#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE -#define NACL_TC_REV 1 -#endif -#endif -#include "src/base/logging.cc" diff --git a/chromium_src/chrome/browser/bookmarks/bookmark_model_factory.cc b/chromium_src/chrome/browser/bookmarks/bookmark_model_factory.cc index 9044533ce754..b578b2f4e284 100644 --- a/chromium_src/chrome/browser/bookmarks/bookmark_model_factory.cc +++ b/chromium_src/chrome/browser/bookmarks/bookmark_model_factory.cc @@ -5,6 +5,10 @@ #include "brave/browser/profiles/profile_util.h" -#define GetBrowserContextRedirectedInIncognito \ - GetBrowserContextRedirectedInIncognitoOverride #include "src/chrome/browser/bookmarks/bookmark_model_factory.cc" + +content::BrowserContext* BookmarkModelFactory::GetBrowserContextToUse( + content::BrowserContext* context) const { + // To make different service for normal and incognito profile. + return chrome::GetBrowserContextRedirectedInIncognitoOverride(context); +} diff --git a/chromium_src/chrome/browser/bookmarks/bookmark_model_factory.h b/chromium_src/chrome/browser/bookmarks/bookmark_model_factory.h new file mode 100644 index 000000000000..5a27bb85e1dd --- /dev/null +++ b/chromium_src/chrome/browser/bookmarks/bookmark_model_factory.h @@ -0,0 +1,21 @@ +/* Copyright (c) 2022 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef BRAVE_CHROMIUM_SRC_CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_FACTORY_H_ +#define BRAVE_CHROMIUM_SRC_CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_FACTORY_H_ + +#include "chrome/browser/profiles/profile_keyed_service_factory.h" + +#define ServiceIsNULLWhileTesting \ + ServiceIsNULLWhileTesting_unused(); \ + content::BrowserContext* GetBrowserContextToUse( \ + content::BrowserContext* context) const override; \ + bool ServiceIsNULLWhileTesting + +#include "src/chrome/browser/bookmarks/bookmark_model_factory.h" + +#undef ServiceIsNULLWhileTesting + +#endif // BRAVE_CHROMIUM_SRC_CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_FACTORY_H_ diff --git a/chromium_src/chrome/browser/bookmarks/managed_bookmark_service_factory.cc b/chromium_src/chrome/browser/bookmarks/managed_bookmark_service_factory.cc index 9ec7dcb35ff0..bc2ef52f99dc 100644 --- a/chromium_src/chrome/browser/bookmarks/managed_bookmark_service_factory.cc +++ b/chromium_src/chrome/browser/bookmarks/managed_bookmark_service_factory.cc @@ -5,6 +5,10 @@ #include "brave/browser/profiles/profile_util.h" -#define GetBrowserContextRedirectedInIncognito \ - GetBrowserContextRedirectedInIncognitoOverride #include "src/chrome/browser/bookmarks/managed_bookmark_service_factory.cc" + +content::BrowserContext* ManagedBookmarkServiceFactory::GetBrowserContextToUse( + content::BrowserContext* context) const { + // To make different service for normal and incognito profile. + return chrome::GetBrowserContextRedirectedInIncognitoOverride(context); +} diff --git a/chromium_src/chrome/browser/bookmarks/managed_bookmark_service_factory.h b/chromium_src/chrome/browser/bookmarks/managed_bookmark_service_factory.h new file mode 100644 index 000000000000..ba3a6e5e6fa0 --- /dev/null +++ b/chromium_src/chrome/browser/bookmarks/managed_bookmark_service_factory.h @@ -0,0 +1,21 @@ +/* Copyright (c) 2022 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef BRAVE_CHROMIUM_SRC_CHROME_BROWSER_BOOKMARKS_MANAGED_BOOKMARK_SERVICE_FACTORY_H_ +#define BRAVE_CHROMIUM_SRC_CHROME_BROWSER_BOOKMARKS_MANAGED_BOOKMARK_SERVICE_FACTORY_H_ + +#include "chrome/browser/profiles/profile_keyed_service_factory.h" + +#define ServiceIsNULLWhileTesting \ + ServiceIsNULLWhileTesting_unused(); \ + content::BrowserContext* GetBrowserContextToUse( \ + content::BrowserContext* context) const override; \ + bool ServiceIsNULLWhileTesting + +#include "src/chrome/browser/bookmarks/managed_bookmark_service_factory.h" + +#undef ServiceIsNULLWhileTesting + +#endif // BRAVE_CHROMIUM_SRC_CHROME_BROWSER_BOOKMARKS_MANAGED_BOOKMARK_SERVICE_FACTORY_H_ diff --git a/chromium_src/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_factory.cc b/chromium_src/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_factory.cc index c9a17007d7a1..6609954ff4c0 100644 --- a/chromium_src/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_factory.cc +++ b/chromium_src/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_factory.cc @@ -5,4 +5,6 @@ #include "brave/browser/browsing_data/brave_browsing_data_remover_delegate.h" +#define ChromeBrowsingDataRemoverDelegate BraveBrowsingDataRemoverDelegate #include "src/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_factory.cc" +#undef ChromeBrowsingDataRemoverDelegate diff --git a/chromium_src/chrome/browser/permissions/permission_manager_factory.h b/chromium_src/chrome/browser/permissions/permission_manager_factory.h index f7f87df60377..d221e4b88ac1 100644 --- a/chromium_src/chrome/browser/permissions/permission_manager_factory.h +++ b/chromium_src/chrome/browser/permissions/permission_manager_factory.h @@ -8,9 +8,21 @@ #include "components/keyed_service/content/browser_context_keyed_service_factory.h" -#define BuildServiceInstanceFor \ - BuildServiceInstanceFor_ChromiumImpl(content::BrowserContext* profile) \ - const; \ +namespace brave_wallet { +class EthereumProviderImplUnitTest; +class SolanaProviderImplUnitTest; +} // namespace brave_wallet + +namespace permissions { +class BraveWalletPermissionContextUnitTest; +} + +#define BuildServiceInstanceFor \ + BuildServiceInstanceFor_ChromiumImpl(content::BrowserContext* profile) \ + const; \ + friend brave_wallet::EthereumProviderImplUnitTest; \ + friend brave_wallet::SolanaProviderImplUnitTest; \ + friend permissions::BraveWalletPermissionContextUnitTest; \ KeyedService* BuildServiceInstanceFor #include "src/chrome/browser/permissions/permission_manager_factory.h" diff --git a/chromium_src/chrome/browser/prefetch/prefetch_proxy/prefetch_proxy_features.cc b/chromium_src/chrome/browser/preloading/prefetch/prefetch_proxy/prefetch_proxy_features.cc similarity index 83% rename from chromium_src/chrome/browser/prefetch/prefetch_proxy/prefetch_proxy_features.cc rename to chromium_src/chrome/browser/preloading/prefetch/prefetch_proxy/prefetch_proxy_features.cc index 4c3560233969..7f1fb0b7d9ea 100644 --- a/chromium_src/chrome/browser/prefetch/prefetch_proxy/prefetch_proxy_features.cc +++ b/chromium_src/chrome/browser/preloading/prefetch/prefetch_proxy/prefetch_proxy_features.cc @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at https://mozilla.org/MPL/2.0/. */ -#include "src/chrome/browser/prefetch/prefetch_proxy/prefetch_proxy_features.cc" +#include "src/chrome/browser/preloading/prefetch/prefetch_proxy/prefetch_proxy_features.cc" #include "base/feature_override.h" diff --git a/chromium_src/chrome/browser/privacy_sandbox/BUILD.gn b/chromium_src/chrome/browser/privacy_sandbox/BUILD.gn index 1fe5f71bf716..166e91b8b754 100644 --- a/chromium_src/chrome/browser/privacy_sandbox/BUILD.gn +++ b/chromium_src/chrome/browser/privacy_sandbox/BUILD.gn @@ -23,8 +23,8 @@ source_set("unit_tests") { "//components/signin/public/identity_manager", "//components/signin/public/identity_manager:test_support", "//components/strings:components_strings", + "//components/sync:test_support", "//components/sync/base", - "//components/sync/driver:test_support", "//components/sync_preferences:test_support", "//content/public/common", "//content/test:test_support", diff --git a/chromium_src/chrome/browser/profiles/off_the_record_profile_impl.cc b/chromium_src/chrome/browser/profiles/off_the_record_profile_impl.cc new file mode 100644 index 000000000000..5d8a3e549d6d --- /dev/null +++ b/chromium_src/chrome/browser/profiles/off_the_record_profile_impl.cc @@ -0,0 +1,8 @@ +/* Copyright (c) 2022 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#define ChromeBrowsingDataRemoverDelegate BraveBrowsingDataRemoverDelegate +#include "src/chrome/browser/profiles/off_the_record_profile_impl.cc" +#undef ChromeBrowsingDataRemoverDelegate diff --git a/chromium_src/chrome/browser/profiles/profile_destroyer.cc b/chromium_src/chrome/browser/profiles/profile_destroyer.cc deleted file mode 100644 index 2dfc02c15827..000000000000 --- a/chromium_src/chrome/browser/profiles/profile_destroyer.cc +++ /dev/null @@ -1,16 +0,0 @@ -/* Copyright (c) 2022 The Brave Authors. All rights reserved. - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "chrome/browser/profiles/profile_destroyer.h" - -// When there are multiple OTR profiles, such as with a Private window and a Tor -// window open, it doesn't make sense that when destroying one of the OTR -// profiles the Chromium code wants to check that hosts for all OTR profiles are -// gone. -#define BRAVE_PROFILE_DESTROYER_DESTROY_PROFILE_WHEN_APPROPRIATE \ - if (!profile->IsOffTheRecord()) - -#include "src/chrome/browser/profiles/profile_destroyer.cc" -#undef BRAVE_PROFILE_DESTROYER_DESTROY_PROFILE_WHEN_APPROPRIATE diff --git a/chromium_src/chrome/browser/profiles/profile_impl.cc b/chromium_src/chrome/browser/profiles/profile_impl.cc index 2af4b6bd5919..2f3743b7d1db 100644 --- a/chromium_src/chrome/browser/profiles/profile_impl.cc +++ b/chromium_src/chrome/browser/profiles/profile_impl.cc @@ -6,5 +6,7 @@ #include "brave/browser/profiles/brave_bookmark_model_loaded_observer.h" #include "brave/browser/profiles/brave_profile_impl.h" #define BookmarkModelLoadedObserver BraveBookmarkModelLoadedObserver +#define ChromeBrowsingDataRemoverDelegate BraveBrowsingDataRemoverDelegate #include "src/chrome/browser/profiles/profile_impl.cc" #undef BookmarkModelLoadedObserver +#undef ChromeBrowsingDataRemoverDelegate diff --git a/chromium_src/chrome/browser/profiles/profile_keyed_service_factory.h b/chromium_src/chrome/browser/profiles/profile_keyed_service_factory.h new file mode 100644 index 000000000000..f85b344f66b0 --- /dev/null +++ b/chromium_src/chrome/browser/profiles/profile_keyed_service_factory.h @@ -0,0 +1,16 @@ +/* Copyright (c) 2020 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef BRAVE_CHROMIUM_SRC_CHROME_BROWSER_PROFILES_PROFILE_KEYED_SERVICE_FACTORY_H_ +#define BRAVE_CHROMIUM_SRC_CHROME_BROWSER_PROFILES_PROFILE_KEYED_SERVICE_FACTORY_H_ + +#include "chrome/browser/profiles/profile_selections.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" + +#define final override +#include "src/chrome/browser/profiles/profile_keyed_service_factory.h" +#undef final + +#endif // BRAVE_CHROMIUM_SRC_CHROME_BROWSER_PROFILES_PROFILE_KEYED_SERVICE_FACTORY_H_ diff --git a/chromium_src/chrome/browser/search_engines/template_url_service_factory.cc b/chromium_src/chrome/browser/search_engines/template_url_service_factory.cc index b481b027a93b..39ae7cb66293 100644 --- a/chromium_src/chrome/browser/search_engines/template_url_service_factory.cc +++ b/chromium_src/chrome/browser/search_engines/template_url_service_factory.cc @@ -5,11 +5,10 @@ #include "chrome/browser/search_engines/template_url_service_factory.h" #include "chrome/browser/history/history_service_factory.h" +#include "chrome/browser/profiles/incognito_helpers.h" #include "chrome/browser/web_data_service_factory.h" -#define GetBrowserContextToUse GetBrowserContextToUse_unused #include "src/chrome/browser/search_engines/template_url_service_factory.cc" -#undef GetBrowserContextToUse content::BrowserContext* TemplateURLServiceFactory::GetBrowserContextToUse( content::BrowserContext* context) const { diff --git a/chromium_src/chrome/browser/search_engines/template_url_service_factory.h b/chromium_src/chrome/browser/search_engines/template_url_service_factory.h index 7468faad90de..ea94a616b3bb 100644 --- a/chromium_src/chrome/browser/search_engines/template_url_service_factory.h +++ b/chromium_src/chrome/browser/search_engines/template_url_service_factory.h @@ -9,12 +9,14 @@ #include "components/keyed_service/content/browser_context_keyed_service_factory.h" #include "content/public/browser/browser_context.h" -#define GetBrowserContextToUse \ - GetBrowserContextToUse_unused(content::BrowserContext* context) const; \ - content::BrowserContext* GetBrowserContextToUse +#define BuildServiceInstanceFor \ + BuildServiceInstanceFor_unused(); \ + content::BrowserContext* GetBrowserContextToUse( \ + content::BrowserContext* context) const override; \ + KeyedService* BuildServiceInstanceFor #include "src/chrome/browser/search_engines/template_url_service_factory.h" -#undef GetBrowserContextToUse +#undef BuildServiceInstanceFor #endif // BRAVE_CHROMIUM_SRC_CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_FACTORY_H_ diff --git a/chromium_src/chrome/browser/ui/bookmarks/brave_bookmark_context_menu_controller_unittest.cc b/chromium_src/chrome/browser/ui/bookmarks/brave_bookmark_context_menu_controller_unittest.cc index 09c0318fba08..10d8ce5f7354 100644 --- a/chromium_src/chrome/browser/ui/bookmarks/brave_bookmark_context_menu_controller_unittest.cc +++ b/chromium_src/chrome/browser/ui/bookmarks/brave_bookmark_context_menu_controller_unittest.cc @@ -58,9 +58,9 @@ class BraveBookmarkContextMenuControllerTest : public testing::Test { TEST_F(BraveBookmarkContextMenuControllerTest, DontShowAppsShortcutContextMenuInBookmarksBar) { BookmarkContextMenuController controller( - nullptr, nullptr, nullptr, profile_.get(), NullNavigatorGetter(), - BOOKMARK_LAUNCH_LOCATION_CONTEXT_MENU, model_->bookmark_bar_node(), - std::vector()); + nullptr, nullptr, nullptr, profile_.get(), + BookmarkLaunchLocation::kSidePanelContextMenu, + model_->bookmark_bar_node(), std::vector()); // Show apps command is not present by default. sync_preferences::TestingPrefServiceSyncable* prefs = diff --git a/chromium_src/chrome/browser/ui/cocoa/first_run_dialog_controller.mm b/chromium_src/chrome/browser/ui/cocoa/first_run_dialog_controller.mm index 58f0207d35aa..76a8a3003275 100644 --- a/chromium_src/chrome/browser/ui/cocoa/first_run_dialog_controller.mm +++ b/chromium_src/chrome/browser/ui/cocoa/first_run_dialog_controller.mm @@ -23,8 +23,7 @@ @implementation FirstRunDialogViewController { BOOL _setAsDefaultBrowser; } -- (instancetype)initWithStatsCheckboxInitiallyChecked:(BOOL)checked - defaultBrowserCheckboxVisible:(BOOL)visible { +- (instancetype)initWithStatsCheckboxInitiallyChecked:(BOOL)checked { if ((self = [super init])) { _setAsDefaultBrowser = NO; } diff --git a/chromium_src/chrome/browser/ui/views/profiles/profile_menu_view_base.cc b/chromium_src/chrome/browser/ui/views/profiles/profile_menu_coordinator.cc similarity index 81% rename from chromium_src/chrome/browser/ui/views/profiles/profile_menu_view_base.cc rename to chromium_src/chrome/browser/ui/views/profiles/profile_menu_coordinator.cc index 9347e6e2404d..35efa58fb1aa 100644 --- a/chromium_src/chrome/browser/ui/views/profiles/profile_menu_view_base.cc +++ b/chromium_src/chrome/browser/ui/views/profiles/profile_menu_coordinator.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2019 The Brave Authors. All rights reserved. +/* Copyright (c) 2022 The Brave Authors. All rights reserved. * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ @@ -11,6 +11,6 @@ #define IncognitoMenuView BraveIncognitoMenuView #define ProfileMenuView BraveProfileMenuView -#include "src/chrome/browser/ui/views/profiles/profile_menu_view_base.cc" +#include "src/chrome/browser/ui/views/profiles/profile_menu_coordinator.cc" #undef IncognitoMenuView #undef ProfileMenuView diff --git a/chromium_src/chrome/browser/ui/views/profiles/profile_menu_coordinator.h b/chromium_src/chrome/browser/ui/views/profiles/profile_menu_coordinator.h new file mode 100644 index 000000000000..aee5bc1ef71d --- /dev/null +++ b/chromium_src/chrome/browser/ui/views/profiles/profile_menu_coordinator.h @@ -0,0 +1,17 @@ +/* Copyright (c) 2022 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef BRAVE_CHROMIUM_SRC_CHROME_BROWSER_UI_VIEWS_PROFILES_PROFILE_MENU_COORDINATOR_H_ +#define BRAVE_CHROMIUM_SRC_CHROME_BROWSER_UI_VIEWS_PROFILES_PROFILE_MENU_COORDINATOR_H_ + +#define GetProfileMenuViewBaseForTesting() \ + GetProfileMenuViewBaseForTesting(); \ + friend class BraveProfileMenuViewTest + +#include "src/chrome/browser/ui/views/profiles/profile_menu_coordinator.h" + +#undef GetProfileMenuViewBaseForTesting + +#endif // BRAVE_CHROMIUM_SRC_CHROME_BROWSER_UI_VIEWS_PROFILES_PROFILE_MENU_COORDINATOR_H_ diff --git a/chromium_src/chrome/browser/ui/views/tabs/tab_strip.cc b/chromium_src/chrome/browser/ui/views/tabs/tab_strip.cc index ac1d4ae75142..032a0e63a202 100644 --- a/chromium_src/chrome/browser/ui/views/tabs/tab_strip.cc +++ b/chromium_src/chrome/browser/ui/views/tabs/tab_strip.cc @@ -7,6 +7,7 @@ #include "brave/browser/ui/views/tabs/brave_tab_hover_card_controller.h" #include "chrome/browser/ui/views/tabs/browser_tab_strip_controller.h" #include "chrome/browser/ui/views/tabs/tab_container.h" +#include "chrome/browser/ui/views/tabs/tab_container_impl.h" #if BUILDFLAG(IS_WIN) #include "ui/gfx/win/hwnd_util.h" diff --git a/chromium_src/chrome/browser/ui/views/tabs/tab_strip.h b/chromium_src/chrome/browser/ui/views/tabs/tab_strip.h index 093a8b60377e..5e6a54eac1c9 100644 --- a/chromium_src/chrome/browser/ui/views/tabs/tab_strip.h +++ b/chromium_src/chrome/browser/ui/views/tabs/tab_strip.h @@ -6,6 +6,7 @@ #ifndef BRAVE_CHROMIUM_SRC_CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ #define BRAVE_CHROMIUM_SRC_CHROME_BROWSER_UI_VIEWS_TABS_TAB_STRIP_H_ +#include "chrome/browser/ui/views/tabs/tab_container.h" #include "chrome/browser/ui/views/tabs/tab_slot_controller.h" #define UpdateHoverCard \ diff --git a/chromium_src/chrome/browser/ui/webui/settings/people_handler.cc b/chromium_src/chrome/browser/ui/webui/settings/people_handler.cc index 26628e9cef22..31806135977b 100644 --- a/chromium_src/chrome/browser/ui/webui/settings/people_handler.cc +++ b/chromium_src/chrome/browser/ui/webui/settings/people_handler.cc @@ -7,20 +7,18 @@ // IsSetupInProgress isn't accurate in brave sync flow especially for the first // time setup, we rely on it to display setup dialog -#define BRAVE_GET_SYNC_STATUS_DICTIONARY \ - sync_status.SetBoolPath( \ - "firstSetupInProgress", \ - service && !disallowed_by_policy && \ - !service->GetUserSettings()->IsFirstSetupComplete()); \ - { \ - syncer::BraveSyncServiceImpl* brave_sync_service = \ - static_cast(service); \ - if (brave_sync_service) { \ - bool failed_to_decrypt = false; \ - brave_sync_service->prefs().GetSeed(&failed_to_decrypt); \ - sync_status.SetBoolPath("hasSyncWordsDecryptionError", \ - failed_to_decrypt); \ - } \ +#define BRAVE_GET_SYNC_STATUS_DICTIONARY \ + sync_status.Set("firstSetupInProgress", \ + service && !disallowed_by_policy && \ + !service->GetUserSettings()->IsFirstSetupComplete()); \ + { \ + syncer::BraveSyncServiceImpl* brave_sync_service = \ + static_cast(service); \ + if (brave_sync_service) { \ + bool failed_to_decrypt = false; \ + brave_sync_service->prefs().GetSeed(&failed_to_decrypt); \ + sync_status.Set("hasSyncWordsDecryptionError", failed_to_decrypt); \ + } \ } #include "src/chrome/browser/ui/webui/settings/people_handler.cc" diff --git a/chromium_src/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc b/chromium_src/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc index 76f6eb288dfd..719a4430d527 100644 --- a/chromium_src/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc +++ b/chromium_src/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc @@ -32,7 +32,4 @@ #define IDS_SETTINGS_SAFEBROWSING_NONE_DESC \ IDS_SETTINGS_BRAVE_SAFEBROWSING_NONE_DESC -#define GetVersionNumber GetBraveVersionNumberForDisplay - #include "src/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc" -#undef GetVersionNumber diff --git a/chromium_src/chrome/test/base/in_process_browser_test.cc b/chromium_src/chrome/test/base/in_process_browser_test.cc new file mode 100644 index 000000000000..fb192c204b24 --- /dev/null +++ b/chromium_src/chrome/test/base/in_process_browser_test.cc @@ -0,0 +1,13 @@ +/* Copyright (c) 2022 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "brave/browser/ui/brave_browser.h" +#include "content/public/test/browser_test_base.h" + +#define SetUpCommandLine(COMMAND_LINE) \ + SetUpCommandLine(COMMAND_LINE); \ + BraveBrowser::SuppressBrowserWindowClosingDialogForTesting(true) +#include "src/chrome/test/base/in_process_browser_test.cc" +#undef SetUpCommandLine diff --git a/chromium_src/chrome/test/base/testing_profile.cc b/chromium_src/chrome/test/base/testing_profile.cc index 3dc6a2e6cf5a..a60822c5bc62 100644 --- a/chromium_src/chrome/test/base/testing_profile.cc +++ b/chromium_src/chrome/test/base/testing_profile.cc @@ -3,6 +3,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ +#define ChromeBrowsingDataRemoverDelegate BraveBrowsingDataRemoverDelegate #include "src/chrome/test/base/testing_profile.cc" +#undef ChromeBrowsingDataRemoverDelegate #include "brave/test/base/brave_testing_profile.cc" diff --git a/chromium_src/components/content_settings/core/browser/content_settings_registry.cc b/chromium_src/components/content_settings/core/browser/content_settings_registry.cc index b8fade915fab..a0e66c2bac09 100644 --- a/chromium_src/components/content_settings/core/browser/content_settings_registry.cc +++ b/chromium_src/components/content_settings/core/browser/content_settings_registry.cc @@ -17,7 +17,7 @@ void ContentSettingsRegistry::BraveInit() { CONTENT_SETTING_BLOCK, WebsiteSettingsInfo::SYNCABLE, AllowlistedSchemes(), ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK), - WebsiteSettingsInfo::SINGLE_ORIGIN_ONLY_SCOPE, + WebsiteSettingsInfo::TOP_ORIGIN_ONLY_SCOPE, WebsiteSettingsRegistry::DESKTOP | WebsiteSettingsRegistry::PLATFORM_ANDROID, ContentSettingsInfo::INHERIT_IN_INCOGNITO, @@ -28,7 +28,7 @@ void ContentSettingsRegistry::BraveInit() { CONTENT_SETTING_BLOCK, WebsiteSettingsInfo::SYNCABLE, AllowlistedSchemes(), ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK), - WebsiteSettingsInfo::SINGLE_ORIGIN_ONLY_SCOPE, + WebsiteSettingsInfo::TOP_ORIGIN_ONLY_SCOPE, WebsiteSettingsRegistry::DESKTOP | WebsiteSettingsRegistry::PLATFORM_ANDROID, ContentSettingsInfo::INHERIT_IN_INCOGNITO, @@ -39,7 +39,7 @@ void ContentSettingsRegistry::BraveInit() { brave_shields::kHTTPUpgradableResources, CONTENT_SETTING_BLOCK, WebsiteSettingsInfo::SYNCABLE, AllowlistedSchemes(), ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK), - WebsiteSettingsInfo::SINGLE_ORIGIN_ONLY_SCOPE, + WebsiteSettingsInfo::TOP_ORIGIN_ONLY_SCOPE, WebsiteSettingsRegistry::DESKTOP | WebsiteSettingsRegistry::PLATFORM_ANDROID, ContentSettingsInfo::INHERIT_IN_INCOGNITO, @@ -50,41 +50,43 @@ void ContentSettingsRegistry::BraveInit() { CONTENT_SETTING_BLOCK, WebsiteSettingsInfo::SYNCABLE, AllowlistedSchemes(), ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK), - WebsiteSettingsInfo::SINGLE_ORIGIN_ONLY_SCOPE, + WebsiteSettingsInfo::TOP_ORIGIN_ONLY_SCOPE, WebsiteSettingsRegistry::DESKTOP | WebsiteSettingsRegistry::PLATFORM_ANDROID, ContentSettingsInfo::INHERIT_IN_INCOGNITO, ContentSettingsInfo::PERSISTENT, ContentSettingsInfo::EXCEPTIONS_ON_SECURE_AND_INSECURE_ORIGINS); - Register(ContentSettingsType::BRAVE_COOKIES, brave_shields::kCookies, - CONTENT_SETTING_DEFAULT, WebsiteSettingsInfo::SYNCABLE, - AllowlistedSchemes(kChromeUIScheme, kChromeDevToolsScheme), - ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK), - WebsiteSettingsInfo::COOKIES_SCOPE, - WebsiteSettingsRegistry::DESKTOP | - WebsiteSettingsRegistry::PLATFORM_ANDROID, - ContentSettingsInfo::INHERIT_IN_INCOGNITO, - ContentSettingsInfo::PERSISTENT, - ContentSettingsInfo::EXCEPTIONS_ON_SECURE_AND_INSECURE_ORIGINS); - - Register(ContentSettingsType::BRAVE_COSMETIC_FILTERING, - brave_shields::kCosmeticFiltering, CONTENT_SETTING_DEFAULT, - WebsiteSettingsInfo::SYNCABLE, AllowlistedSchemes(), - ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK), - WebsiteSettingsInfo::COOKIES_SCOPE, - WebsiteSettingsRegistry::DESKTOP | - WebsiteSettingsRegistry::PLATFORM_ANDROID, - ContentSettingsInfo::INHERIT_IN_INCOGNITO, - ContentSettingsInfo::PERSISTENT, - ContentSettingsInfo::EXCEPTIONS_ON_SECURE_AND_INSECURE_ORIGINS); + Register( + ContentSettingsType::BRAVE_COOKIES, brave_shields::kCookies, + CONTENT_SETTING_DEFAULT, WebsiteSettingsInfo::SYNCABLE, + AllowlistedSchemes(kChromeUIScheme, kChromeDevToolsScheme), + ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK), + WebsiteSettingsInfo::REQUESTING_ORIGIN_WITH_TOP_ORIGIN_EXCEPTIONS_SCOPE, + WebsiteSettingsRegistry::DESKTOP | + WebsiteSettingsRegistry::PLATFORM_ANDROID, + ContentSettingsInfo::INHERIT_IN_INCOGNITO, + ContentSettingsInfo::PERSISTENT, + ContentSettingsInfo::EXCEPTIONS_ON_SECURE_AND_INSECURE_ORIGINS); + + Register( + ContentSettingsType::BRAVE_COSMETIC_FILTERING, + brave_shields::kCosmeticFiltering, CONTENT_SETTING_DEFAULT, + WebsiteSettingsInfo::SYNCABLE, AllowlistedSchemes(), + ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK), + WebsiteSettingsInfo::REQUESTING_ORIGIN_WITH_TOP_ORIGIN_EXCEPTIONS_SCOPE, + WebsiteSettingsRegistry::DESKTOP | + WebsiteSettingsRegistry::PLATFORM_ANDROID, + ContentSettingsInfo::INHERIT_IN_INCOGNITO, + ContentSettingsInfo::PERSISTENT, + ContentSettingsInfo::EXCEPTIONS_ON_SECURE_AND_INSECURE_ORIGINS); Register(ContentSettingsType::BRAVE_FINGERPRINTING_V2, brave_shields::kFingerprintingV2, CONTENT_SETTING_ASK, WebsiteSettingsInfo::SYNCABLE, AllowlistedSchemes(), ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK, CONTENT_SETTING_ASK), - WebsiteSettingsInfo::SINGLE_ORIGIN_ONLY_SCOPE, + WebsiteSettingsInfo::TOP_ORIGIN_ONLY_SCOPE, WebsiteSettingsRegistry::DESKTOP | WebsiteSettingsRegistry::PLATFORM_ANDROID, ContentSettingsInfo::INHERIT_IN_INCOGNITO, @@ -95,7 +97,7 @@ void ContentSettingsRegistry::BraveInit() { CONTENT_SETTING_ALLOW, WebsiteSettingsInfo::SYNCABLE, AllowlistedSchemes(), ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK), - WebsiteSettingsInfo::SINGLE_ORIGIN_ONLY_SCOPE, + WebsiteSettingsInfo::TOP_ORIGIN_ONLY_SCOPE, WebsiteSettingsRegistry::DESKTOP | WebsiteSettingsRegistry::PLATFORM_ANDROID, ContentSettingsInfo::INHERIT_IN_INCOGNITO, @@ -106,7 +108,7 @@ void ContentSettingsRegistry::BraveInit() { CONTENT_SETTING_ALLOW, WebsiteSettingsInfo::SYNCABLE, AllowlistedSchemes(), ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK), - WebsiteSettingsInfo::SINGLE_ORIGIN_ONLY_SCOPE, + WebsiteSettingsInfo::TOP_ORIGIN_ONLY_SCOPE, WebsiteSettingsRegistry::DESKTOP | WebsiteSettingsRegistry::PLATFORM_ANDROID, ContentSettingsInfo::INHERIT_IN_INCOGNITO, @@ -122,7 +124,7 @@ void ContentSettingsRegistry::BraveInit() { WebsiteSettingsInfo::UNSYNCABLE, AllowlistedSchemes(), ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK, CONTENT_SETTING_ASK), - WebsiteSettingsInfo::SINGLE_ORIGIN_ONLY_SCOPE, + WebsiteSettingsInfo::TOP_ORIGIN_ONLY_SCOPE, WebsiteSettingsRegistry::DESKTOP | WebsiteSettingsRegistry::PLATFORM_ANDROID, ContentSettingsInfo::INHERIT_IN_INCOGNITO, @@ -135,7 +137,7 @@ void ContentSettingsRegistry::BraveInit() { AllowlistedSchemes(), ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK, CONTENT_SETTING_ASK), - WebsiteSettingsInfo::SINGLE_ORIGIN_ONLY_SCOPE, + WebsiteSettingsInfo::TOP_ORIGIN_ONLY_SCOPE, WebsiteSettingsRegistry::DESKTOP | WebsiteSettingsRegistry::PLATFORM_ANDROID, ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE, @@ -148,7 +150,7 @@ void ContentSettingsRegistry::BraveInit() { AllowlistedSchemes(), ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK, CONTENT_SETTING_ASK), - WebsiteSettingsInfo::SINGLE_ORIGIN_ONLY_SCOPE, + WebsiteSettingsInfo::TOP_ORIGIN_ONLY_SCOPE, WebsiteSettingsRegistry::DESKTOP | WebsiteSettingsRegistry::PLATFORM_ANDROID, ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE, @@ -162,7 +164,7 @@ void ContentSettingsRegistry::BraveInit() { CONTENT_SETTING_BLOCK, WebsiteSettingsInfo::UNSYNCABLE, AllowlistedSchemes(), ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK), - WebsiteSettingsInfo::SINGLE_ORIGIN_ONLY_SCOPE, + WebsiteSettingsInfo::TOP_ORIGIN_ONLY_SCOPE, WebsiteSettingsRegistry::DESKTOP | WebsiteSettingsRegistry::PLATFORM_ANDROID, ContentSettingsInfo::INHERIT_IN_INCOGNITO, @@ -175,7 +177,7 @@ void ContentSettingsRegistry::BraveInit() { Register(ContentSettingsType::SENSORS, "sensors", CONTENT_SETTING_BLOCK, WebsiteSettingsInfo::UNSYNCABLE, AllowlistedSchemes(), ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK), - WebsiteSettingsInfo::SINGLE_ORIGIN_ONLY_SCOPE, + WebsiteSettingsInfo::TOP_ORIGIN_ONLY_SCOPE, WebsiteSettingsRegistry::DESKTOP | WebsiteSettingsRegistry::PLATFORM_ANDROID, ContentSettingsInfo::INHERIT_IN_INCOGNITO, diff --git a/chromium_src/components/content_settings/core/common/content_settings_types.h b/chromium_src/components/content_settings/core/common/content_settings_types.h index 867f0b6e53c2..4e543ddaeeeb 100644 --- a/chromium_src/components/content_settings/core/common/content_settings_types.h +++ b/chromium_src/components/content_settings/core/common/content_settings_types.h @@ -7,23 +7,24 @@ #define BRAVE_CHROMIUM_SRC_COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_TYPES_H_ // clang-format off -#define BRAVE_CONTENT_SETTINGS_TYPES_LIST \ - BRAVE_START, \ - BRAVE_ADS = BRAVE_START, \ - BRAVE_COSMETIC_FILTERING, \ - BRAVE_TRACKERS, \ - BRAVE_HTTP_UPGRADABLE_RESOURCES, \ - BRAVE_FINGERPRINTING_V2, \ - BRAVE_SHIELDS, \ - BRAVE_REFERRERS, \ - BRAVE_COOKIES, \ - BRAVE_SPEEDREADER, \ - BRAVE_ETHEREUM, \ - BRAVE_SOLANA +#define NUM_TYPES \ + BRAVE_START, \ + BRAVE_ADS = BRAVE_START, \ + BRAVE_COSMETIC_FILTERING, \ + BRAVE_TRACKERS, \ + BRAVE_HTTP_UPGRADABLE_RESOURCES, \ + BRAVE_FINGERPRINTING_V2, \ + BRAVE_SHIELDS, \ + BRAVE_REFERRERS, \ + BRAVE_COOKIES, \ + BRAVE_SPEEDREADER, \ + BRAVE_ETHEREUM, \ + BRAVE_SOLANA, \ + NUM_TYPES // clang-format on #include "src/components/content_settings/core/common/content_settings_types.h" -#undef BRAVE_CONTENT_SETTINGS_TYPES_LIST +#undef NUM_TYPES #endif // BRAVE_CHROMIUM_SRC_COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_TYPES_H_ diff --git a/chromium_src/components/content_settings/core/common/cookie_settings_base.cc b/chromium_src/components/content_settings/core/common/cookie_settings_base.cc index 99df858c33f9..25f7506e88d1 100644 --- a/chromium_src/components/content_settings/core/common/cookie_settings_base.cc +++ b/chromium_src/components/content_settings/core/common/cookie_settings_base.cc @@ -56,11 +56,11 @@ bool BraveIsAllowedThirdParty(const GURL& url, return false; } -bool IsFirstPartyAccessAllowed( - const GURL& first_party_url, - const CookieSettingsBase* const cookie_settings) { +bool IsFirstPartyAccessAllowed(const GURL& first_party_url, + const CookieSettingsBase* const cookie_settings, + CookieSettingsBase::QueryReason query_reason) { ContentSetting setting = cookie_settings->GetCookieSetting( - first_party_url, first_party_url, nullptr); + first_party_url, first_party_url, nullptr, query_reason); return cookie_settings->IsAllowed(setting); } @@ -72,8 +72,6 @@ bool IsSessionOnlyExplicit( } // namespace -CookieSettingsBase::CookieSettingsBase() = default; - CookieSettingsBase::~CookieSettingsBase() = default; CookieSettingWithBraveMetadata::CookieSettingWithBraveMetadata() = default; @@ -110,8 +108,9 @@ bool CookieSettingsBase::ShouldUseEphemeralStorage( absl::optional first_party_setting; if (base::FeatureList::IsEnabled( net::features::kBraveFirstPartyEphemeralStorage)) { - first_party_setting = - GetCookieSettingWithBraveMetadata(first_party_url, first_party_url); + first_party_setting = GetCookieSettingWithBraveMetadata( + first_party_url, first_party_url, + CookieSettingsBase::QueryReason::kCookies); if (IsSessionOnlyExplicit(*first_party_setting)) { return true; } @@ -123,10 +122,13 @@ bool CookieSettingsBase::ShouldUseEphemeralStorage( return false; bool allow_3p = - IsCookieAccessAllowedImpl(url, site_for_cookies, top_frame_origin); + IsCookieAccessAllowedImpl(url, site_for_cookies, top_frame_origin, + CookieSettingsBase::QueryReason::kCookies); bool allow_1p = first_party_setting ? IsAllowed(first_party_setting->setting) - : IsFirstPartyAccessAllowed(first_party_url, this); + : IsFirstPartyAccessAllowed( + first_party_url, this, + CookieSettingsBase::QueryReason::kCookies); // only use ephemeral storage for block 3p return allow_1p && !allow_3p; @@ -134,42 +136,51 @@ bool CookieSettingsBase::ShouldUseEphemeralStorage( bool CookieSettingsBase::IsEphemeralCookieAccessAllowed( const GURL& url, - const GURL& first_party_url) const { + const GURL& first_party_url, + CookieSettingsBase::QueryReason query_reason) const { return IsEphemeralCookieAccessAllowed( - url, net::SiteForCookies::FromUrl(first_party_url), absl::nullopt); + url, net::SiteForCookies::FromUrl(first_party_url), absl::nullopt, + query_reason); } bool CookieSettingsBase::IsEphemeralCookieAccessAllowed( const GURL& url, const net::SiteForCookies& site_for_cookies, - const absl::optional& top_frame_origin) const { + const absl::optional& top_frame_origin, + CookieSettingsBase::QueryReason query_reason) const { if (ShouldUseEphemeralStorage(url, site_for_cookies, top_frame_origin)) { return true; } - return IsCookieAccessAllowedImpl(url, site_for_cookies, top_frame_origin); + return IsCookieAccessAllowedImpl(url, site_for_cookies, top_frame_origin, + CookieSettingsBase::QueryReason::kCookies); } bool CookieSettingsBase::IsFullCookieAccessAllowed( const GURL& url, - const GURL& first_party_url) const { + const GURL& first_party_url, + CookieSettingsBase::QueryReason query_reason) const { return IsFullCookieAccessAllowed( - url, net::SiteForCookies::FromUrl(first_party_url), absl::nullopt); + url, net::SiteForCookies::FromUrl(first_party_url), absl::nullopt, + query_reason); } bool CookieSettingsBase::IsFullCookieAccessAllowed( const GURL& url, const net::SiteForCookies& site_for_cookies, - const absl::optional& top_frame_origin) const { - return IsCookieAccessAllowedImpl(url, site_for_cookies, top_frame_origin); + const absl::optional& top_frame_origin, + CookieSettingsBase::QueryReason query_reason) const { + return IsCookieAccessAllowedImpl(url, site_for_cookies, top_frame_origin, + query_reason); } bool CookieSettingsBase::IsCookieAccessAllowedImpl( const GURL& url, const net::SiteForCookies& site_for_cookies, - const absl::optional& top_frame_origin) const { - bool allow = IsChromiumFullCookieAccessAllowed(url, site_for_cookies, - top_frame_origin); + const absl::optional& top_frame_origin, + CookieSettingsBase::QueryReason query_reason) const { + bool allow = IsChromiumFullCookieAccessAllowed( + url, site_for_cookies, top_frame_origin, query_reason); const bool is_1p_ephemeral_feature_enabled = base::FeatureList::IsEnabled( net::features::kBraveFirstPartyEphemeralStorage); @@ -199,7 +210,8 @@ bool CookieSettingsBase::IsCookieAccessAllowedImpl( if (is_1p_ephemeral_feature_enabled) { // Get CookieSetting for the main frame and get matched patterns if any. CookieSettingWithBraveMetadata setting_with_brave_metadata = - GetCookieSettingWithBraveMetadata(first_party_url, first_party_url); + GetCookieSettingWithBraveMetadata(first_party_url, first_party_url, + query_reason); // Ephemeral mode for the main frame can be enabled only via explicit rule. if (IsSessionOnlyExplicit(setting_with_brave_metadata)) { @@ -226,7 +238,7 @@ bool CookieSettingsBase::IsCookieAccessAllowedImpl( return true; } - if (!IsFirstPartyAccessAllowed(first_party_url, this)) + if (!IsFirstPartyAccessAllowed(first_party_url, this, query_reason)) return false; if (BraveIsAllowedThirdParty(url, first_party_url, this)) @@ -236,7 +248,7 @@ bool CookieSettingsBase::IsCookieAccessAllowedImpl( // the main frame. if (is_1p_ephemeral_feature_enabled && main_frame_mode == MainFrameMode::kShieldsDown && - IsCookieSessionOnly(url)) { + IsCookieSessionOnly(url, query_reason)) { return true; } @@ -263,13 +275,14 @@ bool CookieSettingsBase::ShouldBlockThirdPartyIfSettingIsExplicit( CookieSettingWithBraveMetadata CookieSettingsBase::GetCookieSettingWithBraveMetadata( const GURL& url, - const GURL& first_party_url) const { + const GURL& first_party_url, + CookieSettingsBase::QueryReason query_reason) const { CookieSettingWithBraveMetadata setting_brave_metadata; cookie_setting_with_brave_metadata_.Set(&setting_brave_metadata); // GetCookieSetting fills metadata structure implicitly (implemented in // GetCookieSettingInternal), the setting value is set explicitly here. setting_brave_metadata.setting = - GetCookieSetting(url, first_party_url, nullptr); + GetCookieSetting(url, first_party_url, nullptr, query_reason); cookie_setting_with_brave_metadata_.Set(nullptr); return setting_brave_metadata; } diff --git a/chromium_src/components/content_settings/core/common/cookie_settings_base.h b/chromium_src/components/content_settings/core/common/cookie_settings_base.h index e28b19d40ffd..fe9f1249501f 100644 --- a/chromium_src/components/content_settings/core/common/cookie_settings_base.h +++ b/chromium_src/components/content_settings/core/common/cookie_settings_base.h @@ -37,21 +37,26 @@ struct CookieSettingWithBraveMetadata { ShouldUseEphemeralStorage( \ const GURL& url, const net::SiteForCookies& site_for_cookies, \ const absl::optional& top_frame_origin) const; \ - bool IsEphemeralCookieAccessAllowed(const GURL& url, \ - const GURL& first_party_url) const; \ + bool IsEphemeralCookieAccessAllowed( \ + const GURL& url, const GURL& first_party_url, \ + CookieSettingsBase::QueryReason query_reason) const; \ bool IsEphemeralCookieAccessAllowed( \ const GURL& url, const net::SiteForCookies& site_for_cookies, \ - const absl::optional& top_frame_origin) const; \ - bool IsChromiumFullCookieAccessAllowed(const GURL& url, \ - const GURL& first_party_url) const; \ + const absl::optional& top_frame_origin, \ + CookieSettingsBase::QueryReason query_reason) const; \ + bool IsChromiumFullCookieAccessAllowed( \ + const GURL& url, const GURL& first_party_url, \ + CookieSettingsBase::QueryReason query_reason) const; \ bool IsChromiumFullCookieAccessAllowed( \ const GURL& url, const net::SiteForCookies& site_for_cookies, \ - const absl::optional& top_frame_origin) const; \ + const absl::optional& top_frame_origin, \ + CookieSettingsBase::QueryReason query_reason) const; \ bool ShouldBlockThirdPartyIfSettingIsExplicit( \ bool block_third_party_cookies, ContentSetting cookie_setting, \ bool is_explicit_setting, bool is_first_party_allowed_scheme) const; \ CookieSettingWithBraveMetadata GetCookieSettingWithBraveMetadata( \ - const GURL& url, const GURL& first_party_url) const; \ + const GURL& url, const GURL& first_party_url, \ + CookieSettingsBase::QueryReason query_reason) const; \ CookieSettingWithBraveMetadata* cookie_setting_with_brave_metadata() const { \ return cookie_setting_with_brave_metadata_.Get(); \ } \ @@ -59,7 +64,8 @@ struct CookieSettingWithBraveMetadata { private: \ bool IsCookieAccessAllowedImpl( \ const GURL& url, const net::SiteForCookies& site_for_cookies, \ - const absl::optional& top_frame_origin) const; \ + const absl::optional& top_frame_origin, \ + CookieSettingsBase::QueryReason query_reason) const; \ \ mutable base::ThreadLocalPointer \ cookie_setting_with_brave_metadata_; \ diff --git a/chromium_src/components/lens/lens_features.cc b/chromium_src/components/lens/lens_features.cc index 53b88f0e14e2..f7d82872f527 100644 --- a/chromium_src/components/lens/lens_features.cc +++ b/chromium_src/components/lens/lens_features.cc @@ -12,6 +12,7 @@ namespace features { OVERRIDE_FEATURE_DEFAULT_STATES({{ {kLensStandalone, base::FEATURE_DISABLED_BY_DEFAULT}, + {kLensUnifiedSidePanelFooter, base::FEATURE_DISABLED_BY_DEFAULT}, }}); } // namespace features diff --git a/chromium_src/components/password_manager/core/common/password_manager_features.cc b/chromium_src/components/password_manager/core/common/password_manager_features.cc index c01d8d0fdb97..515fcbcf443e 100644 --- a/chromium_src/components/password_manager/core/common/password_manager_features.cc +++ b/chromium_src/components/password_manager/core/common/password_manager_features.cc @@ -12,6 +12,7 @@ namespace features { OVERRIDE_FEATURE_DEFAULT_STATES({{ {kPasswordImport, base::FEATURE_ENABLED_BY_DEFAULT}, + {kUnifiedPasswordManagerDesktop, base::FEATURE_DISABLED_BY_DEFAULT}, }}); } // namespace features diff --git a/chromium_src/components/permissions/features.cc b/chromium_src/components/permissions/features.cc index e0dcfac346dc..cf12bb7b5d32 100644 --- a/chromium_src/components/permissions/features.cc +++ b/chromium_src/components/permissions/features.cc @@ -19,6 +19,7 @@ OVERRIDE_FEATURE_DEFAULT_STATES({{ base::FEATURE_DISABLED_BY_DEFAULT}, #if !BUILDFLAG(IS_ANDROID) {kPermissionsPostPromptSurvey, base::FEATURE_DISABLED_BY_DEFAULT}, + {kRecordPermissionExpirationTimestamps, base::FEATURE_DISABLED_BY_DEFAULT}, #endif }}); diff --git a/chromium_src/components/permissions/permission_manager.h b/chromium_src/components/permissions/permission_manager.h index 7073b5c2aab7..29bae26f77ad 100644 --- a/chromium_src/components/permissions/permission_manager.h +++ b/chromium_src/components/permissions/permission_manager.h @@ -6,6 +6,8 @@ #ifndef BRAVE_CHROMIUM_SRC_COMPONENTS_PERMISSIONS_PERMISSION_MANAGER_H_ #define BRAVE_CHROMIUM_SRC_COMPONENTS_PERMISSIONS_PERMISSION_MANAGER_H_ +#include "components/permissions/permission_util.h" + // In case this fails compilation in the future, simply apply to any // other private member, more obscure name is better so it doesn't // affect other included header files from this header file. @@ -14,9 +16,7 @@ friend class BravePermissionManager; \ GURL forced_requesting_origin_; -#define GetCanonicalOrigin virtual GetCanonicalOrigin #include "src/components/permissions/permission_manager.h" -#undef GetCanonicalOrigin #undef devtools_global_overrides_origin_ diff --git a/chromium_src/components/permissions/permission_util.cc b/chromium_src/components/permissions/permission_util.cc index 303d572ba20a..c8c01f810ccf 100644 --- a/chromium_src/components/permissions/permission_util.cc +++ b/chromium_src/components/permissions/permission_util.cc @@ -4,13 +4,14 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "components/permissions/permission_util.h" +#include "components/permissions/permission_uma_util.h" #include "third_party/blink/public/common/permissions/permission_utils.h" #define PermissionUtil PermissionUtil_ChromiumImpl -#define NUM \ - BRAVE_ADS: \ - return ContentSettingsType::BRAVE_ADS; \ +#define PERMISSION_UTIL_PERMISSION_TYPE_TO_CONTENT_SETTINGS_TYPE \ + case PermissionType::BRAVE_ADS: \ + return ContentSettingsType::BRAVE_ADS; \ case PermissionType::BRAVE_COSMETIC_FILTERING: \ return ContentSettingsType::BRAVE_COSMETIC_FILTERING; \ case PermissionType::BRAVE_TRACKERS: \ @@ -30,12 +31,11 @@ case PermissionType::BRAVE_ETHEREUM: \ return ContentSettingsType::BRAVE_ETHEREUM; \ case PermissionType::BRAVE_SOLANA: \ - return ContentSettingsType::BRAVE_SOLANA; \ - case PermissionType::NUM + return ContentSettingsType::BRAVE_SOLANA; #include "src/components/permissions/permission_util.cc" -#undef NUM #undef PermissionUtil +#undef PERMISSION_UTIL_PERMISSION_TYPE_TO_CONTENT_SETTINGS_TYPE namespace permissions { @@ -75,4 +75,47 @@ bool PermissionUtil::IsPermission(ContentSettingsType type) { } } +PermissionType PermissionUtil::ContentSettingTypeToPermissionType( + ContentSettingsType permission) { + switch (permission) { + case ContentSettingsType::BRAVE_ADS: + return PermissionType::BRAVE_ADS; + case ContentSettingsType::BRAVE_COSMETIC_FILTERING: + return PermissionType::BRAVE_COSMETIC_FILTERING; + case ContentSettingsType::BRAVE_TRACKERS: + return PermissionType::BRAVE_TRACKERS; + case ContentSettingsType::BRAVE_HTTP_UPGRADABLE_RESOURCES: + return PermissionType::BRAVE_HTTP_UPGRADABLE_RESOURCES; + case ContentSettingsType::BRAVE_FINGERPRINTING_V2: + return PermissionType::BRAVE_FINGERPRINTING_V2; + case ContentSettingsType::BRAVE_SHIELDS: + return PermissionType::BRAVE_SHIELDS; + case ContentSettingsType::BRAVE_REFERRERS: + return PermissionType::BRAVE_REFERRERS; + case ContentSettingsType::BRAVE_COOKIES: + return PermissionType::BRAVE_COOKIES; + case ContentSettingsType::BRAVE_SPEEDREADER: + return PermissionType::BRAVE_SPEEDREADER; + case ContentSettingsType::BRAVE_ETHEREUM: + return PermissionType::BRAVE_ETHEREUM; + case ContentSettingsType::BRAVE_SOLANA: + return PermissionType::BRAVE_SOLANA; + default: + return PermissionUtil_ChromiumImpl::ContentSettingTypeToPermissionType( + permission); + } +} + +GURL PermissionUtil::GetCanonicalOrigin(ContentSettingsType permission, + const GURL& requesting_origin, + const GURL& embedding_origin) { + // Use requesting_origin which will have ethereum or solana address info. + if (permission == ContentSettingsType::BRAVE_ETHEREUM || + permission == ContentSettingsType::BRAVE_SOLANA) + return requesting_origin; + + return PermissionUtil_ChromiumImpl::GetCanonicalOrigin( + permission, requesting_origin, embedding_origin); +} + } // namespace permissions diff --git a/chromium_src/components/permissions/permission_util.h b/chromium_src/components/permissions/permission_util.h index 039361b14b45..fbf6b51fda7a 100644 --- a/chromium_src/components/permissions/permission_util.h +++ b/chromium_src/components/permissions/permission_util.h @@ -18,6 +18,13 @@ class PermissionUtil : public PermissionUtil_ChromiumImpl { static bool GetPermissionType(ContentSettingsType type, blink::PermissionType* out); static bool IsPermission(ContentSettingsType type); + + static blink::PermissionType ContentSettingTypeToPermissionType( + ContentSettingsType permission); + + static GURL GetCanonicalOrigin(ContentSettingsType permission, + const GURL& requesting_origin, + const GURL& embedding_origin); }; } // namespace permissions diff --git a/chromium_src/components/sync/driver/sync_internals_util.cc b/chromium_src/components/sync/driver/sync_internals_util.cc index 76a0b8549b69..fa9eda381086 100644 --- a/chromium_src/components/sync/driver/sync_internals_util.cc +++ b/chromium_src/components/sync/driver/sync_internals_util.cc @@ -16,7 +16,7 @@ namespace syncer { namespace sync_ui_util { -std::unique_ptr ConstructAboutInformation( +base::Value::Dict ConstructAboutInformation( IncludeSensitiveData include_sensitive_data, SyncService* service, const std::string& channel) { @@ -49,12 +49,10 @@ std::unique_ptr ConstructAboutInformation( section_brave_sync.AddBoolStat("OS encryption available"); is_os_encryption_available->Set(OSCrypt::IsEncryptionAvailable()); - base::Value* details = about_info->GetDict().Find(kDetailsKey); + base::Value::List* details = about_info.FindList(kDetailsKey); DCHECK_NE(details, nullptr); - DCHECK(details->is_list()); details->Append(section_brave_sync.ToValue()); - return about_info; } diff --git a/chromium_src/components/sync/driver/sync_internals_util.h b/chromium_src/components/sync/driver/sync_internals_util.h index 48365659d147..00e029d975f4 100644 --- a/chromium_src/components/sync/driver/sync_internals_util.h +++ b/chromium_src/components/sync/driver/sync_internals_util.h @@ -16,7 +16,7 @@ namespace syncer { namespace sync_ui_util { -std::unique_ptr ConstructAboutInformation( +base::Value::Dict ConstructAboutInformation( IncludeSensitiveData include_sensitive_data, SyncService* service, const std::string& channel); diff --git a/chromium_src/components/version_ui/version_handler_helper.cc b/chromium_src/components/version_ui/version_handler_helper.cc index 4c628e49aadb..5b1727d4c674 100644 --- a/chromium_src/components/version_ui/version_handler_helper.cc +++ b/chromium_src/components/version_ui/version_handler_helper.cc @@ -10,7 +10,7 @@ namespace version_ui { // Brave always shows full variations names instead of hashes. -base::Value GetVariationsList() { +base::Value::List GetVariationsList() { std::vector variations; base::FieldTrial::ActiveGroups active_groups; base::FieldTrialList::GetActiveFieldTrialGroups(&active_groups); @@ -24,7 +24,7 @@ base::Value GetVariationsList() { variations.push_back(line); } - base::Value variations_list(base::Value::Type::LIST); + base::Value::List variations_list; for (std::string& variation : variations) variations_list.Append(std::move(variation)); diff --git a/chromium_src/content/browser/private_aggregation/private_aggregation_features.cc b/chromium_src/content/common/private_aggregation_features.cc similarity index 84% rename from chromium_src/content/browser/private_aggregation/private_aggregation_features.cc rename to chromium_src/content/common/private_aggregation_features.cc index 1dacd0e1fb24..d4a0eadcd954 100644 --- a/chromium_src/content/browser/private_aggregation/private_aggregation_features.cc +++ b/chromium_src/content/common/private_aggregation_features.cc @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at https://mozilla.org/MPL/2.0/. */ -#include "src/content/browser/private_aggregation/private_aggregation_features.cc" +#include "src/content/common/private_aggregation_features.cc" #include "base/feature_override.h" diff --git a/chromium_src/content/public/browser/permission_controller_delegate.cc b/chromium_src/content/public/browser/permission_controller_delegate.cc new file mode 100644 index 000000000000..0af9129e0df6 --- /dev/null +++ b/chromium_src/content/public/browser/permission_controller_delegate.cc @@ -0,0 +1,18 @@ +/* Copyright (c) 2022 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "src/content/public/browser/permission_controller_delegate.cc" + +namespace content { + +blink::mojom::PermissionStatus +PermissionControllerDelegate::GetPermissionStatusForOrigin( + blink::PermissionType permission, + content::RenderFrameHost* render_frame_host, + const GURL& requesting_origin) { + return blink::mojom::PermissionStatus::DENIED; +} + +} // namespace content diff --git a/chromium_src/content/public/browser/permission_controller_delegate.h b/chromium_src/content/public/browser/permission_controller_delegate.h new file mode 100644 index 000000000000..816816e04330 --- /dev/null +++ b/chromium_src/content/public/browser/permission_controller_delegate.h @@ -0,0 +1,29 @@ +/* Copyright (c) 2022 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef BRAVE_CHROMIUM_SRC_CONTENT_PUBLIC_BROWSER_PERMISSION_CONTROLLER_DELEGATE_H_ +#define BRAVE_CHROMIUM_SRC_CONTENT_PUBLIC_BROWSER_PERMISSION_CONTROLLER_DELEGATE_H_ + +#define ResetPermissionOverridesForDevTools \ + NotUsed() {} \ + virtual void RequestPermissionsForOrigin( \ + const std::vector& permissions, \ + content::RenderFrameHost* render_frame_host, \ + const GURL& requesting_origin, bool user_gesture, \ + base::OnceCallback&)> callback) {} \ + \ + virtual blink::mojom::PermissionStatus GetPermissionStatusForOrigin( \ + blink::PermissionType permission, \ + content::RenderFrameHost* render_frame_host, \ + const GURL& requesting_origin); \ + \ + virtual void ResetPermissionOverridesForDevTools + +#include "src/content/public/browser/permission_controller_delegate.h" + +#undef ResetPermissionOverridesForDevTools + +#endif // BRAVE_CHROMIUM_SRC_CONTENT_PUBLIC_BROWSER_PERMISSION_CONTROLLER_DELEGATE_H_ diff --git a/chromium_src/extensions/browser/extension_event_histogram_value.h b/chromium_src/extensions/browser/extension_event_histogram_value.h new file mode 100644 index 000000000000..c313ec45f154 --- /dev/null +++ b/chromium_src/extensions/browser/extension_event_histogram_value.h @@ -0,0 +1,31 @@ +/* Copyright (c) 2022 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef BRAVE_CHROMIUM_SRC_EXTENSIONS_BROWSER_EXTENSION_EVENT_HISTOGRAM_VALUE_H_ +#define BRAVE_CHROMIUM_SRC_EXTENSIONS_BROWSER_EXTENSION_EVENT_HISTOGRAM_VALUE_H_ + +// clang-format off +#define ENUM_BOUNDARY \ + BRAVE_START = 600, \ + BRAVE_AD_BLOCKED, \ + BRAVE_WALLET_CREATED, \ + BRAVE_ON_WALLET_PROPERTIES, \ + BRAVE_ON_PUBLISHER_DATA, \ + BRAVE_ON_CURRENT_REPORT, \ + BRAVE_ON_BRAVE_THEME_TYPE_CHANGED, \ + BRAVE_REWARDS_NOTIFICATION_ADDED, \ + BRAVE_REWARDS_NOTIFICATION_DELETED, \ + BRAVE_REWARDS_ALL_NOTIFICATIONS_DELETED, \ + BRAVE_REWARDS_GET_NOTIFICATION, \ + BRAVE_REWARDS_GET_ALL_NOTIFICATIONS, \ + BRAVE_WALLET_FAILED, \ + ENUM_BOUNDARY +// clang-format on + +#include "src/extensions/browser/extension_event_histogram_value.h" + +#undef ENUM_BOUNDARY + +#endif // BRAVE_CHROMIUM_SRC_EXTENSIONS_BROWSER_EXTENSION_EVENT_HISTOGRAM_VALUE_H_ diff --git a/chromium_src/ios/chrome/browser/application_context_impl.mm b/chromium_src/ios/chrome/browser/application_context_impl.mm index b9ae12234211..50f79e4e92e2 100644 --- a/chromium_src/ios/chrome/browser/application_context_impl.mm +++ b/chromium_src/ios/chrome/browser/application_context_impl.mm @@ -43,9 +43,13 @@ #include "ios/chrome/browser/pref_names.h" #include "ios/chrome/browser/prefs/browser_prefs.h" #include "ios/chrome/browser/prefs/ios_chrome_pref_service_factory.h" +#import "ios/chrome/browser/promos_manager/features.h" +#import "ios/chrome/browser/promos_manager/promos_manager.h" +#include "ios/chrome/browser/push_notification/push_notification_service.h" #include "ios/chrome/browser/segmentation_platform/otr_web_state_observer.h" #import "ios/components/security_interstitials/safe_browsing/safe_browsing_service.h" #include "ios/public/provider/chrome/browser/app_distribution/app_distribution_api.h" +#include "ios/public/provider/chrome/browser/push_notification/push_notification_api.h" #include "ios/public/provider/chrome/browser/signin/signin_sso_api.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "net/log/net_log.h" @@ -364,3 +368,20 @@ void BindNetworkChangeManagerReceiver( void ApplicationContextImpl::CreateGCMDriver() { DCHECK(thread_checker_.CalledOnValidThread()); } + +PromosManager* ApplicationContextImpl::GetPromosManager() { + DCHECK(thread_checker_.CalledOnValidThread()); + if (IsFullscreenPromosManagerEnabled() && !promos_manager_) { + promos_manager_ = std::make_unique(GetLocalState()); + } + return promos_manager_.get(); +} + +PushNotificationService* ApplicationContextImpl::GetPushNotificationService() { + if (!push_notification_service_) { + push_notification_service_ = ios::provider::CreatePushNotificationService(); + DCHECK(push_notification_service_); + } + + return push_notification_service_.get(); +} diff --git a/chromium_src/services/network/cookie_settings.cc b/chromium_src/services/network/cookie_settings.cc index cfcdfad25aed..4e393aa4213f 100644 --- a/chromium_src/services/network/cookie_settings.cc +++ b/chromium_src/services/network/cookie_settings.cc @@ -51,7 +51,8 @@ bool CookieSettings::IsEphemeralCookieAccessible( // enabled, Brave doesn't care about whether access is being requested for a // specific cookie or not, so we simply return |true| if that's the case. // See https://crrev.com/c/2895004 for the upstream change that required this. - if (IsEphemeralCookieAccessAllowed(url, site_for_cookies, top_frame_origin)) + if (IsEphemeralCookieAccessAllowed(url, site_for_cookies, top_frame_origin, + CookieSettingsBase::QueryReason::kCookies)) return true; return IsCookieAccessible(cookie, url, site_for_cookies, top_frame_origin); @@ -63,7 +64,8 @@ CookieSettings::IsEphemeralPrivacyModeEnabled( const net::SiteForCookies& site_for_cookies, const absl::optional& top_frame_origin, net::SamePartyContext::Type same_party_cookie_context_type) const { - if (IsEphemeralCookieAccessAllowed(url, site_for_cookies, top_frame_origin)) + if (IsEphemeralCookieAccessAllowed(url, site_for_cookies, top_frame_origin, + CookieSettingsBase::QueryReason::kCookies)) return net::NetworkDelegate::PrivacySetting::kStateAllowed; return IsPrivacyModeEnabled(url, site_for_cookies, top_frame_origin, @@ -80,8 +82,9 @@ bool CookieSettings::AnnotateAndMoveUserBlockedEphemeralCookies( if (top_frame_origin) top_frame_origin_opt = *top_frame_origin; - if (IsEphemeralCookieAccessAllowed(url, site_for_cookies, - top_frame_origin_opt)) { + if (IsEphemeralCookieAccessAllowed( + url, site_for_cookies, top_frame_origin_opt, + CookieSettingsBase::QueryReason::kCookies)) { return true; } diff --git a/chromium_src/third_party/blink/common/features.cc b/chromium_src/third_party/blink/common/features.cc index 0ffd7192cb57..34c5a3ffb330 100644 --- a/chromium_src/third_party/blink/common/features.cc +++ b/chromium_src/third_party/blink/common/features.cc @@ -18,6 +18,7 @@ OVERRIDE_FEATURE_DEFAULT_STATES({{ {kAdInterestGroupAPI, base::FEATURE_DISABLED_BY_DEFAULT}, {kAllowURNsInIframes, base::FEATURE_DISABLED_BY_DEFAULT}, + {kAnonymousIframeOriginTrial, base::FEATURE_DISABLED_BY_DEFAULT}, {kBrowsingTopics, base::FEATURE_DISABLED_BY_DEFAULT}, {kClientHintsMetaEquivDelegateCH, base::FEATURE_DISABLED_BY_DEFAULT}, {kComputePressure, base::FEATURE_DISABLED_BY_DEFAULT}, diff --git a/chromium_src/third_party/blink/renderer/core/page/create_window.cc b/chromium_src/third_party/blink/renderer/core/page/create_window.cc index 256cb59a8451..6e2ff8b6e953 100644 --- a/chromium_src/third_party/blink/renderer/core/page/create_window.cc +++ b/chromium_src/third_party/blink/renderer/core/page/create_window.cc @@ -10,6 +10,7 @@ #include "third_party/blink/renderer/core/execution_context/execution_context.h" #include "third_party/blink/renderer/core/frame/local_dom_window.h" #include "third_party/blink/renderer/core/frame/screen.h" +#include "third_party/blink/renderer/platform/weborigin/kurl.h" #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" // Because we are spoofing screenX and screenY, we need to offset the position @@ -22,9 +23,10 @@ namespace { blink::WebWindowFeatures MaybeFarbleWindowFeatures( const String& feature_string, - blink::LocalDOMWindow* dom_window) { + blink::LocalDOMWindow* dom_window, + const blink::KURL& url) { blink::WebWindowFeatures window_features = - GetWindowFeaturesFromString_ChromiumImpl(feature_string, dom_window); + GetWindowFeaturesFromString_ChromiumImpl(feature_string, dom_window, url); blink::ExecutionContext* context = dom_window->GetExecutionContext(); if (brave::BlockScreenFingerprinting(context)) { if (window_features.x_set) { @@ -51,11 +53,11 @@ blink::WebWindowFeatures MaybeFarbleWindowFeatures( } // namespace -#define GetWindowFeaturesFromString \ - GetWindowFeaturesFromString(const String& feature_string, \ - LocalDOMWindow* dom_window) { \ - return MaybeFarbleWindowFeatures(feature_string, dom_window); \ - } \ +#define GetWindowFeaturesFromString \ + GetWindowFeaturesFromString(const String& feature_string, \ + LocalDOMWindow* dom_window, const KURL& url) { \ + return MaybeFarbleWindowFeatures(feature_string, dom_window, url); \ + } \ WebWindowFeatures GetWindowFeaturesFromString_ChromiumImpl #include "src/third_party/blink/renderer/core/page/create_window.cc" diff --git a/chromium_src/third_party/blink/renderer/core/page/create_window.h b/chromium_src/third_party/blink/renderer/core/page/create_window.h index 6ad37aea5477..5e6f622dbcb6 100644 --- a/chromium_src/third_party/blink/renderer/core/page/create_window.h +++ b/chromium_src/third_party/blink/renderer/core/page/create_window.h @@ -12,7 +12,8 @@ #define GetWindowFeaturesFromString \ GetWindowFeaturesFromString_ChromiumImpl(const String& feature_string, \ - LocalDOMWindow* dom_window); \ + LocalDOMWindow* dom_window, \ + const KURL& url); \ CORE_EXPORT WebWindowFeatures GetWindowFeaturesFromString #include "src/third_party/blink/renderer/core/page/create_window.h" diff --git a/chromium_src/third_party/blink/renderer/modules/plugins/dom_plugin_array.cc b/chromium_src/third_party/blink/renderer/modules/plugins/dom_plugin_array.cc index 5e1548e68e58..0a00052cecd2 100644 --- a/chromium_src/third_party/blink/renderer/modules/plugins/dom_plugin_array.cc +++ b/chromium_src/third_party/blink/renderer/modules/plugins/dom_plugin_array.cc @@ -11,6 +11,7 @@ #include "third_party/blink/renderer/core/frame/local_frame.h" #include "third_party/blink/renderer/core/page/plugin_data.h" #include "third_party/blink/renderer/modules/plugins/dom_plugin.h" +#include "third_party/blink/renderer/platform/graphics/color.h" #include "third_party/blink/renderer/platform/heap/garbage_collected.h" #include "third_party/blink/renderer/platform/wtf/text/string_builder.h" #include "third_party/blink/renderer/platform/wtf/vector.h" @@ -99,7 +100,7 @@ void FarblePlugins(DOMPluginArray* owner, .GenerateRandomString("PLUGIN_1_FILENAME", 16), BraveSessionCache::From(*(frame->DomWindow())) .GenerateRandomString("PLUGIN_1_DESCRIPTION", 32), - 0, false); + blink::Color::FromRGBA32(0) /* background_color */, false); Vector fake_plugin_extensions_1{ BraveSessionCache::From(*(frame->DomWindow())) .GenerateRandomString("PLUGIN_1_EXTENSION", 3)}; @@ -120,7 +121,7 @@ void FarblePlugins(DOMPluginArray* owner, .GenerateRandomString("PLUGIN_2_FILENAME", 15), BraveSessionCache::From(*(frame->DomWindow())) .GenerateRandomString("PLUGIN_2_DESCRIPTION", 31), - 0, false); + blink::Color::FromRGBA32(0) /* background_color */, false); Vector fake_plugin_extensions_2{ BraveSessionCache::From(*(frame->DomWindow())) .GenerateRandomString("PLUGIN_2_EXTENSION", 3)}; diff --git a/chromium_src/ui/views/controls/button/md_text_button.cc b/chromium_src/ui/views/controls/button/md_text_button.cc index 57f44725cf23..4733f0707828 100644 --- a/chromium_src/ui/views/controls/button/md_text_button.cc +++ b/chromium_src/ui/views/controls/button/md_text_button.cc @@ -111,7 +111,8 @@ void MdTextButton::OnPaintBackground(gfx::Canvas* canvas) { (hover_animation().is_animating() || GetState() == STATE_HOVERED)) { constexpr SkColor normal_color = kBraveBrandColor; constexpr SkColor hover_color = SkColorSetRGB(0xff, 0x97, 0x7d); - const SkAlpha alpha = hover_animation().CurrentValueBetween(0x00, 0xff); + const SkAlpha alpha = + static_cast(hover_animation().CurrentValueBetween(0x00, 0xff)); const SkColor current_color = color_utils::AlphaBlend(hover_color, normal_color, alpha); cc::PaintFlags flags; diff --git a/components/autofill_payments_strings.grdp b/components/autofill_payments_strings.grdp index 3406d4a5efc9..7444a9ebf9ea 100644 --- a/components/autofill_payments_strings.grdp +++ b/components/autofill_payments_strings.grdp @@ -608,6 +608,12 @@ View card + + Virtual card available + + + Virtual card turned on + @@ -706,7 +712,7 @@ Copied to clipboard - + $15% off on shoes. Up to $50. $2See Details diff --git a/components/binance/browser/binance_service_browsertest.cc b/components/binance/browser/binance_service_browsertest.cc index 6c9ddbd465c1..e1b03c9fe7f4 100644 --- a/components/binance/browser/binance_service_browsertest.cc +++ b/components/binance/browser/binance_service_browsertest.cc @@ -15,9 +15,11 @@ #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/ui_test_utils.h" #include "components/country_codes/country_codes.h" +#include "components/network_session_configurator/common/network_switches.h" #include "components/prefs/pref_service.h" #include "content/public/test/browser_test.h" #include "content/public/test/browser_test_utils.h" +#include "content/public/test/content_mock_cert_verifier.h" #include "net/base/url_util.h" #include "net/dns/mock_host_resolver.h" #include "net/test/embedded_test_server/http_request.h" @@ -219,6 +221,8 @@ class BinanceAPIBrowserTest : public InProcessBrowserTest { brave::RegisterPathProvider(); base::FilePath test_data_dir; base::PathService::Get(brave::DIR_TEST_DATA, &test_data_dir); + + mock_cert_verifier_.mock_cert_verifier()->set_default_result(net::OK); } ~BinanceAPIBrowserTest() override = default; @@ -435,6 +439,21 @@ class BinanceAPIBrowserTest : public InProcessBrowserTest { return service; } + void SetUpCommandLine(base::CommandLine* command_line) override { + InProcessBrowserTest::SetUpCommandLine(command_line); + mock_cert_verifier_.SetUpCommandLine(command_line); + } + + void SetUpInProcessBrowserTestFixture() override { + InProcessBrowserTest::SetUpInProcessBrowserTestFixture(); + mock_cert_verifier_.SetUpInProcessBrowserTestFixture(); + } + + void TearDownInProcessBrowserTestFixture() override { + InProcessBrowserTest::TearDownInProcessBrowserTestFixture(); + mock_cert_verifier_.TearDownInProcessBrowserTestFixture(); + } + private: net::EmbeddedTestServer* https_server() { return https_server_.get(); } @@ -453,6 +472,7 @@ class BinanceAPIBrowserTest : public InProcessBrowserTest { std::unique_ptr wait_for_request_; std::unique_ptr https_server_; + content::ContentMockCertVerifier mock_cert_verifier_; }; IN_PROC_BROWSER_TEST_F(BinanceAPIBrowserTest, GetOAuthClientURL) { diff --git a/components/brave_ads/common/features.h b/components/brave_ads/common/features.h index 82ea6308a335..b7641dd61468 100644 --- a/components/brave_ads/common/features.h +++ b/components/brave_ads/common/features.h @@ -8,12 +8,9 @@ #include +#include "base/feature_list.h" #include "build/build_config.h" // IWYU pragma: keep -namespace base { -struct Feature; -} // namespace base - namespace brave_ads::features { extern const base::Feature kNotificationAds; diff --git a/components/brave_rewards/common/features.h b/components/brave_rewards/common/features.h index ae58724cfba0..b1119f86e86d 100644 --- a/components/brave_rewards/common/features.h +++ b/components/brave_rewards/common/features.h @@ -6,13 +6,10 @@ #ifndef BRAVE_COMPONENTS_BRAVE_REWARDS_COMMON_FEATURES_H_ #define BRAVE_COMPONENTS_BRAVE_REWARDS_COMMON_FEATURES_H_ +#include "base/feature_list.h" #include "brave/components/brave_rewards/common/buildflags/buildflags.h" #include "build/build_config.h" -namespace base { -struct Feature; -} // namespace base - namespace brave_rewards { namespace features { diff --git a/components/brave_search_conversion/features.h b/components/brave_search_conversion/features.h index 5418b98d6f54..e7c5c0500e81 100644 --- a/components/brave_search_conversion/features.h +++ b/components/brave_search_conversion/features.h @@ -6,12 +6,9 @@ #ifndef BRAVE_COMPONENTS_BRAVE_SEARCH_CONVERSION_FEATURES_H_ #define BRAVE_COMPONENTS_BRAVE_SEARCH_CONVERSION_FEATURES_H_ -namespace base { -struct Feature; -} // namespace base +#include "base/feature_list.h" namespace brave_search_conversion { - namespace features { extern const base::Feature kOmniboxBanner; @@ -19,7 +16,6 @@ extern const base::Feature kOmniboxButton; extern const base::Feature kNTP; } // namespace features - } // namespace brave_search_conversion #endif // BRAVE_COMPONENTS_BRAVE_SEARCH_CONVERSION_FEATURES_H_ diff --git a/components/brave_shields/common/features.h b/components/brave_shields/common/features.h index b971d5381e98..e3ee0c8fee63 100644 --- a/components/brave_shields/common/features.h +++ b/components/brave_shields/common/features.h @@ -6,9 +6,7 @@ #ifndef BRAVE_COMPONENTS_BRAVE_SHIELDS_COMMON_FEATURES_H_ #define BRAVE_COMPONENTS_BRAVE_SHIELDS_COMMON_FEATURES_H_ -namespace base { -struct Feature; -} // namespace base +#include "base/feature_list.h" namespace brave_shields { namespace features { diff --git a/components/brave_sync/features.h b/components/brave_sync/features.h index 3a7004a06ccb..a46c13f2e3a1 100644 --- a/components/brave_sync/features.h +++ b/components/brave_sync/features.h @@ -6,9 +6,7 @@ #ifndef BRAVE_COMPONENTS_BRAVE_SYNC_FEATURES_H_ #define BRAVE_COMPONENTS_BRAVE_SYNC_FEATURES_H_ -namespace base { -struct Feature; -} // namespace base +#include "base/feature_list.h" namespace brave_sync { namespace features { diff --git a/components/brave_today/common/features.h b/components/brave_today/common/features.h index 4a600bf9ecbd..12d714fb17b5 100644 --- a/components/brave_today/common/features.h +++ b/components/brave_today/common/features.h @@ -6,9 +6,7 @@ #ifndef BRAVE_COMPONENTS_BRAVE_TODAY_COMMON_FEATURES_H_ #define BRAVE_COMPONENTS_BRAVE_TODAY_COMMON_FEATURES_H_ -namespace base { -struct Feature; -} // namespace base +#include "base/feature_list.h" namespace brave_today { namespace features { diff --git a/components/brave_vpn/features.h b/components/brave_vpn/features.h index 07c2d5787fda..1cf315ffdb0d 100644 --- a/components/brave_vpn/features.h +++ b/components/brave_vpn/features.h @@ -6,18 +6,14 @@ #ifndef BRAVE_COMPONENTS_BRAVE_VPN_FEATURES_H_ #define BRAVE_COMPONENTS_BRAVE_VPN_FEATURES_H_ -namespace base { -struct Feature; -} // namespace base +#include "base/feature_list.h" namespace brave_vpn { - namespace features { extern const base::Feature kBraveVPN; } // namespace features - } // namespace brave_vpn #endif // BRAVE_COMPONENTS_BRAVE_VPN_FEATURES_H_ diff --git a/components/brave_wallet/common/features.h b/components/brave_wallet/common/features.h index e1999c590995..dcc67eaed789 100644 --- a/components/brave_wallet/common/features.h +++ b/components/brave_wallet/common/features.h @@ -6,9 +6,7 @@ #ifndef BRAVE_COMPONENTS_BRAVE_WALLET_COMMON_FEATURES_H_ #define BRAVE_COMPONENTS_BRAVE_WALLET_COMMON_FEATURES_H_ -namespace base { -struct Feature; -} // namespace base +#include "base/feature_list.h" namespace brave_wallet { namespace features { diff --git a/components/brave_welcome/common/features.h b/components/brave_welcome/common/features.h index b687c26f3be1..74be1a7f4c8a 100644 --- a/components/brave_welcome/common/features.h +++ b/components/brave_welcome/common/features.h @@ -6,9 +6,7 @@ #ifndef BRAVE_COMPONENTS_BRAVE_WELCOME_COMMON_FEATURES_H_ #define BRAVE_COMPONENTS_BRAVE_WELCOME_COMMON_FEATURES_H_ -namespace base { -struct Feature; -} // namespace base +#include "base/feature_list.h" namespace brave_welcome { namespace features { diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BraveSingleCategorySettings.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BraveSingleCategorySettings.java index e447b1d1d958..9e002e7a7be8 100644 --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BraveSingleCategorySettings.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BraveSingleCategorySettings.java @@ -29,7 +29,7 @@ public String getAddExceptionDialogMessage() { SiteSettingsCategory mCategory = (SiteSettingsCategory) BraveReflectionUtil.getField( SingleCategorySettings.class, "mCategory", this); - if (mCategory.showSites(SiteSettingsCategory.Type.AUTOPLAY)) { + if (mCategory.getType() == SiteSettingsCategory.Type.AUTOPLAY) { resource = R.string.website_settings_add_site_description_autoplay; } else { return (String) BraveReflectionUtil.InvokeMethod( @@ -47,7 +47,7 @@ public void resetList() { SiteSettingsCategory mCategory = (SiteSettingsCategory) BraveReflectionUtil.getField( SingleCategorySettings.class, "mCategory", this); - if (mCategory.showSites(SiteSettingsCategory.Type.AUTOPLAY)) { + if (mCategory.getType() == SiteSettingsCategory.Type.AUTOPLAY) { exception = true; } if (exception) { diff --git a/components/commerce_strings.grdp b/components/commerce_strings.grdp index c9f38c9eb0b1..484d544c89df 100644 --- a/components/commerce_strings.grdp +++ b/components/commerce_strings.grdp @@ -33,5 +33,10 @@ Let Brave find personalized discounts on your carts and on online stores you visit. When available, discounts will automatically show up on your carts and on sites. + + + + Tracked Products + diff --git a/components/components_strings.grd b/components/components_strings.grd index fb797efb3b2f..fca9a0fab26c 100644 --- a/components/components_strings.grd +++ b/components/components_strings.grd @@ -527,6 +527,9 @@ CSV Password Parser Service + + Password Strength Calculator + Unzip Service diff --git a/components/content_settings/renderer/brave_content_settings_agent_impl.cc b/components/content_settings/renderer/brave_content_settings_agent_impl.cc index 7316ec42563a..834029898ae0 100644 --- a/components/content_settings/renderer/brave_content_settings_agent_impl.cc +++ b/components/content_settings/renderer/brave_content_settings_agent_impl.cc @@ -79,8 +79,8 @@ BraveContentSettingsAgentImpl::BraveContentSettingsAgentImpl( : ContentSettingsAgentImpl(render_frame, should_whitelist, std::move(delegate)) { - render_frame->GetAssociatedInterfaceRegistry()->AddInterface( - base::BindRepeating( + render_frame->GetAssociatedInterfaceRegistry() + ->AddInterface(base::BindRepeating( &BraveContentSettingsAgentImpl::BindBraveShieldsReceiver, base::Unretained(this))); } diff --git a/components/de_amp/common/features.h b/components/de_amp/common/features.h index 9223f580cd47..bfdac47f1ae9 100644 --- a/components/de_amp/common/features.h +++ b/components/de_amp/common/features.h @@ -6,11 +6,7 @@ #ifndef BRAVE_COMPONENTS_DE_AMP_COMMON_FEATURES_H_ #define BRAVE_COMPONENTS_DE_AMP_COMMON_FEATURES_H_ -namespace base { - -struct Feature; - -} // namespace base +#include "base/feature_list.h" namespace de_amp { namespace features { diff --git a/components/debounce/common/features.h b/components/debounce/common/features.h index 805128f8d76e..4d535163ae6f 100644 --- a/components/debounce/common/features.h +++ b/components/debounce/common/features.h @@ -6,11 +6,7 @@ #ifndef BRAVE_COMPONENTS_DEBOUNCE_COMMON_FEATURES_H_ #define BRAVE_COMPONENTS_DEBOUNCE_COMMON_FEATURES_H_ -namespace base { - -struct Feature; - -} // namespace base +#include "base/feature_list.h" namespace debounce { namespace features { diff --git a/components/error_page_strings.grdp b/components/error_page_strings.grdp index 68b5972c64ab..b59c10e85f65 100644 --- a/components/error_page_strings.grdp +++ b/components/error_page_strings.grdp @@ -89,7 +89,7 @@ $1Goto the wrench menu and choose Fix It. - + You can disable any proxies configured for a connection from the settings page. @@ -361,7 +361,7 @@ If spelling is correct, <a href="javascript:diagnoseErrors()" id="diagnose-link">try running Windows Network Diagnostics</a>. - + <a href="javascript:diagnoseErrors()" id="diagnose-link">Running Connectivity Diagnostics</a> diff --git a/components/error_page_strings_override.grdp b/components/error_page_strings_override.grdp index 8218fd98986a..8109f435a0f2 100644 --- a/components/error_page_strings_override.grdp +++ b/components/error_page_strings_override.grdp @@ -8,7 +8,7 @@ - + @@ -28,7 +28,7 @@ - + diff --git a/components/fullscreen_control_strings.grdp b/components/fullscreen_control_strings.grdp index 581f5187e191..927f46a80181 100644 --- a/components/fullscreen_control_strings.grdp +++ b/components/fullscreen_control_strings.grdp @@ -22,4 +22,7 @@ Download started. To see it, press |$1Esc|. + + Press |$1Esc| to exit full screen and see download. + diff --git a/components/gemini/browser/gemini_service_browsertest.cc b/components/gemini/browser/gemini_service_browsertest.cc index 6f44dbca87a0..65264a8973b7 100644 --- a/components/gemini/browser/gemini_service_browsertest.cc +++ b/components/gemini/browser/gemini_service_browsertest.cc @@ -15,9 +15,11 @@ #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/ui_test_utils.h" #include "components/country_codes/country_codes.h" +#include "components/network_session_configurator/common/network_switches.h" #include "components/prefs/pref_service.h" #include "content/public/test/browser_test.h" #include "content/public/test/browser_test_utils.h" +#include "content/public/test/content_mock_cert_verifier.h" #include "net/base/url_util.h" #include "net/dns/mock_host_resolver.h" #include "net/test/embedded_test_server/http_request.h" @@ -153,6 +155,8 @@ class GeminiAPIBrowserTest : public InProcessBrowserTest { brave::RegisterPathProvider(); base::FilePath test_data_dir; base::PathService::Get(brave::DIR_TEST_DATA, &test_data_dir); + + mock_cert_verifier_.mock_cert_verifier()->set_default_result(net::OK); } ~GeminiAPIBrowserTest() override = default; @@ -300,6 +304,21 @@ class GeminiAPIBrowserTest : public InProcessBrowserTest { return service; } + void SetUpCommandLine(base::CommandLine* command_line) override { + InProcessBrowserTest::SetUpCommandLine(command_line); + mock_cert_verifier_.SetUpCommandLine(command_line); + } + + void SetUpInProcessBrowserTestFixture() override { + InProcessBrowserTest::SetUpInProcessBrowserTestFixture(); + mock_cert_verifier_.SetUpInProcessBrowserTestFixture(); + } + + void TearDownInProcessBrowserTestFixture() override { + InProcessBrowserTest::TearDownInProcessBrowserTestFixture(); + mock_cert_verifier_.TearDownInProcessBrowserTestFixture(); + } + private: net::EmbeddedTestServer* https_server() { return https_server_.get(); } @@ -314,6 +333,7 @@ class GeminiAPIBrowserTest : public InProcessBrowserTest { std::unique_ptr wait_for_request_; std::unique_ptr https_server_; + content::ContentMockCertVerifier mock_cert_verifier_; }; diff --git a/components/history_clusters_strings.grdp b/components/history_clusters_strings.grdp index 73cb7e4dde25..5133d4673f41 100644 --- a/components/history_clusters_strings.grdp +++ b/components/history_clusters_strings.grdp @@ -26,6 +26,9 @@ Load more + + No search results + Open all in new tab group diff --git a/components/ipfs/features.h b/components/ipfs/features.h index 0838dc27f87b..c59631c94e37 100644 --- a/components/ipfs/features.h +++ b/components/ipfs/features.h @@ -6,9 +6,7 @@ #ifndef BRAVE_COMPONENTS_IPFS_FEATURES_H_ #define BRAVE_COMPONENTS_IPFS_FEATURES_H_ -namespace base { -struct Feature; -} // namespace base +#include "base/feature_list.h" namespace ipfs { namespace features { diff --git a/components/management_strings.grdp b/components/management_strings.grdp index ad93b814d539..89f5bad516c6 100644 --- a/components/management_strings.grdp +++ b/components/management_strings.grdp @@ -78,7 +78,7 @@ - + This device and account are not managed by a company or other organization. @@ -98,7 +98,7 @@ chrome://management for managed devices, please add it to go/chrome-policy-privacy-note-mappings --> - + Custom root certificates @@ -275,6 +275,9 @@ Page is printed + + File is copied or moved + Security event occurs @@ -293,6 +296,9 @@ The content of pages you print is sent to Google Cloud or third parties for analysis. For example, it might be scanned for sensitive data. + + Files you copy or move are sent to Google Cloud or third parties for analysis. For example, they might be scanned for sensitive data or malware. + When security events are flagged by Brave, relevant data about the events is sent to your administrator. This can include URLs of pages you visit in Brave, file names or metadata, and the username that you use to sign in to web based applications, your device and Brave. diff --git a/components/new_or_sad_tab_strings.grdp b/components/new_or_sad_tab_strings.grdp index 693d7f251794..59f0b95be615 100644 --- a/components/new_or_sad_tab_strings.grdp +++ b/components/new_or_sad_tab_strings.grdp @@ -62,7 +62,7 @@ Open page in a new Private tab - + Close other tabs or apps @@ -72,7 +72,7 @@ Close other tabs or programs - + Close other apps diff --git a/components/new_or_sad_tab_strings_override.grdp b/components/new_or_sad_tab_strings_override.grdp index a2d405029c52..05ea88bcbe90 100644 --- a/components/new_or_sad_tab_strings_override.grdp +++ b/components/new_or_sad_tab_strings_override.grdp @@ -20,11 +20,11 @@ Open page in a new Private tab - + - + diff --git a/components/ntp_background_images/browser/features.h b/components/ntp_background_images/browser/features.h index 3163c8137bf2..1c0515a43049 100644 --- a/components/ntp_background_images/browser/features.h +++ b/components/ntp_background_images/browser/features.h @@ -6,9 +6,7 @@ #ifndef BRAVE_COMPONENTS_NTP_BACKGROUND_IMAGES_BROWSER_FEATURES_H_ #define BRAVE_COMPONENTS_NTP_BACKGROUND_IMAGES_BROWSER_FEATURES_H_ -namespace base { -struct Feature; -} // namespace base +#include "base/feature_list.h" namespace ntp_background_images { namespace features { diff --git a/components/ntp_background_images/browser/ntp_background_images_source.cc b/components/ntp_background_images/browser/ntp_background_images_source.cc index 2c653de565d4..3dde7b56b70e 100644 --- a/components/ntp_background_images/browser/ntp_background_images_source.cc +++ b/components/ntp_background_images/browser/ntp_background_images_source.cc @@ -90,7 +90,8 @@ void NTPBackgroundImagesSource::OnGotImageFile( std::move(callback).Run(std::move(bytes)); } -std::string NTPBackgroundImagesSource::GetMimeType(const std::string& path) { +std::string NTPBackgroundImagesSource::GetMimeType(const GURL& url) { + const std::string path = URLDataSource::URLToRequestPath(url); const auto file_path = base::FilePath::FromUTF8Unsafe(path); if (file_path.MatchesExtension(FILE_PATH_LITERAL(".jpg"))) { return "image/jpeg"; diff --git a/components/ntp_background_images/browser/ntp_background_images_source.h b/components/ntp_background_images/browser/ntp_background_images_source.h index b3bab43ad142..0d27c63b71b7 100644 --- a/components/ntp_background_images/browser/ntp_background_images_source.h +++ b/components/ntp_background_images/browser/ntp_background_images_source.h @@ -42,7 +42,7 @@ class NTPBackgroundImagesSource : public content::URLDataSource { void StartDataRequest(const GURL& url, const content::WebContents::Getter& wc_getter, GotDataCallback callback) override; - std::string GetMimeType(const std::string& path) override; + std::string GetMimeType(const GURL& url) override; void GetImageFile(const base::FilePath& image_file_path, GotDataCallback callback); diff --git a/components/ntp_background_images/browser/ntp_background_images_source_unittest.cc b/components/ntp_background_images/browser/ntp_background_images_source_unittest.cc index ba4e2fc94dfd..33df0b69e6c9 100644 --- a/components/ntp_background_images/browser/ntp_background_images_source_unittest.cc +++ b/components/ntp_background_images/browser/ntp_background_images_source_unittest.cc @@ -76,18 +76,27 @@ TEST_F(NTPBackgroundImagesSourceTest, SponsoredImagesTest) { EXPECT_FALSE(source_->IsValidPath("super-duper/brave.png")); EXPECT_FALSE(source_->IsValidPath("sponsored-images/abcd.png")); - EXPECT_EQ("image/jpeg", source_->GetMimeType("wallpaper-0.jpg")); - EXPECT_EQ("image/jpeg", source_->GetMimeType("wallpaper-0.jpeg")); - EXPECT_EQ("image/webp", source_->GetMimeType("wallpaper-0.webp")); - EXPECT_EQ("image/png", source_->GetMimeType("wallpaper-0.png")); - EXPECT_EQ("image/avif", source_->GetMimeType("wallpaper-0.avif")); + EXPECT_EQ("image/jpeg", + source_->GetMimeType(GURL("brave://test/wallpaper-0.jpg"))); + EXPECT_EQ("image/jpeg", + source_->GetMimeType(GURL("brave://test/wallpaper-0.jpeg"))); + EXPECT_EQ("image/webp", + source_->GetMimeType(GURL("brave://test/wallpaper-0.webp"))); + EXPECT_EQ("image/png", + source_->GetMimeType(GURL("brave://test/wallpaper-0.png"))); + EXPECT_EQ("image/avif", + source_->GetMimeType(GURL("brave://test/wallpaper-0.avif"))); } TEST_F(NTPBackgroundImagesSourceTest, BackgroundImagesFormatTest) { - EXPECT_EQ("image/jpeg", bg_source_->GetMimeType("wallpaper-0.jpg")); - EXPECT_EQ("image/webp", bg_source_->GetMimeType("wallpaper-0.webp")); - EXPECT_EQ("image/png", bg_source_->GetMimeType("wallpaper-0.png")); - EXPECT_EQ("image/avif", bg_source_->GetMimeType("wallpaper-0.avif")); + EXPECT_EQ("image/jpeg", + bg_source_->GetMimeType(GURL("brave://test/wallpaper-0.jpg"))); + EXPECT_EQ("image/webp", + bg_source_->GetMimeType(GURL("brave://test/wallpaper-0.webp"))); + EXPECT_EQ("image/png", + bg_source_->GetMimeType(GURL("brave://test/wallpaper-0.png"))); + EXPECT_EQ("image/avif", + bg_source_->GetMimeType(GURL("brave://test/wallpaper-0.avif"))); } TEST_F(NTPBackgroundImagesSourceTest, BackgroundImagesTest) { diff --git a/components/ntp_background_images/browser/ntp_custom_images_source.cc b/components/ntp_background_images/browser/ntp_custom_images_source.cc index 160980b314a5..a04cdb30cb44 100644 --- a/components/ntp_background_images/browser/ntp_custom_images_source.cc +++ b/components/ntp_background_images/browser/ntp_custom_images_source.cc @@ -51,7 +51,7 @@ void NTPCustomImagesSource::StartDataRequest( GetImageFile(service_->GetImageFilePath(), std::move(callback)); } -std::string NTPCustomImagesSource::GetMimeType(const std::string& path) { +std::string NTPCustomImagesSource::GetMimeType(const GURL& url) { return "image/jpeg"; } diff --git a/components/ntp_background_images/browser/ntp_custom_images_source.h b/components/ntp_background_images/browser/ntp_custom_images_source.h index 393c020df157..171030bcaabe 100644 --- a/components/ntp_background_images/browser/ntp_custom_images_source.h +++ b/components/ntp_background_images/browser/ntp_custom_images_source.h @@ -36,7 +36,7 @@ class NTPCustomImagesSource : public content::URLDataSource { void StartDataRequest(const GURL& url, const content::WebContents::Getter& wc_getter, GotDataCallback callback) override; - std::string GetMimeType(const std::string& path) override; + std::string GetMimeType(const GURL& url) override; bool AllowCaching() override; void GetImageFile(const base::FilePath& image_file_path, diff --git a/components/ntp_background_images/browser/ntp_sponsored_images_source.cc b/components/ntp_background_images/browser/ntp_sponsored_images_source.cc index 6e0440dcc0bc..f3f44e209426 100644 --- a/components/ntp_background_images/browser/ntp_sponsored_images_source.cc +++ b/components/ntp_background_images/browser/ntp_sponsored_images_source.cc @@ -95,7 +95,8 @@ void NTPSponsoredImagesSource::OnGotImageFile( std::move(callback).Run(std::move(bytes)); } -std::string NTPSponsoredImagesSource::GetMimeType(const std::string& path) { +std::string NTPSponsoredImagesSource::GetMimeType(const GURL& url) { + const std::string path = URLDataSource::URLToRequestPath(url); const auto file_path = base::FilePath::FromUTF8Unsafe(path); if (file_path.MatchesExtension(FILE_PATH_LITERAL(".jpg")) || file_path.MatchesExtension(FILE_PATH_LITERAL(".jpeg"))) { diff --git a/components/ntp_background_images/browser/ntp_sponsored_images_source.h b/components/ntp_background_images/browser/ntp_sponsored_images_source.h index c57d566b03fc..d752fa504913 100644 --- a/components/ntp_background_images/browser/ntp_sponsored_images_source.h +++ b/components/ntp_background_images/browser/ntp_sponsored_images_source.h @@ -41,7 +41,7 @@ class NTPSponsoredImagesSource : public content::URLDataSource { void StartDataRequest(const GURL& url, const content::WebContents::Getter& wc_getter, GotDataCallback callback) override; - std::string GetMimeType(const std::string& path) override; + std::string GetMimeType(const GURL& url) override; bool AllowCaching() override; base::FilePath GetLocalFilePathFor(const std::string& path); diff --git a/components/omnibox_strings.grdp b/components/omnibox_strings.grdp index 419c3a77db7e..22c4a06e9175 100644 --- a/components/omnibox_strings.grdp +++ b/components/omnibox_strings.grdp @@ -139,6 +139,12 @@ Search or type URL + + $1 - $2 + + + $1 ($2) + Switch to this tab @@ -259,7 +265,7 @@ $1The Chromium Projects http://www.chromium.org bookmark, press Tab then Enter to search - Search mode, type a query and press Enter to search with $1Youtube + Search $1Youtube, type a query and press Enter to search @@ -294,29 +300,28 @@ "$1Related to recent searches" section hidden - + - Brave Bookmarks + Bookmarks Bookmarks - Brave History + History History - - Brave Settings - - - Settings - - Brave Tabs + Tabs Tabs + + + + No results found + diff --git a/components/p3a/brave_p3a_log_store.cc b/components/p3a/brave_p3a_log_store.cc index 577a5775d63f..c24c3a51865a 100644 --- a/components/p3a/brave_p3a_log_store.cc +++ b/components/p3a/brave_p3a_log_store.cc @@ -190,7 +190,8 @@ void BraveP3ALogStore::DiscardStagedLog() { void BraveP3ALogStore::MarkStagedLogAsSent() {} -void BraveP3ALogStore::TrimAndPersistUnsentLogs() { +void BraveP3ALogStore::TrimAndPersistUnsentLogs( + bool overwrite_in_memory_store) { NOTREACHED(); } diff --git a/components/p3a/brave_p3a_log_store.h b/components/p3a/brave_p3a_log_store.h index ddbcdc40c08f..d63ef5409e95 100644 --- a/components/p3a/brave_p3a_log_store.h +++ b/components/p3a/brave_p3a_log_store.h @@ -63,7 +63,7 @@ class BraveP3ALogStore : public metrics::LogStore { // |TrimAndPersistUnsentLogs| should not be used, since we persist everything // on the fly. - void TrimAndPersistUnsentLogs() override; + void TrimAndPersistUnsentLogs(bool overwrite_in_memory_store) override; // Returns early if founds malformed persisted values. void LoadPersistedUnsentLogs() override; diff --git a/components/page_info_strings.grdp b/components/page_info_strings.grdp index bd4715daf40b..f03ac4705b05 100644 --- a/components/page_info_strings.grdp +++ b/components/page_info_strings.grdp @@ -448,8 +448,8 @@ Can ask to know when you're actively using this device - - Can ask to use info about your screens + + Can ask to manage windows on all your displays Can ask to discover nearby Bluetooth devices @@ -696,6 +696,9 @@ About this page + + Learn about its source and topic + Show information from the web @@ -705,6 +708,33 @@ From $1Wikipedia + + + + Cookies and other site data are used to remember you, for example to sign you in or to personalize ads. To manage cookies for all sites, see $1Settings. + + + Settings + + + Block third-party cookies + + + Block third-party cookies + + + {NUM_COOKIES, plural, =1 {1 site blocked} other {# sites blocked}} + + + {NUM_COOKIES, plural, =1 {1 site allowed} other {# sites allowed}} + + + See sites related to $1gannett.com + + + $1gannett.com says these sites are related + + History diff --git a/components/password_manager_strings.grdp b/components/password_manager_strings.grdp index a78150c9ef52..81451a90b478 100644 --- a/components/password_manager_strings.grdp +++ b/components/password_manager_strings.grdp @@ -86,6 +86,9 @@ Manage passwords… + + Manage passwords and passkeys… + Suggest strong password… @@ -94,6 +97,9 @@ Manage Passwords… + + Manage Passwords And Passkeys… + Suggest Strong Password… @@ -113,4 +119,29 @@ Password for $1chef@google.com + + + Use A Passkey On A Different Device + + + + + Use a passkey on a different device + + + + + Use Windows Hello + + + + + Use TouchID + + + + + Use device sign-in + + diff --git a/components/permissions/brave_permission_manager.cc b/components/permissions/brave_permission_manager.cc index 7653d830dd2c..7e6ffeca821f 100644 --- a/components/permissions/brave_permission_manager.cc +++ b/components/permissions/brave_permission_manager.cc @@ -19,19 +19,6 @@ BravePermissionManager::BravePermissionManager( PermissionContextMap permission_contexts) : PermissionManager(browser_context, std::move(permission_contexts)) {} -GURL BravePermissionManager::GetCanonicalOrigin( - ContentSettingsType permission, - const GURL& requesting_origin, - const GURL& embedding_origin) const { - // Use requesting_origin which will have ethereum or solana address info. - if (permission == ContentSettingsType::BRAVE_ETHEREUM || - permission == ContentSettingsType::BRAVE_SOLANA) - return requesting_origin; - - return PermissionManager::GetCanonicalOrigin(permission, requesting_origin, - embedding_origin); -} - void BravePermissionManager::RequestPermissionsForOrigin( const std::vector& permissions, content::RenderFrameHost* render_frame_host, @@ -56,11 +43,5 @@ BravePermissionManager::GetPermissionStatusForOrigin( requesting_origin); return GetPermissionStatusForCurrentDocument(permission, render_frame_host); } -void BravePermissionManager::ResetPermission(blink::PermissionType permission, - const GURL& requesting_origin, - const GURL& embedding_origin) { - PermissionManager::ResetPermission(permission, requesting_origin, - embedding_origin); -} } // namespace permissions diff --git a/components/permissions/brave_permission_manager.h b/components/permissions/brave_permission_manager.h index 72e8cded1609..c39e3d0c0bbe 100644 --- a/components/permissions/brave_permission_manager.h +++ b/components/permissions/brave_permission_manager.h @@ -21,29 +21,19 @@ class BravePermissionManager : public PermissionManager { BravePermissionManager(const BravePermissionManager&) = delete; BravePermissionManager& operator=(const BravePermissionManager&) = delete; - GURL GetCanonicalOrigin(ContentSettingsType permission, - const GURL& requesting_origin, - const GURL& embedding_origin) const override; - void RequestPermissionsForOrigin( const std::vector& permissions, content::RenderFrameHost* render_frame_host, const GURL& requesting_origin, bool user_gesture, base::OnceCallback< - void(const std::vector&)> callback); + void(const std::vector&)> callback) + override; blink::mojom::PermissionStatus GetPermissionStatusForOrigin( blink::PermissionType permission, content::RenderFrameHost* render_frame_host, - const GURL& requesting_origin); - - void ResetPermission(blink::PermissionType permission, - const GURL& requesting_origin, - const GURL& embedding_origin) override; - - using PermissionManager::GetPermissionStatus; - using PermissionManager::ResetPermission; + const GURL& requesting_origin) override; }; } // namespace permissions diff --git a/components/permissions/contexts/brave_wallet_permission_context.cc b/components/permissions/contexts/brave_wallet_permission_context.cc index 41fdc68380b5..6331fbc25f3c 100644 --- a/components/permissions/contexts/brave_wallet_permission_context.cc +++ b/components/permissions/contexts/brave_wallet_permission_context.cc @@ -8,7 +8,6 @@ #include #include "brave/components/brave_wallet/browser/permission_utils.h" -#include "brave/components/permissions/brave_permission_manager.h" #include "components/content_settings/core/browser/host_content_settings_map.h" #include "components/content_settings/core/common/content_settings.h" #include "components/content_settings/core/common/content_settings_types.h" @@ -17,6 +16,8 @@ #include "components/permissions/permission_request_id.h" #include "components/permissions/permission_request_manager.h" #include "components/permissions/permissions_client.h" +#include "content/public/browser/browser_context.h" +#include "content/public/browser/permission_controller_delegate.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/web_contents.h" #include "third_party/blink/public/mojom/permissions_policy/permissions_policy_feature.mojom.h" @@ -166,11 +167,14 @@ void BraveWalletPermissionContext::RequestPermissions( } auto* web_contents = content::WebContents::FromRenderFrameHost(rfh); - auto* permission_manager = static_cast( - permissions::PermissionsClient::Get()->GetPermissionManager( - web_contents->GetBrowserContext())); + if (!web_contents) { + std::move(callback).Run(std::vector()); + return; + } - if (!permission_manager) { + content::PermissionControllerDelegate* delegate = + web_contents->GetBrowserContext()->GetPermissionControllerDelegate(); + if (!delegate) { std::move(callback).Run(std::vector()); return; } @@ -190,9 +194,9 @@ void BraveWalletPermissionContext::RequestPermissions( } std::vector types(addresses.size(), permission); - permission_manager->RequestPermissionsForOrigin( - types, rfh, origin.GetURL(), rfh->HasTransientUserActivation(), - std::move(callback)); + delegate->RequestPermissionsForOrigin(types, rfh, origin.GetURL(), + rfh->HasTransientUserActivation(), + std::move(callback)); } // static @@ -213,16 +217,15 @@ void BraveWalletPermissionContext::GetAllowedAccounts( return; } - auto* permission_manager = static_cast( - permissions::PermissionsClient::Get()->GetPermissionManager( - web_contents->GetBrowserContext())); - if (!permission_manager) { + content::PermissionControllerDelegate* delegate = + web_contents->GetBrowserContext()->GetPermissionControllerDelegate(); + if (!delegate) { std::move(callback).Run(false, std::vector()); return; } const ContentSettingsType content_settings_type = - PermissionUtil::PermissionTypeToContentSettingSafe(permission); + PermissionUtil::PermissionTypeToContentSettingTypeSafe(permission); std::vector allowed_accounts; url::Origin origin = url::Origin::Create(rfh->GetLastCommittedURL()); @@ -232,7 +235,7 @@ void BraveWalletPermissionContext::GetAllowedAccounts( ContentSettingsTypeToRequestType(content_settings_type), origin, address, &sub_request_origin); if (success) { - auto status = permission_manager->GetPermissionStatusForOrigin( + auto status = delegate->GetPermissionStatusForOrigin( permission, rfh, sub_request_origin.GetURL()); if (status == blink::mojom::PermissionStatus::GRANTED) { allowed_accounts.push_back(address); @@ -248,13 +251,13 @@ bool BraveWalletPermissionContext::IsPermissionDenied( blink::PermissionType permission, content::BrowserContext* context, const url::Origin& origin) { - auto* permission_manager = static_cast( - permissions::PermissionsClient::Get()->GetPermissionManager(context)); - if (!permission_manager) + content::PermissionControllerDelegate* delegate = + context->GetPermissionControllerDelegate(); + if (!delegate) return false; - return permission_manager->GetPermissionStatus(permission, origin.GetURL(), - origin.GetURL()) == + return delegate->GetPermissionStatus(permission, origin.GetURL(), + origin.GetURL()) == blink::mojom::PermissionStatus::DENIED; } @@ -272,7 +275,7 @@ bool BraveWalletPermissionContext::AddPermission( return true; const ContentSettingsType content_settings_type = - PermissionUtil::PermissionTypeToContentSettingSafe(permission); + PermissionUtil::PermissionTypeToContentSettingTypeSafe(permission); url::Origin origin_wallet_address; if (!brave_wallet::GetSubRequestOrigin( @@ -298,9 +301,9 @@ bool BraveWalletPermissionContext::HasPermission( bool* has_permission) { CHECK(has_permission); *has_permission = false; - auto* permission_manager = static_cast( - permissions::PermissionsClient::Get()->GetPermissionManager(context)); - if (!permission_manager) + content::PermissionControllerDelegate* delegate = + context->GetPermissionControllerDelegate(); + if (!delegate) return false; if (IsPermissionDenied(permission, context, origin)) { @@ -308,7 +311,7 @@ bool BraveWalletPermissionContext::HasPermission( } const ContentSettingsType content_settings_type = - PermissionUtil::PermissionTypeToContentSettingSafe(permission); + PermissionUtil::PermissionTypeToContentSettingTypeSafe(permission); url::Origin origin_wallet_address; if (!brave_wallet::GetSubRequestOrigin( @@ -317,9 +320,9 @@ bool BraveWalletPermissionContext::HasPermission( return false; } - auto status = permission_manager->GetPermissionStatus( - permission, origin_wallet_address.GetURL(), - origin_wallet_address.GetURL()); + auto status = + delegate->GetPermissionStatus(permission, origin_wallet_address.GetURL(), + origin_wallet_address.GetURL()); *has_permission = status == blink::mojom::PermissionStatus::GRANTED; return true; @@ -331,13 +334,13 @@ bool BraveWalletPermissionContext::ResetPermission( content::BrowserContext* context, const url::Origin& origin, const std::string& account) { - auto* permission_manager = static_cast( - permissions::PermissionsClient::Get()->GetPermissionManager(context)); - if (!permission_manager) + content::PermissionControllerDelegate* delegate = + context->GetPermissionControllerDelegate(); + if (!delegate) return false; const ContentSettingsType content_settings_type = - PermissionUtil::PermissionTypeToContentSettingSafe(permission); + PermissionUtil::PermissionTypeToContentSettingTypeSafe(permission); url::Origin origin_wallet_address; if (!brave_wallet::GetSubRequestOrigin( @@ -346,9 +349,8 @@ bool BraveWalletPermissionContext::ResetPermission( return false; } - permission_manager->ResetPermission(permission, - origin_wallet_address.GetURL(), - origin_wallet_address.GetURL()); + delegate->ResetPermission(permission, origin_wallet_address.GetURL(), + origin_wallet_address.GetURL()); return true; } @@ -358,7 +360,7 @@ BraveWalletPermissionContext::GetWebSitesWithPermission( blink::PermissionType permission, content::BrowserContext* context) { const ContentSettingsType content_settings_type = - PermissionUtil::PermissionTypeToContentSettingSafe(permission); + PermissionUtil::PermissionTypeToContentSettingTypeSafe(permission); HostContentSettingsMap* map = PermissionsClient::Get()->GetSettingsMap(context); @@ -381,13 +383,13 @@ bool BraveWalletPermissionContext::ResetWebSitePermission( blink::PermissionType permission, content::BrowserContext* context, const std::string& formed_website) { - auto* permission_manager = static_cast( - permissions::PermissionsClient::Get()->GetPermissionManager(context)); + content::PermissionControllerDelegate* delegate = + context->GetPermissionControllerDelegate(); GURL url(formed_website); - if (!permission_manager || !url.is_valid()) + if (!delegate || !url.is_valid()) return false; - permission_manager->ResetPermission(permission, url, url); + delegate->ResetPermission(permission, url, url); return true; } diff --git a/components/permissions/permission_expirations.cc b/components/permissions/permission_expirations.cc index 81b9bd1f2737..dce9ba13f5ac 100644 --- a/components/permissions/permission_expirations.cc +++ b/components/permissions/permission_expirations.cc @@ -322,20 +322,20 @@ PermissionExpirations::ParseExpiringPermissions( base::Value PermissionExpirations::ExpiringPermissionsToValue( const ExpiringPermissions& expiring_permissions) const { - base::Value::ListStorage items; + base::Value::List items; items.reserve(expiring_permissions.size()); for (const auto& expiring_permission : expiring_permissions) { - base::Value value(base::Value::Type::DICTIONARY); - value.SetStringKey(kRequestingOriginKey, - expiring_permission.requesting_origin().spec()); + base::Value::Dict value; + value.Set(kRequestingOriginKey, + expiring_permission.requesting_origin().spec()); if (expiring_permission.embedding_origin() != expiring_permission.requesting_origin()) { - value.SetStringKey(kEmbeddingOriginKey, - expiring_permission.embedding_origin().spec()); + value.Set(kEmbeddingOriginKey, + expiring_permission.embedding_origin().spec()); } - value.SetIntKey(kContentSettingKey, expiring_permission.content_setting()); - items.push_back(std::move(value)); + value.Set(kContentSettingKey, expiring_permission.content_setting()); + items.Append(std::move(value)); } return base::Value(std::move(items)); diff --git a/components/permissions_strings.grdp b/components/permissions_strings.grdp index 10110489d847..0f1d28c374a1 100644 --- a/components/permissions_strings.grdp +++ b/components/permissions_strings.grdp @@ -78,7 +78,7 @@ Allow 2 permissions? - + Know your unique device identifier @@ -127,8 +127,8 @@ Do you want to allow $1news.site to use co This will otherwise be blocked by your privacy settings. This will allow the content you interacted with to work correctly, but may allow $1news.site to track your activity. - - Use info about your screens to open and place windows + + Manage windows on all your displays Use the fonts on your computer so you can create high-fidelity content diff --git a/components/playlist/features.h b/components/playlist/features.h index aeb3407ed64d..70060b9e3d89 100644 --- a/components/playlist/features.h +++ b/components/playlist/features.h @@ -6,9 +6,7 @@ #ifndef BRAVE_COMPONENTS_PLAYLIST_FEATURES_H_ #define BRAVE_COMPONENTS_PLAYLIST_FEATURES_H_ -namespace base { -struct Feature; -} // namespace base +#include "base/feature_list.h" namespace playlist::features { diff --git a/components/playlist/playlist_data_source.cc b/components/playlist/playlist_data_source.cc index ebc79c09e983..43d162ee6a08 100644 --- a/components/playlist/playlist_data_source.cc +++ b/components/playlist/playlist_data_source.cc @@ -105,7 +105,8 @@ void PlaylistDataSource::OnGotDataFile( std::move(got_data_callback).Run(input); } -std::string PlaylistDataSource::GetMimeType(const std::string& path) { +std::string PlaylistDataSource::GetMimeType(const GURL& url) { + const std::string path = URLDataSource::URLToRequestPath(url); std::string id; std::string type_string; if (auto pos = path.find("/"); pos != std::string::npos) { diff --git a/components/playlist/playlist_data_source.h b/components/playlist/playlist_data_source.h index 686950d03427..116c99cd907d 100644 --- a/components/playlist/playlist_data_source.h +++ b/components/playlist/playlist_data_source.h @@ -37,7 +37,7 @@ class PlaylistDataSource : public content::URLDataSource { void StartDataRequest(const GURL& url, const content::WebContents::Getter& wc_getter, GotDataCallback got_data_callback) override; - std::string GetMimeType(const std::string& path) override; + std::string GetMimeType(const GURL& url) override; bool AllowCaching() override; private: diff --git a/components/playlist/playlist_service.cc b/components/playlist/playlist_service.cc index 6a527a9e830b..ffcfcdebcdad 100644 --- a/components/playlist/playlist_service.cc +++ b/components/playlist/playlist_service.cc @@ -130,24 +130,25 @@ void PlaylistService::RemoveItemFromPlaylist(const std::string& playlist_id, return; } - base::ListValue* item_ids = nullptr; - if (!a_playlist_update->GetList(kPlaylistItemsKey, &item_ids)) { + base::Value::List* item_ids = nullptr; + if (!a_playlist_update->GetListWithoutPathExpansion(kPlaylistItemsKey, + &item_ids)) { NOTREACHED() << __func__ << " Playlist " << playlist_id << " doesn't have |items| field"; return; } - auto& id_list = item_ids->GetList(); - auto it = base::ranges::find_if(id_list, [&item_id](const auto& id) { + auto it = base::ranges::find_if(*item_ids, [&item_id](const auto& id) { return id.GetString() == item_id; }); - if (it == id_list.end()) + if (it == item_ids->end()) return; - id_list.erase(it); + item_ids->erase(it); - a_playlist_update->Set(kPlaylistItemsKey, - base::Value::ToUniquePtrValue(std::move(*item_ids))); + a_playlist_update->Set( + kPlaylistItemsKey, + base::Value::ToUniquePtrValue(base::Value(std::move(*item_ids)))); } // TODO(sko) Once we can support to share an item between playlists, we should @@ -170,8 +171,9 @@ void PlaylistService::RequestDownloadMediaFilesFromItems( return; } - base::ListValue* item_ids = nullptr; - if (!a_playlist_update->GetList(kPlaylistItemsKey, &item_ids)) { + base::Value::List* item_ids = nullptr; + if (!a_playlist_update->GetListWithoutPathExpansion(kPlaylistItemsKey, + &item_ids)) { NOTREACHED() << __func__ << " Playlist " << playlist_id << " doesn't have |items| field"; return; @@ -182,8 +184,9 @@ void PlaylistService::RequestDownloadMediaFilesFromItems( item_ids->Append(item.id); } - a_playlist_update->Set(kPlaylistItemsKey, - base::Value::ToUniquePtrValue(std::move(*item_ids))); + a_playlist_update->Set( + kPlaylistItemsKey, + base::Value::ToUniquePtrValue(base::Value(std::move(*item_ids)))); } base::ranges::for_each( @@ -324,15 +327,15 @@ void PlaylistService::RemovePlaylist(const std::string& playlist_id) { return; } - base::ListValue* item_ids = nullptr; - if (!a_playlist_update->GetList(kPlaylistItemsKey, &item_ids)) { + base::Value::List* item_ids = nullptr; + if (!a_playlist_update->GetListWithoutPathExpansion(kPlaylistItemsKey, + &item_ids)) { NOTREACHED() << __func__ << " Playlist " << playlist_id << " doesn't have |items| field"; return; } - id_list = - std::make_unique(std::move(item_ids->GetList())); + id_list = std::make_unique(std::move(*item_ids)); playlists_update->Remove(playlist_id); } diff --git a/components/policy_strings.grdp b/components/policy_strings.grdp index 0712d105ba07..704b6d003e82 100644 --- a/components/policy_strings.grdp +++ b/components/policy_strings.grdp @@ -164,6 +164,36 @@ Value doesn't match format. + + File extension is empty or malformed. + + + Hash must be of format SHA-256. + + + The inserted $1paper size couldn't be found. + + + Found paper size name "custom", but the "custom_size" property is empty or invalid. + + + The property "custom_size" is set, expected name to be "custom". + + + Invalid format: Expected a list of patterns. + + + Invalid protocol format. + + + Invalid origin format. + + + Origin list is empty. + + + Invalid Extension: Expected the value to be of one of the following forms: <extension_id> or <extension_id>;<update_url>. + Ignored because the policy is not set by a cloud source. @@ -200,6 +230,9 @@ Error while parsing JSON value: $1Line 2, Column 3: Map keys must be quoted. + + Invalid URL. + Invalid search URL. @@ -286,7 +319,7 @@ Additional details: $1ERROR: Field name 'SomeRandomField' is unknown. (at toplevel) - + Policy scope is not supported. @@ -596,6 +629,9 @@ Additional details: This policy cannot be set at the Brave profile level and will be ignored. + + This policy is ignored because the user is unaffiliated. For this policy to be applied, the Brave browser and profile must be managed through the Admin console by the same organization. + Platform machine diff --git a/components/printing_component_strings.grdp b/components/printing_component_strings.grdp index 3f2de3c6546d..c318c8275c85 100644 --- a/components/printing_component_strings.grdp +++ b/components/printing_component_strings.grdp @@ -13,7 +13,7 @@ Print Compositor Service - + Chamber humidity diff --git a/components/sidebar/sidebar_service.cc b/components/sidebar/sidebar_service.cc index 54986104555e..22d43b4e1e4c 100644 --- a/components/sidebar/sidebar_service.cc +++ b/components/sidebar/sidebar_service.cc @@ -343,9 +343,9 @@ void SidebarService::RemoveItemAt(int index) { UpdateSidebarItemsToPrefStore(); } -void SidebarService::MoveItem(int from, int to) { +void SidebarService::MoveItem(size_t from, size_t to) { DCHECK(items_.size() > static_cast(from) && - items_.size() > static_cast(to) && from >= 0 && to >= 0); + items_.size() > static_cast(to)); if (from == to) return; @@ -484,8 +484,8 @@ absl::optional SidebarService::GetDefaultPanelItem() const { return default_item; } -bool SidebarService::IsEditableItemAt(int index) const { - DCHECK(0 <= index && index < static_cast(items_.size())); +bool SidebarService::IsEditableItemAt(size_t index) const { + DCHECK(index < items_.size()); return sidebar::IsWebType(items_[index]); } diff --git a/components/sidebar/sidebar_service.h b/components/sidebar/sidebar_service.h index 564c8399be1a..fedbe2e02486 100644 --- a/components/sidebar/sidebar_service.h +++ b/components/sidebar/sidebar_service.h @@ -59,10 +59,10 @@ class SidebarService : public KeyedService { class Observer : public base::CheckedObserver { public: - virtual void OnItemAdded(const SidebarItem& item, int index) {} - virtual void OnItemMoved(const SidebarItem& item, int from, int to) {} - virtual void OnWillRemoveItem(const SidebarItem& item, int index) {} - virtual void OnItemRemoved(const SidebarItem& item, int index) {} + virtual void OnItemAdded(const SidebarItem& item, size_t index) {} + virtual void OnItemMoved(const SidebarItem& item, size_t from, size_t to) {} + virtual void OnWillRemoveItem(const SidebarItem& item, size_t index) {} + virtual void OnItemRemoved(const SidebarItem& item, size_t index) {} virtual void OnItemUpdated(const SidebarItem& item, const SidebarItemUpdate& update) {} virtual void OnShowSidebarOptionChanged(ShowSidebarOption option) {} @@ -81,7 +81,7 @@ class SidebarService : public KeyedService { void AddItem(const SidebarItem& item); void RemoveItemAt(int index); - void MoveItem(int from, int to); + void MoveItem(size_t from, size_t to); // Only non-builtin type is editable. // URL acts like an id for each item. @@ -98,7 +98,7 @@ class SidebarService : public KeyedService { void SetSidebarShowOption(ShowSidebarOption show_options); absl::optional GetDefaultPanelItem() const; - bool IsEditableItemAt(int index) const; + bool IsEditableItemAt(size_t index) const; SidebarService(const SidebarService&) = delete; SidebarService& operator=(const SidebarService&) = delete; diff --git a/components/sidebar/sidebar_service_unittest.cc b/components/sidebar/sidebar_service_unittest.cc index 56d17791ce35..5db893f83859 100644 --- a/components/sidebar/sidebar_service_unittest.cc +++ b/components/sidebar/sidebar_service_unittest.cc @@ -18,6 +18,8 @@ #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" +using ::testing::Eq; +using ::testing::Optional; using version_info::Channel; namespace sidebar { @@ -29,15 +31,15 @@ class MockSidebarServiceObserver : public SidebarService::Observer { MOCK_METHOD(void, OnItemAdded, - (const SidebarItem& item, int index), + (const SidebarItem& item, size_t index), (override)); MOCK_METHOD(void, OnWillRemoveItem, - (const SidebarItem& item, int index), + (const SidebarItem& item, size_t index), (override)); MOCK_METHOD(void, OnItemRemoved, - (const SidebarItem& item, int index), + (const SidebarItem& item, size_t index), (override)); MOCK_METHOD(void, OnItemUpdated, @@ -45,7 +47,7 @@ class MockSidebarServiceObserver : public SidebarService::Observer { (override)); MOCK_METHOD(void, OnItemMoved, - (const SidebarItem& item, int from, int to), + (const SidebarItem& item, size_t from, size_t to), (override)); }; diff --git a/components/site_settings_strings.grdp b/components/site_settings_strings.grdp index 6ccf19bf3224..ba952ddfbd65 100644 --- a/components/site_settings_strings.grdp +++ b/components/site_settings_strings.grdp @@ -212,11 +212,11 @@ zoom levels - - Window placement + + Window management - - window placement + + window management diff --git a/components/skus/common/features.h b/components/skus/common/features.h index 3937676a5b45..b949b04eb5ff 100644 --- a/components/skus/common/features.h +++ b/components/skus/common/features.h @@ -6,9 +6,7 @@ #ifndef BRAVE_COMPONENTS_SKUS_COMMON_FEATURES_H_ #define BRAVE_COMPONENTS_SKUS_COMMON_FEATURES_H_ -namespace base { -struct Feature; -} // namespace base +#include "base/feature_list.h" namespace skus { namespace features { diff --git a/components/sync/driver/BUILD.gn b/components/sync/driver/BUILD.gn index e4044dacc533..ad224e79c731 100644 --- a/components/sync/driver/BUILD.gn +++ b/components/sync/driver/BUILD.gn @@ -26,9 +26,8 @@ source_set("unit_tests") { "//components/os_crypt:test_support", "//components/prefs:prefs", "//components/signin/public/identity_manager:test_support", - "//components/sync:test_support_engine", + "//components/sync:test_support", "//components/sync/driver:driver", - "//components/sync/driver:test_support", "//components/sync/engine", "//content/test:test_support", "//services/network:test_support", diff --git a/components/sync/driver/brave_sync_service_impl_unittest.cc b/components/sync/driver/brave_sync_service_impl_unittest.cc index c550a95a4cf6..78912ce38dd1 100644 --- a/components/sync/driver/brave_sync_service_impl_unittest.cc +++ b/components/sync/driver/brave_sync_service_impl_unittest.cc @@ -20,8 +20,8 @@ #include "components/sync/driver/sync_service_impl_bundle.h" #include "components/sync/engine/nigori/key_derivation_params.h" #include "components/sync/engine/nigori/nigori.h" -#include "components/sync/test/engine/fake_sync_engine.h" -#include "components/sync/test/engine/fake_sync_manager.h" +#include "components/sync/test/fake_sync_engine.h" +#include "components/sync/test/fake_sync_manager.h" #include "content/public/test/browser_task_environment.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/components/sync/engine/BUILD.gn b/components/sync/engine/BUILD.gn index b629b113ee9d..ccea127996ed 100644 --- a/components/sync/engine/BUILD.gn +++ b/components/sync/engine/BUILD.gn @@ -13,7 +13,7 @@ source_set("unit_tests") { "//base", "//base/test:test_support", "//components/sync:sync", - "//components/sync:test_support_engine", + "//components/sync:test_support", "//testing/gmock", "//testing/gtest", "//third_party/protobuf:protobuf_lite", diff --git a/components/sync/engine/brave_model_type_worker_unittest.cc b/components/sync/engine/brave_model_type_worker_unittest.cc index ea7131cd59b9..ebfa1b7fc96b 100644 --- a/components/sync/engine/brave_model_type_worker_unittest.cc +++ b/components/sync/engine/brave_model_type_worker_unittest.cc @@ -14,9 +14,9 @@ #include "components/sync/engine/cancelation_signal.h" #include "components/sync/nigori/cryptographer_impl.h" #include "components/sync/protocol/sync.pb.h" -#include "components/sync/test/engine/fake_cryptographer.h" -#include "components/sync/test/engine/mock_model_type_processor.h" -#include "components/sync/test/engine/mock_nudge_handler.h" +#include "components/sync/test/fake_cryptographer.h" +#include "components/sync/test/mock_model_type_processor.h" +#include "components/sync/test/mock_nudge_handler.h" #include "testing/gtest/include/gtest/gtest.h" using base::subtle::ScopedTimeClockOverrides; diff --git a/components/translate_strings.grdp b/components/translate_strings.grdp index 966aa2712ba1..3bff66d7495c 100644 --- a/components/translate_strings.grdp +++ b/components/translate_strings.grdp @@ -99,6 +99,9 @@ Translate page? + + Translating page + Page translated @@ -114,6 +117,12 @@ Never translate pages in $1French + + Pages in $1French will be translated to $2English from now on + + + Pages in $1French will not be translated + diff --git a/content/browser/webui/brave_shared_resources_data_source.cc b/content/browser/webui/brave_shared_resources_data_source.cc index fc1d8441867f..d6c5edb5bade 100644 --- a/content/browser/webui/brave_shared_resources_data_source.cc +++ b/content/browser/webui/brave_shared_resources_data_source.cc @@ -110,8 +110,8 @@ bool BraveSharedResourcesDataSource::AllowCaching() { return true; } -std::string BraveSharedResourcesDataSource::GetMimeType( - const std::string& path) { +std::string BraveSharedResourcesDataSource::GetMimeType(const GURL& url) { + const std::string path = URLDataSource::URLToRequestPath(url); if (path.empty()) return "text/html"; diff --git a/content/browser/webui/brave_shared_resources_data_source.h b/content/browser/webui/brave_shared_resources_data_source.h index 0dd98903a04c..9defa180fbbb 100644 --- a/content/browser/webui/brave_shared_resources_data_source.h +++ b/content/browser/webui/brave_shared_resources_data_source.h @@ -31,7 +31,7 @@ class BraveSharedResourcesDataSource : public content::URLDataSource { const content::WebContents::Getter& wc_getter, content::URLDataSource::GotDataCallback callback) override; bool AllowCaching() override; - std::string GetMimeType(const std::string& path) override; + std::string GetMimeType(const GURL& url) override; bool ShouldServeMimeTypeAsContentTypeHeader() override; std::string GetAccessControlAllowOriginForOrigin( const std::string& origin) override; diff --git a/ios/browser/api/bookmarks/brave_bookmarks_api.mm b/ios/browser/api/bookmarks/brave_bookmarks_api.mm index 47839c2df386..1af05fac35a2 100644 --- a/ios/browser/api/bookmarks/brave_bookmarks_api.mm +++ b/ios/browser/api/bookmarks/brave_bookmarks_api.mm @@ -9,6 +9,7 @@ #include "base/containers/adapters.h" #include "base/containers/stack.h" #include "base/guid.h" +#include "base/numerics/safe_conversions.h" #include "base/strings/sys_string_conversions.h" #include "base/task/sequenced_task_runner.h" #include "base/task/thread_pool.h" @@ -428,7 +429,11 @@ - (void)moveToParent:(IOSBookmarkNode*)parent index:(NSUInteger)index { - (NSInteger)indexOfChild:(IOSBookmarkNode*)child { DCHECK(node_); - return node_->GetIndexOf(child->node_); + auto index = node_->GetIndexOf(child->node_); + if (!index) + return NSNotFound; + + return base::checked_cast(*index); } - (bool)hasAncestor:(IOSBookmarkNode*)parent { diff --git a/ios/browser/api/certificate/utils/brave_certificate_x509_utils.cc b/ios/browser/api/certificate/utils/brave_certificate_x509_utils.cc index 5f7ca46b7880..b5472ebc4ee0 100644 --- a/ios/browser/api/certificate/utils/brave_certificate_x509_utils.cc +++ b/ios/browser/api/certificate/utils/brave_certificate_x509_utils.cc @@ -281,34 +281,55 @@ std::string NIDToAbsoluteOID(const net::der::Input& input) { std::string SignatureAlgorithmDigestToName( const net::SignatureAlgorithm& signature_algorithm) { - switch (signature_algorithm.digest()) { - case net::DigestAlgorithm::Md2: + switch (signature_algorithm) { + case net::SignatureAlgorithm::kRsaPkcs1Md2: return "MD2"; - case net::DigestAlgorithm::Md4: + case net::SignatureAlgorithm::kRsaPkcs1Md4: return "MD4"; - case net::DigestAlgorithm::Md5: + case net::SignatureAlgorithm::kRsaPkcs1Md5: return "MD5"; - case net::DigestAlgorithm::Sha1: + case net::SignatureAlgorithm::kEcdsaSha1: + case net::SignatureAlgorithm::kRsaPkcs1Sha1: + case net::SignatureAlgorithm::kDsaSha1: return "SHA-1"; - case net::DigestAlgorithm::Sha256: + case net::SignatureAlgorithm::kRsaPkcs1Sha256: + case net::SignatureAlgorithm::kEcdsaSha256: + case net::SignatureAlgorithm::kRsaPssSha256: + case net::SignatureAlgorithm::kDsaSha256: return "SHA-256"; - case net::DigestAlgorithm::Sha384: + case net::SignatureAlgorithm::kRsaPkcs1Sha384: + case net::SignatureAlgorithm::kEcdsaSha384: + case net::SignatureAlgorithm::kRsaPssSha384: return "SHA-384"; - case net::DigestAlgorithm::Sha512: + case net::SignatureAlgorithm::kRsaPkcs1Sha512: + case net::SignatureAlgorithm::kEcdsaSha512: + case net::SignatureAlgorithm::kRsaPssSha512: return "SHA-512"; } } std::string SignatureAlgorithmIdToName( const net::SignatureAlgorithm& signature_algorithm) { - switch (signature_algorithm.algorithm()) { - case net::SignatureAlgorithmId::RsaPkcs1: + switch (signature_algorithm) { + case net::SignatureAlgorithm::kRsaPkcs1Md2: + case net::SignatureAlgorithm::kRsaPkcs1Md4: + case net::SignatureAlgorithm::kRsaPkcs1Md5: + case net::SignatureAlgorithm::kRsaPkcs1Sha1: + case net::SignatureAlgorithm::kRsaPkcs1Sha256: + case net::SignatureAlgorithm::kRsaPkcs1Sha384: + case net::SignatureAlgorithm::kRsaPkcs1Sha512: return "RSA"; - case net::SignatureAlgorithmId::RsaPss: + case net::SignatureAlgorithm::kRsaPssSha256: + case net::SignatureAlgorithm::kRsaPssSha384: + case net::SignatureAlgorithm::kRsaPssSha512: return "RSA-PSS"; - case net::SignatureAlgorithmId::Ecdsa: + case net::SignatureAlgorithm::kEcdsaSha1: + case net::SignatureAlgorithm::kEcdsaSha256: + case net::SignatureAlgorithm::kEcdsaSha384: + case net::SignatureAlgorithm::kEcdsaSha512: return "ECDSA"; - case net::SignatureAlgorithmId::Dsa: + case net::SignatureAlgorithm::kDsaSha1: + case net::SignatureAlgorithm::kDsaSha256: return "DSA"; } } diff --git a/ios/browser/api/history/brave_history_api.mm b/ios/browser/api/history/brave_history_api.mm index d3eebb6548db..f7c552c65711 100644 --- a/ios/browser/api/history/brave_history_api.mm +++ b/ios/browser/api/history/brave_history_api.mm @@ -130,7 +130,6 @@ - (void)addHistory:(IOSHistoryNode*)history isURLTyped:(BOOL)isURLTyped { DCHECK(history_service_->backend_loaded()); // Important! Only Typed URL is being synced in core side - // Disable Floc - Not allow tracking!! history::HistoryAddPageArgs args = history::HistoryAddPageArgs( /*url*/ net::GURLWithNSURL(history.url), /*time*/ base::Time::FromNSDate(history.dateAdded), @@ -141,8 +140,9 @@ - (void)addHistory:(IOSHistoryNode*)history isURLTyped:(BOOL)isURLTyped { isURLTyped ? ui::PAGE_TRANSITION_TYPED : ui::PAGE_TRANSITION_LINK, /*hidden=*/false, /*visit_source*/ history::VisitSource::SOURCE_BROWSED, /*did_replace_entry=*/false, /*consider_for_ntp_most_visited=*/true, - /*floc_allowed=*/false, - /*title*/ base::SysNSStringToUTF16(history.title)); + /*title*/ base::SysNSStringToUTF16(history.title), + /*opener*/ absl::nullopt, + /*bookmark_id*/ absl::nullopt); history_service_->AddPage(args); } diff --git a/ios/browser/api/history/history_service_listener_ios.h b/ios/browser/api/history/history_service_listener_ios.h index f2cef39262a4..d7700c7d2762 100644 --- a/ios/browser/api/history/history_service_listener_ios.h +++ b/ios/browser/api/history/history_service_listener_ios.h @@ -28,10 +28,9 @@ class HistoryServiceListenerIOS : public history::HistoryServiceObserver { // HistoryServiceObserver implementation. void OnHistoryServiceLoaded(history::HistoryService* service) override; void HistoryServiceBeingDeleted(history::HistoryService* service) override; - void OnURLVisited(history::HistoryService* service, - ui::PageTransition transition, - const history::URLRow& row, - base::Time visit_time) override; + void OnURLVisited(history::HistoryService* history_service, + const history::URLRow& url_row, + const history::VisitRow& new_visit) override; void OnURLsModified(history::HistoryService* history_service, const history::URLRows& changed_urls) override; void OnURLsDeleted(history::HistoryService* history_service, diff --git a/ios/browser/api/history/history_service_listener_ios.mm b/ios/browser/api/history/history_service_listener_ios.mm index 730276c50660..117c47282eb7 100644 --- a/ios/browser/api/history/history_service_listener_ios.mm +++ b/ios/browser/api/history/history_service_listener_ios.mm @@ -56,14 +56,14 @@ - (instancetype)initWithURL:(NSURL*)url } } -void HistoryServiceListenerIOS::OnURLVisited(history::HistoryService* service, - ui::PageTransition transition, - const history::URLRow& row, - base::Time visit_time) { - IOSHistoryNode* historyNode = - [[IOSHistoryNode alloc] initWithURL:net::NSURLWithGURL(row.url()) - title:base::SysUTF16ToNSString(row.title()) - dateAdded:visit_time.ToNSDate()]; +void HistoryServiceListenerIOS::OnURLVisited( + history::HistoryService* history_service, + const history::URLRow& url_row, + const history::VisitRow& new_visit) { + IOSHistoryNode* historyNode = [[IOSHistoryNode alloc] + initWithURL:net::NSURLWithGURL(url_row.url()) + title:base::SysUTF16ToNSString(url_row.title()) + dateAdded:new_visit.visit_time.ToNSDate()]; if ([observer_ respondsToSelector:@selector(historyNodeVisited:)]) { [observer_ historyNodeVisited:historyNode]; diff --git a/ios/browser/api/sync/brave_sync_api.mm b/ios/browser/api/sync/brave_sync_api.mm index 55d2490af620..f12b836031bb 100644 --- a/ios/browser/api/sync/brave_sync_api.mm +++ b/ios/browser/api/sync/brave_sync_api.mm @@ -308,8 +308,9 @@ - (id)createSyncDeviceObserver:(void (^)())onDeviceInfoChanged { } - (id)createSyncServiceObserver:(void (^)())onSyncServiceStateChanged { - auto* service = SyncServiceFactory::GetAsSyncServiceImplForBrowserState( - _chromeBrowserState); + auto* service = + SyncServiceFactory::GetAsSyncServiceImplForBrowserStateForTesting( + _chromeBrowserState); return [[BraveSyncServiceObserver alloc] initWithSyncServiceImpl:service callback:onSyncServiceStateChanged]; diff --git a/ios/browser/providers/BUILD.gn b/ios/browser/providers/BUILD.gn index 03842f97fcd9..f56e75f1641c 100644 --- a/ios/browser/providers/BUILD.gn +++ b/ios/browser/providers/BUILD.gn @@ -17,6 +17,7 @@ group("brave_providers") { "//ios/chrome/browser/providers/branded_images:chromium_branded_images", "//ios/chrome/browser/providers/context_menu:chromium_context_menu", "//ios/chrome/browser/providers/discover_feed:chromium_discover_feed", + "//ios/chrome/browser/providers/follow:chromium_follow", "//ios/chrome/browser/providers/lens:chromium_lens", "//ios/chrome/browser/providers/mailto_handler:chromium_mailto_handler", "//ios/chrome/browser/providers/modals:chromium_modals", diff --git a/package.json b/package.json index 7efc3d5f7511..6a3efe8c8b7e 100644 --- a/package.json +++ b/package.json @@ -258,7 +258,7 @@ "projects": { "chrome": { "dir": "src", - "tag": "105.0.5195.136", + "tag": "106.0.5249.40", "repository": { "url": "https://github.com/chromium/chromium" } diff --git a/patches/PRESUBMIT.py.patch b/patches/PRESUBMIT.py.patch index 227e74145d76..0cd82da690ce 100644 --- a/patches/PRESUBMIT.py.patch +++ b/patches/PRESUBMIT.py.patch @@ -1,8 +1,8 @@ diff --git a/PRESUBMIT.py b/PRESUBMIT.py -index 8663125b048a4222f1a024ee0b50e4d6c059cfb0..4388ea7cd43614dc55a88feb3154ffcdb3113aef 100644 +index 22a6de9ec138e8ce2257aaadcffc4aa03e89b7de..7ebb8654da0989a5af20063c1f28ac451f4de0ac 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py -@@ -6095,3 +6095,4 @@ Robolectric tests do not need a @Batch or @DoNotBatch annotations. +@@ -6169,3 +6169,4 @@ Robolectric tests do not need a @Batch or @DoNotBatch annotations. """, extra_annotation_errors)) return results diff --git a/patches/base-BUILD.gn.patch b/patches/base-BUILD.gn.patch index ce1705301072..d456904f226e 100644 --- a/patches/base-BUILD.gn.patch +++ b/patches/base-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/base/BUILD.gn b/base/BUILD.gn -index 9fc667eaa2bcfe32058a2f8eabaf2f137e410284..c4d1485154e6beb7c6dbaecc9ef24db8e679a387 100644 +index fb175ca07c9907f4f41bfa2db852227502aa9b62..47e79f35276a12de53802f79b2c19087a32eeba2 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn -@@ -4237,6 +4237,7 @@ if (is_android) { +@@ -4288,6 +4288,7 @@ if (is_android) { "android/java/src/org/chromium/base/task/TaskTraits.java", "android/java/src/org/chromium/base/task/TaskTraitsExtensionDescriptor.java", ] diff --git a/patches/base-feature_list.cc.patch b/patches/base-feature_list.cc.patch deleted file mode 100644 index 20bef88da762..000000000000 --- a/patches/base-feature_list.cc.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/base/feature_list.cc b/base/feature_list.cc -index 9d3b35939d17eb6472a2b2fa6007bda5b73adba2..ce040a25351bad901ed8a6b061ae39635e2b945c 100644 ---- a/base/feature_list.cc -+++ b/base/feature_list.cc -@@ -8,7 +8,7 @@ - // time. Try not to raise this limit unless necessary. See - // https://chromium.googlesource.com/chromium/src/+/HEAD/docs/wmax_tokens.md - #ifndef NACL_TC_REV --#pragma clang max_tokens_here 600000 -+#pragma clang max_tokens_here 610000 - #endif - - #include diff --git a/patches/base-threading-thread_restrictions.h.patch b/patches/base-threading-thread_restrictions.h.patch index 3a8abb97b245..7b0e4d936e18 100644 --- a/patches/base-threading-thread_restrictions.h.patch +++ b/patches/base-threading-thread_restrictions.h.patch @@ -1,5 +1,5 @@ diff --git a/base/threading/thread_restrictions.h b/base/threading/thread_restrictions.h -index 5455aa07547f753b83dd59c173834034d0673ae7..96b6c3c0df91e6827c49c907fb65ed2c820b91d2 100644 +index b5f91fe46d23b4305a3f3aa1ab383d4fe8cb6989..53b303f088a8d2e4c28d2ea9f095cac2a0da41c1 100644 --- a/base/threading/thread_restrictions.h +++ b/base/threading/thread_restrictions.h @@ -550,6 +550,7 @@ class BASE_EXPORT ScopedAllowBaseSyncPrimitives { diff --git a/patches/base-trace_event-builtin_categories.h.patch b/patches/base-trace_event-builtin_categories.h.patch index 7742078749cc..4ee8fe05a091 100644 --- a/patches/base-trace_event-builtin_categories.h.patch +++ b/patches/base-trace_event-builtin_categories.h.patch @@ -1,8 +1,8 @@ diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h -index a1a93418b0b0d56f92647aa1087bb4485c354201..77e8b0773c597d38dd885d9bdcc78af077f7294c 100644 +index be712614ac5be3573427247d7032432f18e47a15..f7ac3142142ce25c4b6e04158d9ff22eca22d871 100644 --- a/base/trace_event/builtin_categories.h +++ b/base/trace_event/builtin_categories.h -@@ -178,6 +178,7 @@ +@@ -180,6 +180,7 @@ X("WebCore") \ X("webrtc") \ X("xr") \ diff --git a/patches/build-android-gyp-dex.py.patch b/patches/build-android-gyp-dex.py.patch index 26b4214b0e97..45665b9c7f51 100644 --- a/patches/build-android-gyp-dex.py.patch +++ b/patches/build-android-gyp-dex.py.patch @@ -1,8 +1,8 @@ diff --git a/build/android/gyp/dex.py b/build/android/gyp/dex.py -index 89bacb26957304b71ee8ba90e1ae1d786f220aa0..a1300fb4c629395d9e10cf60d3e9ae61c918d1b7 100755 +index 6cee06f72276a070425af3326c345826552f83d0..21cec877fdafdfe309e459f27efb53aaeb7b707a 100755 --- a/build/android/gyp/dex.py +++ b/build/android/gyp/dex.py -@@ -55,7 +55,7 @@ _IGNORE_WARNINGS = ( +@@ -53,7 +53,7 @@ _IGNORE_WARNINGS = ( _SKIPPED_CLASS_FILE_NAMES = ( 'module-info.class', # Explicitly skipped by r8/utils/FileUtils#isClassFile ) diff --git a/patches/build-config-android-config.gni.patch b/patches/build-config-android-config.gni.patch index fecdd42416fd..87f37231ae39 100644 --- a/patches/build-config-android-config.gni.patch +++ b/patches/build-config-android-config.gni.patch @@ -1,5 +1,5 @@ diff --git a/build/config/android/config.gni b/build/config/android/config.gni -index fb856a31e344653a97abdff2bc2ae844941f769d..0b8c95a17a22a97fabd2da59d18b6029dec95fa8 100644 +index 692a3af0b17df98d83067699ba29c8a2b528c223..938587749b4d4d827515f3cada153b805c3e8792 100644 --- a/build/config/android/config.gni +++ b/build/config/android/config.gni @@ -8,6 +8,7 @@ diff --git a/patches/build-config-android-internal_rules.gni.patch b/patches/build-config-android-internal_rules.gni.patch index 2f4ea46931e3..25e2a38a0f93 100644 --- a/patches/build-config-android-internal_rules.gni.patch +++ b/patches/build-config-android-internal_rules.gni.patch @@ -1,12 +1,12 @@ diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni -index 12be71c2d83e78c70b851ed1e499b3ed9280a8cd..55433ef1369f795520a1a85c09515338ca9d1810 100644 +index 1eb1e4d36169971c93f747193785e8ce1e61048c..8d60990d6e4683fdc2a5ea4e6eec34f2498ae869 100644 --- a/build/config/android/internal_rules.gni +++ b/build/config/android/internal_rules.gni -@@ -3892,6 +3892,7 @@ if (enable_java_templates) { +@@ -3894,6 +3894,7 @@ if (enable_java_templates) { } else { not_needed(invoker, [ "missing_classes_allowlist" ]) } + foreach(bytecode_jar, brave_bytecode_jars) { if (rebase_path(_unprocessed_jar_path, root_build_dir) == bytecode_jar) { _bytecode_rewriter_output_jar = "$target_out_dir/$target_name.bytecode-rewritten.jar" brave_bytecode_rewriter("${target_name}__bytecode_rewrite") { build_config = _build_config } _unprocessed_jar_deps = [] _unprocessed_jar_deps = [ ":${target_name}__bytecode_rewrite" ] _unprocessed_jar_path = _bytecode_rewriter_output_jar } } if (_build_host_jar) { - _process_host_jar_target_name = "${target_name}__process_host" + _process_host_jar_target_name = "${target_name}__host" diff --git a/patches/build-config-android-rules.gni.patch b/patches/build-config-android-rules.gni.patch index 7a65c0a6454a..dc97ab798abc 100644 --- a/patches/build-config-android-rules.gni.patch +++ b/patches/build-config-android-rules.gni.patch @@ -1,8 +1,8 @@ diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni -index 15d9977580d3ae93c68be50984f533cf03553ebc..53c1cc256c1846fe9b43815fe5bd78cb40fe9c5b 100644 +index ef8ac01a6b23626a62a91e53698fa2d0a4d6ef11..e15dcafbce2fade71fb1f0d350b2194f2fa4a8cf 100644 --- a/build/config/android/rules.gni +++ b/build/config/android/rules.gni -@@ -500,6 +500,7 @@ if (enable_java_templates) { +@@ -508,6 +508,7 @@ if (enable_java_templates) { # ] # } template("java_cpp_enum") { @@ -10,7 +10,7 @@ index 15d9977580d3ae93c68be50984f533cf03553ebc..53c1cc256c1846fe9b43815fe5bd78cb action_with_pydeps(target_name) { forward_variables_from(invoker, TESTONLY_AND_VISIBILITY + [ "sources" ]) -@@ -671,6 +672,7 @@ if (enable_java_templates) { +@@ -679,6 +680,7 @@ if (enable_java_templates) { # output = "$target_gen_dir/AndroidManifest.xml" # } template("jinja_template") { diff --git a/patches/chrome-BUILD.gn.patch b/patches/chrome-BUILD.gn.patch index 71fdec0b5d91..641d80ba073f 100644 --- a/patches/chrome-BUILD.gn.patch +++ b/patches/chrome-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn -index 7804140cb03f5bfb23a07bcfbbaea3a5ea156ed9..2972dcec8152392b09213b8e56671f30bc304f27 100644 +index aee9abd99a03ad2266e2fcd15c680ae3b97e9dc3..4ec6ad9962225370ea7fd3366b6a86977c63c129 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -189,6 +189,7 @@ if (!is_android && !is_mac) { +@@ -175,6 +175,7 @@ if (!is_android && !is_mac) { "common/crash_keys.cc", "common/crash_keys.h", ] @@ -10,7 +10,7 @@ index 7804140cb03f5bfb23a07bcfbbaea3a5ea156ed9..2972dcec8152392b09213b8e56671f30 deps += [ ":chrome_dll", -@@ -487,11 +488,12 @@ if (is_win) { +@@ -473,11 +474,12 @@ if (is_win) { args += [ "--privileged_helper_id=$privileged_helper_name" ] } } @@ -24,7 +24,7 @@ index 7804140cb03f5bfb23a07bcfbbaea3a5ea156ed9..2972dcec8152392b09213b8e56671f30 extra_substitutions = [ "CHROMIUM_BUNDLE_ID=$chrome_mac_bundle_id", "CHROMIUM_SHORT_NAME=$chrome_product_short_name", -@@ -511,6 +513,7 @@ if (is_win) { +@@ -497,6 +499,7 @@ if (is_win) { "//chrome/common:buildflags", "//chrome/common:version_header", ] @@ -32,7 +32,7 @@ index 7804140cb03f5bfb23a07bcfbbaea3a5ea156ed9..2972dcec8152392b09213b8e56671f30 if (enable_stripping) { # At link time, preserve the global symbols specified in the .exports -@@ -587,7 +590,7 @@ if (is_win) { +@@ -573,7 +576,7 @@ if (is_win) { args = [ "-b", @@ -41,7 +41,7 @@ index 7804140cb03f5bfb23a07bcfbbaea3a5ea156ed9..2972dcec8152392b09213b8e56671f30 "-v", chrome_version_full, "-g", -@@ -661,6 +664,7 @@ if (is_win) { +@@ -647,6 +650,7 @@ if (is_win) { # this dependency directly copies the file into the framework's # resources directory. public_deps += [ ":chrome_framework_widevine_signature" ] @@ -49,7 +49,7 @@ index 7804140cb03f5bfb23a07bcfbbaea3a5ea156ed9..2972dcec8152392b09213b8e56671f30 } } -@@ -704,9 +708,11 @@ if (is_win) { +@@ -690,9 +694,11 @@ if (is_win) { "--scm=0", ] } @@ -61,7 +61,7 @@ index 7804140cb03f5bfb23a07bcfbbaea3a5ea156ed9..2972dcec8152392b09213b8e56671f30 if (is_chrome_branded) { # These entitlements are bound to the official Google Chrome signing # certificate and will not necessarily work in any other build. -@@ -731,6 +737,7 @@ if (is_win) { +@@ -717,6 +723,7 @@ if (is_win) { info_plist_target = invoker.info_plist_target } else { info_plist_target = ":chrome_helper_plist" @@ -69,7 +69,7 @@ index 7804140cb03f5bfb23a07bcfbbaea3a5ea156ed9..2972dcec8152392b09213b8e56671f30 } extra_substitutions = [ -@@ -1218,6 +1225,7 @@ if (is_win) { +@@ -1204,6 +1211,7 @@ if (is_win) { chrome_dylib_version, "-Wl,-order_file," + rebase_path("app/framework.order", root_build_dir), ] @@ -77,7 +77,7 @@ index 7804140cb03f5bfb23a07bcfbbaea3a5ea156ed9..2972dcec8152392b09213b8e56671f30 if (!is_component_build) { # Specify a sensible install_name for static builds. The library is -@@ -1396,6 +1404,7 @@ if (is_win) { +@@ -1382,6 +1390,7 @@ if (is_win) { group("dependencies") { public_deps = [ @@ -85,7 +85,7 @@ index 7804140cb03f5bfb23a07bcfbbaea3a5ea156ed9..2972dcec8152392b09213b8e56671f30 "//build:branding_buildflags", "//build:chromeos_buildflags", "//chrome/browser", -@@ -1467,7 +1476,7 @@ group("dependencies") { +@@ -1453,7 +1462,7 @@ group("dependencies") { if (is_win) { process_version_rc_template("chrome_exe_version") { @@ -94,7 +94,7 @@ index 7804140cb03f5bfb23a07bcfbbaea3a5ea156ed9..2972dcec8152392b09213b8e56671f30 output = "$target_gen_dir/chrome_exe_version.rc" } -@@ -1521,6 +1530,7 @@ group("resources") { +@@ -1507,6 +1516,7 @@ group("resources") { "//chrome/browser:resources", "//chrome/common:resources", "//chrome/renderer:resources", diff --git a/patches/chrome-VERSION.patch b/patches/chrome-VERSION.patch index 6e19b26d55dc..678a2cc87549 100644 --- a/patches/chrome-VERSION.patch +++ b/patches/chrome-VERSION.patch @@ -1,12 +1,12 @@ diff --git a/chrome/VERSION b/chrome/VERSION -index b40d000557c5312103268c67aebfceb96b22c811..f878fdcfef5292bfd3968e626c4765ae66d39596 100644 +index 49d93aece3335bf364a22d0103692a5b50126c36..e3e5570ec50483522f0d7569d2c8ccb64b7bf837 100644 --- a/chrome/VERSION +++ b/chrome/VERSION @@ -1,4 +1,4 @@ - MAJOR=105 + MAJOR=106 -MINOR=0 --BUILD=5195 --PATCH=136 +-BUILD=5249 +-PATCH=40 +MINOR=1 +BUILD=45 -+PATCH=53 ++PATCH=49 diff --git a/patches/chrome-android-BUILD.gn.patch b/patches/chrome-android-BUILD.gn.patch index 69073dcd27e8..902fccd6f1fa 100644 --- a/patches/chrome-android-BUILD.gn.patch +++ b/patches/chrome-android-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn -index d1a428ed980503d9d2dbf170dde14cc577d484c2..35c6ef6e60619bc276df62a35133a25fcab8ea56 100644 +index 929b1f5742d52294fb0dfa03601662744911d036..b6dbf051424fae3541b5a17b977d293fef3f6df5 100644 --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn -@@ -197,6 +197,7 @@ android_resources("chrome_base_module_resources") { +@@ -207,6 +207,7 @@ android_resources("chrome_base_module_resources") { "java/res_chromium_base/mipmap-xxxhdpi/layered_app_icon_background.png", "java/res_chromium_base/values/channel_constants.xml", ] @@ -10,7 +10,7 @@ index d1a428ed980503d9d2dbf170dde14cc577d484c2..35c6ef6e60619bc276df62a35133a25f } android_resources("chrome_app_java_resources") { -@@ -272,6 +273,7 @@ android_resources("chrome_app_java_resources") { +@@ -282,6 +283,7 @@ android_resources("chrome_app_java_resources") { "//third_party/androidx:androidx_gridlayout_gridlayout_java", "//third_party/androidx:androidx_preference_preference_java", ] @@ -18,7 +18,7 @@ index d1a428ed980503d9d2dbf170dde14cc577d484c2..35c6ef6e60619bc276df62a35133a25f } if (enable_vr) { -@@ -667,6 +669,7 @@ android_library("chrome_java") { +@@ -676,6 +678,7 @@ android_library("chrome_java") { ] deps += feed_deps @@ -26,7 +26,7 @@ index d1a428ed980503d9d2dbf170dde14cc577d484c2..35c6ef6e60619bc276df62a35133a25f srcjar_deps = [ ":autofill_verification_status_generated_enum", -@@ -694,6 +697,7 @@ android_library("chrome_java") { +@@ -703,6 +706,7 @@ android_library("chrome_java") { "//components/offline_pages/core:offline_page_model_enums_java", "//net:effective_connection_type_java", ] @@ -34,7 +34,7 @@ index d1a428ed980503d9d2dbf170dde14cc577d484c2..35c6ef6e60619bc276df62a35133a25f # From java_sources.gni. sources = chrome_java_sources + [ app_hooks_impl ] -@@ -832,6 +836,7 @@ java_group("chrome_all_java") { +@@ -841,6 +845,7 @@ java_group("chrome_all_java") { "//chrome/android/features/tab_ui:module_desc_java", ] } @@ -42,7 +42,7 @@ index d1a428ed980503d9d2dbf170dde14cc577d484c2..35c6ef6e60619bc276df62a35133a25f } # This is a list of all base module jni headers. New features should add their -@@ -881,6 +886,7 @@ group("jni_headers") { +@@ -890,6 +895,7 @@ group("jni_headers") { "//components/ukm/android:jni_headers", "//components/webauthn/android:jni_headers", ] @@ -50,7 +50,7 @@ index d1a428ed980503d9d2dbf170dde14cc577d484c2..35c6ef6e60619bc276df62a35133a25f } action_with_pydeps("chrome_android_java_google_api_keys_srcjar") { -@@ -2074,6 +2080,7 @@ android_resources("chrome_public_apk_base_module_resources") { +@@ -2090,6 +2096,7 @@ android_resources("chrome_public_apk_base_module_resources") { "java/res_chromium_base/mipmap-xxxhdpi/layered_app_icon_background.png", "java/res_chromium_base/values/channel_constants.xml", ] @@ -58,7 +58,7 @@ index d1a428ed980503d9d2dbf170dde14cc577d484c2..35c6ef6e60619bc276df62a35133a25f # Dep needed to ensure override works properly. deps = [ ":chrome_base_module_resources" ] -@@ -2393,6 +2400,7 @@ if (current_toolchain == default_toolchain) { +@@ -2410,6 +2417,7 @@ if (current_toolchain == default_toolchain) { ":${_variant}_locale_pak_assets", ":${_variant}_paks", ] @@ -66,7 +66,7 @@ index d1a428ed980503d9d2dbf170dde14cc577d484c2..35c6ef6e60619bc276df62a35133a25f if (_is_monochrome) { deps += [ "//android_webview:locale_pak_assets" ] if (webview_includes_weblayer && !_is_bundle_module) { -@@ -2668,6 +2676,7 @@ template("chrome_public_apk_or_module_tmpl") { +@@ -2685,6 +2693,7 @@ template("chrome_public_apk_or_module_tmpl") { load_library_from_apk = chromium_linker_supported version_name = chrome_version_name @@ -74,7 +74,7 @@ index d1a428ed980503d9d2dbf170dde14cc577d484c2..35c6ef6e60619bc276df62a35133a25f } } -@@ -2811,6 +2820,7 @@ android_library("base_module_java") { +@@ -2828,6 +2837,7 @@ android_library("base_module_java") { "//components/payments/content/android:service_java", "//third_party/androidx:androidx_browser_browser_java", ] @@ -82,7 +82,7 @@ index d1a428ed980503d9d2dbf170dde14cc577d484c2..35c6ef6e60619bc276df62a35133a25f # More deps for DFMs. if (dfmify_dev_ui) { -@@ -2967,6 +2977,7 @@ template("monochrome_public_apk_or_module_tmpl") { +@@ -2984,6 +2994,7 @@ template("monochrome_public_apk_or_module_tmpl") { deps += [ "//weblayer/browser/java:upstream_java" ] } } diff --git a/patches/chrome-android-chrome_java_sources.gni.patch b/patches/chrome-android-chrome_java_sources.gni.patch index a6ae5875d05a..3fadad74a0de 100644 --- a/patches/chrome-android-chrome_java_sources.gni.patch +++ b/patches/chrome-android-chrome_java_sources.gni.patch @@ -1,8 +1,8 @@ diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni -index 8631d3871c94aab771e9b40b9870a84a0b82ea6c..dd477f8af52735248ccefaaf5a5029cf261fe897 100644 +index ef7662c465e3b4648e37a5c8be8c76fb5d300744..2e3a0964c4b17abe2e1e0298b029657e8df5b38f 100644 --- a/chrome/android/chrome_java_sources.gni +++ b/chrome/android/chrome_java_sources.gni -@@ -1222,3 +1222,4 @@ chrome_java_sources = [ +@@ -1226,3 +1226,4 @@ chrome_java_sources = [ "java/src/org/chromium/chrome/browser/webauth/authenticator/CableAuthenticatorUSBActivity.java", "java/src/org/chromium/chrome/browser/webshare/ShareServiceImplementationFactory.java", ] diff --git a/patches/chrome-android-chrome_public_apk_tmpl.gni.patch b/patches/chrome-android-chrome_public_apk_tmpl.gni.patch index c268c62e20e4..37a3d8b470c3 100644 --- a/patches/chrome-android-chrome_public_apk_tmpl.gni.patch +++ b/patches/chrome-android-chrome_public_apk_tmpl.gni.patch @@ -1,8 +1,8 @@ diff --git a/chrome/android/chrome_public_apk_tmpl.gni b/chrome/android/chrome_public_apk_tmpl.gni -index bf289305713f8e6db146171c824d807195b5daf9..d2436821d95af736a8ffa05395ac7dc36826847d 100644 +index f55b7dd451f3d11e8e9e5dc92e5e05083fc7e013..a7034dfa3a9cd9284664d44f3d00f0d9951ff0b3 100644 --- a/chrome/android/chrome_public_apk_tmpl.gni +++ b/chrome/android/chrome_public_apk_tmpl.gni -@@ -181,6 +181,7 @@ template("chrome_public_common_apk_or_module_tmpl") { +@@ -180,6 +180,7 @@ template("chrome_public_common_apk_or_module_tmpl") { "*ic_file_download_white*", # Bottom edge seems misaligned. "*ic_lock.*", # Bottom edge seems misaligned. ] @@ -10,7 +10,7 @@ index bf289305713f8e6db146171c824d807195b5daf9..d2436821d95af736a8ffa05395ac7dc3 # Note most of these, with the exception of resource_exclusion_exceptions, # are currently duplicated in system_webview_apk_tmpl.gni. -@@ -290,6 +291,7 @@ template("chrome_public_common_apk_or_module_tmpl") { +@@ -289,6 +290,7 @@ template("chrome_public_common_apk_or_module_tmpl") { if (!defined(proguard_configs)) { proguard_configs = [] } diff --git a/patches/chrome-android-expectations-lint-suppressions.xml.patch b/patches/chrome-android-expectations-lint-suppressions.xml.patch index 74a7b1e070dd..b0325bc50283 100644 --- a/patches/chrome-android-expectations-lint-suppressions.xml.patch +++ b/patches/chrome-android-expectations-lint-suppressions.xml.patch @@ -1,8 +1,8 @@ diff --git a/chrome/android/expectations/lint-suppressions.xml b/chrome/android/expectations/lint-suppressions.xml -index 0c2056364da75820845fda223bb68dea32d6bb2a..223e0d5188d606177f706199f7a23bb74052c457 100644 +index e3ae052ab7dbff75ffde97165ff53dca63624a69..2812df65737d6b093010bb4e965daa38d9aa57c6 100644 --- a/chrome/android/expectations/lint-suppressions.xml +++ b/chrome/android/expectations/lint-suppressions.xml -@@ -299,4 +299,5 @@ https://chromium.googlesource.com/chromium/src/+/main/build/android/docs/lint.md +@@ -303,4 +303,5 @@ https://chromium.googlesource.com/chromium/src/+/main/build/android/docs/lint.md diff --git a/patches/chrome-android-java-AndroidManifest.xml.patch b/patches/chrome-android-java-AndroidManifest.xml.patch index e6ec745d8544..33909789104c 100644 --- a/patches/chrome-android-java-AndroidManifest.xml.patch +++ b/patches/chrome-android-java-AndroidManifest.xml.patch @@ -1,5 +1,5 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml -index 15c4f76eff3d71436d9f2af1f45d933068b75a3c..dcf473e5ce566aedc44b843492c604dd7ae66eee 100644 +index a3b0ac4f938183817cbd294d219c7294a4ff60e1..d36fd43f4ddea20bfe695277923f403e415f21c5 100644 --- a/chrome/android/java/AndroidManifest.xml +++ b/chrome/android/java/AndroidManifest.xml @@ -26,6 +26,7 @@ by a child template that "extends" this file. diff --git a/patches/chrome-android-java-res-layout-custom_tabs_toolbar.xml.patch b/patches/chrome-android-java-res-layout-custom_tabs_toolbar.xml.patch index 9adc006f9abb..33c2dd6878b2 100644 --- a/patches/chrome-android-java-res-layout-custom_tabs_toolbar.xml.patch +++ b/patches/chrome-android-java-res-layout-custom_tabs_toolbar.xml.patch @@ -1,8 +1,8 @@ diff --git a/chrome/android/java/res/layout/custom_tabs_toolbar.xml b/chrome/android/java/res/layout/custom_tabs_toolbar.xml -index 9d303cd0d4afd23847df7a418a0106f3ef6dd97c..a6f9a142a4932e376d68bfe82a2feb3ffc13bbef 100644 +index b86be08976a0777f832b007b20d95a868397b466..181e79d18982c2b1fb82f915708f594cfc790097 100644 --- a/chrome/android/java/res/layout/custom_tabs_toolbar.xml +++ b/chrome/android/java/res/layout/custom_tabs_toolbar.xml -@@ -84,7 +84,7 @@ +@@ -80,7 +80,7 @@ android:gravity="center_vertical" android:orientation="horizontal" /> diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-AppHooks.java.patch b/patches/chrome-android-java-src-org-chromium-chrome-browser-AppHooks.java.patch index afdd63b4f771..0ee83a023a98 100644 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-AppHooks.java.patch +++ b/patches/chrome-android-java-src-org-chromium-chrome-browser-AppHooks.java.patch @@ -1,8 +1,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/AppHooks.java b/chrome/android/java/src/org/chromium/chrome/browser/AppHooks.java -index 9706a1bf1a7d16b2efa05eb43ba2a8d1382207ae..371e6f32ac25dcb267fe3dabf73fb0fbc72bfc2f 100644 +index 4e63144f5499af8c1e960324840e73fe30f73872..cb9b6fd03b9d54d41533cde8cb444a4bbb1d546e 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/AppHooks.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/AppHooks.java -@@ -73,7 +73,7 @@ public abstract class AppHooks { +@@ -71,7 +71,7 @@ public abstract class AppHooks { @CalledByNative public static AppHooks get() { diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-app-ChromeActivity.java.patch b/patches/chrome-android-java-src-org-chromium-chrome-browser-app-ChromeActivity.java.patch index a5491dd23814..e62963fb0f7f 100644 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-app-ChromeActivity.java.patch +++ b/patches/chrome-android-java-src-org-chromium-chrome-browser-app-ChromeActivity.java.patch @@ -1,8 +1,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java -index 34fb55ab008df1831f9e6764a4b1085dd47015a6..13bb6086b390e1436879307e16ef34a14b577e12 100644 +index e14b5ac030e588ad91dec8551473c1b89eac184c..5fc1e4f3f706a005b653fa03a29fc23ecde88d0b 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java -@@ -402,7 +402,7 @@ public abstract class ChromeActivity +@@ -403,7 +403,7 @@ public abstract class ChromeActivity private StylusWritingCoordinator mStylusWritingCoordinator; protected ChromeActivity() { diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-document-ChromeLauncherActivity.java.patch b/patches/chrome-android-java-src-org-chromium-chrome-browser-document-ChromeLauncherActivity.java.patch index 9c1511e17aba..61f00d5b3b54 100644 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-document-ChromeLauncherActivity.java.patch +++ b/patches/chrome-android-java-src-org-chromium-chrome-browser-document-ChromeLauncherActivity.java.patch @@ -1,8 +1,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java -index 7ec8dadd1cd6eb65f4870317b00cae6a2421daf4..858e18ed9e4184efa9068eab88037b2e9fa48097 100644 +index 5b75069397ed9a6d8789183d51cabcc6fdb61ada..60cfb4861d00acd06cdd51638a984577da322f21 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java -@@ -19,7 +19,7 @@ import org.chromium.chrome.browser.vr.VrModuleProvider; +@@ -18,7 +18,7 @@ import org.chromium.chrome.browser.vr.VrModuleProvider; * Dispatches incoming intents to the appropriate activity based on the current configuration and * Intent fired. */ diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-privacy-settings-PrivacySettings.java.patch b/patches/chrome-android-java-src-org-chromium-chrome-browser-privacy-settings-PrivacySettings.java.patch index 273c51004f8f..23aa3e7c1b1e 100644 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-privacy-settings-PrivacySettings.java.patch +++ b/patches/chrome-android-java-src-org-chromium-chrome-browser-privacy-settings-PrivacySettings.java.patch @@ -1,8 +1,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java -index ea4b2becf283a757b3bbabf07b84e768d7ebe525..b0d5bae925aacaaa0bbe7b7f4f1de88de80ed922 100644 +index 5322bb6380b13a72d49ff349a1584e9cf1526cc9..b8b8ed93ab092f81da7804fe748e780cede2b703 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java -@@ -52,7 +52,7 @@ import org.chromium.ui.text.SpanApplier; +@@ -49,7 +49,7 @@ import org.chromium.ui.text.SpanApplier; * Fragment to keep track of the all the privacy related preferences. */ public class PrivacySettings @@ -11,7 +11,7 @@ index ea4b2becf283a757b3bbabf07b84e768d7ebe525..b0d5bae925aacaaa0bbe7b7f4f1de88d private static final String PREF_CAN_MAKE_PAYMENT = "can_make_payment"; private static final String PREF_PRELOAD_PAGES = "preload_pages"; private static final String PREF_HTTPS_FIRST_MODE = "https_first_mode"; -@@ -268,6 +268,7 @@ public class PrivacySettings +@@ -255,6 +255,7 @@ public class PrivacySettings @Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { menu.clear(); @@ -19,12 +19,11 @@ index ea4b2becf283a757b3bbabf07b84e768d7ebe525..b0d5bae925aacaaa0bbe7b7f4f1de88d MenuItem help = menu.add(Menu.NONE, R.id.menu_id_targeted_help, Menu.NONE, R.string.menu_help); help.setIcon(VectorDrawableCompat.create( -@@ -282,7 +283,7 @@ public class PrivacySettings +@@ -269,6 +270,6 @@ public class PrivacySettings null); return true; } - return false; + return super.onOptionsItemSelected(item); } - - public void setDialogContainer(ViewGroup dialogContainer) { + } diff --git a/patches/chrome-browser-BUILD.gn.patch b/patches/chrome-browser-BUILD.gn.patch index 87c61d57bbbf..de447cf9edb9 100644 --- a/patches/chrome-browser-BUILD.gn.patch +++ b/patches/chrome-browser-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index a5d471c22e01c95c099f7b173731955c675d8c13..cedf0d6b3ce8ac0e4e7862c1c08c3cb0211dde97 100644 +index bb193ea0cb1df492e52a5023bd84852bfc3985ce..9397e80445441f1a93fe8c6b12c5c9ad313bca97 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -2490,6 +2490,7 @@ static_library("browser") { +@@ -2501,6 +2501,7 @@ static_library("browser") { "performance_monitor/metric_evaluator_helper_posix.h", ] } diff --git a/patches/chrome-browser-about_flags.cc.patch b/patches/chrome-browser-about_flags.cc.patch index c7e29e333794..f1fc39043d08 100644 --- a/patches/chrome-browser-about_flags.cc.patch +++ b/patches/chrome-browser-about_flags.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc -index 099742e548f615f2ae3b9a9b3fb8c4fec4544afc..30b29a9e6d05337446b38f19dce10565651179d0 100644 +index 6cd4bb240c669f351f502a86a98f3645d8cc23b8..a919fa7959fa0c3abf26aa7fc84377c158b423bc 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -3291,6 +3291,7 @@ const FeatureEntry::FeatureVariation +@@ -3332,6 +3332,7 @@ const FeatureEntry::FeatureVariation // // When adding a new choice, add it to the end of the list. const FeatureEntry kFeatureEntries[] = { diff --git a/patches/chrome-browser-browser_process_impl.h.patch b/patches/chrome-browser-browser_process_impl.h.patch index ecd6cee8a5cf..da0892bf81c6 100644 --- a/patches/chrome-browser-browser_process_impl.h.patch +++ b/patches/chrome-browser-browser_process_impl.h.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_process_impl.h -index e2b4d0a33d8ca980194ee4d05dcc833e863d170f..c267c159b64ec35a287359336a33e92e8de2eac7 100644 +index c63ccb48abb54badff57a42c16009d4a20282030..adbcb5b47aad9d535c2bf87a73b64f275367e0fe 100644 --- a/chrome/browser/browser_process_impl.h +++ b/chrome/browser/browser_process_impl.h @@ -215,6 +215,7 @@ class BrowserProcessImpl : public BrowserProcess, diff --git a/patches/chrome-browser-browsing_data-chrome_browsing_data_remover_delegate_factory.cc.patch b/patches/chrome-browser-browsing_data-chrome_browsing_data_remover_delegate_factory.cc.patch deleted file mode 100644 index 1e77c60ecd68..000000000000 --- a/patches/chrome-browser-browsing_data-chrome_browsing_data_remover_delegate_factory.cc.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_factory.cc b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_factory.cc -index 975ba6c5b267d7f1dc9b4772c55e1976d84f72de..9f592931f898870a8e7a9b993c467e81c37822e8 100644 ---- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_factory.cc -+++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_factory.cc -@@ -98,5 +98,5 @@ ChromeBrowsingDataRemoverDelegateFactory::GetBrowserContextToUse( - - KeyedService* ChromeBrowsingDataRemoverDelegateFactory::BuildServiceInstanceFor( - content::BrowserContext* context) const { -- return new ChromeBrowsingDataRemoverDelegate(context); -+ return new BraveBrowsingDataRemoverDelegate(context); - } diff --git a/patches/chrome-browser-download-download_item_model.h.patch b/patches/chrome-browser-download-download_item_model.h.patch index 8635b5914f2a..50c68b6f7193 100644 --- a/patches/chrome-browser-download-download_item_model.h.patch +++ b/patches/chrome-browser-download-download_item_model.h.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/download/download_item_model.h b/chrome/browser/download/download_item_model.h -index 935192355ab3066c2d52927d92ffae2cb5a9767a..c7c81c7c0f5696e00960e55288cd65c5fef51933 100644 +index 73b7a2235549f6e0d55a119491d1f84af115855d..e40364567669abf142fb1cdd0b2e185e1fffdef2 100644 --- a/chrome/browser/download/download_item_model.h +++ b/chrome/browser/download/download_item_model.h -@@ -133,6 +133,7 @@ class DownloadItemModel : public DownloadUIModel, +@@ -136,6 +136,7 @@ class DownloadItemModel : public DownloadUIModel, void OnDownloadDestroyed(download::DownloadItem* download) override; private: diff --git a/patches/chrome-browser-extensions-BUILD.gn.patch b/patches/chrome-browser-extensions-BUILD.gn.patch index 0acc3d592b00..c80028535e3a 100644 --- a/patches/chrome-browser-extensions-BUILD.gn.patch +++ b/patches/chrome-browser-extensions-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/extensions/BUILD.gn b/chrome/browser/extensions/BUILD.gn -index 9a61d5cc1a1c33017cad6fd9e0d4617fc824ecf8..8f950eeb4b4621555289160016f902f6ee39c515 100644 +index 400d719eb1796cff2abc58d046b39c3a7e3c1761..3b20891ec961a6ee5a5e302f290a0ca7951757dc 100644 --- a/chrome/browser/extensions/BUILD.gn +++ b/chrome/browser/extensions/BUILD.gn -@@ -1362,6 +1362,7 @@ static_library("extensions") { +@@ -1370,6 +1370,7 @@ static_library("extensions") { } else { sources += [ "api/braille_display_private/braille_controller_stub.cc" ] } diff --git a/patches/chrome-browser-extensions-api-developer_private-extension_info_generator.cc.patch b/patches/chrome-browser-extensions-api-developer_private-extension_info_generator.cc.patch index 2c87afbe8a71..61b290bb91a2 100644 --- a/patches/chrome-browser-extensions-api-developer_private-extension_info_generator.cc.patch +++ b/patches/chrome-browser-extensions-api-developer_private-extension_info_generator.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/extensions/api/developer_private/extension_info_generator.cc b/chrome/browser/extensions/api/developer_private/extension_info_generator.cc -index ec7ce69a263b63af2eedefae9e86a69252c4a236..7edcba5f4b301d8c477825374706615836aa3aa7 100644 +index ac0befd1ab5bffdc0180b9c85f18fd6d5d765d43..1fbfce1fabe440764740f102418cf2098a18f3a0 100644 --- a/chrome/browser/extensions/api/developer_private/extension_info_generator.cc +++ b/chrome/browser/extensions/api/developer_private/extension_info_generator.cc -@@ -622,6 +622,7 @@ void ExtensionInfoGenerator::CreateExtensionInfoHelper( +@@ -632,6 +632,7 @@ void ExtensionInfoGenerator::CreateExtensionInfoHelper( info->incognito_access.is_enabled = util::CanBeIncognitoEnabled(&extension); info->incognito_access.is_active = util::IsIncognitoEnabled(extension.id(), browser_context_); diff --git a/patches/chrome-browser-extensions-api-identity-identity_get_auth_token_function.cc.patch b/patches/chrome-browser-extensions-api-identity-identity_get_auth_token_function.cc.patch index c436686b57d6..02b88c6b601c 100644 --- a/patches/chrome-browser-extensions-api-identity-identity_get_auth_token_function.cc.patch +++ b/patches/chrome-browser-extensions-api-identity-identity_get_auth_token_function.cc.patch @@ -1,23 +1,22 @@ diff --git a/chrome/browser/extensions/api/identity/identity_get_auth_token_function.cc b/chrome/browser/extensions/api/identity/identity_get_auth_token_function.cc -index b377740b4bd4898e2414a043255e8bb88ec02af4..d2d756a65c65ddef8135c85728a33a08a8620055 100644 +index b425e031d9153d6df7ead1a9551325703aa92a26..2ba0b5801e0b642dc1b39c2326786e6e774c403e 100644 --- a/chrome/browser/extensions/api/identity/identity_get_auth_token_function.cc +++ b/chrome/browser/extensions/api/identity/identity_get_auth_token_function.cc -@@ -45,6 +45,14 @@ - #include "google_apis/gaia/gaia_urls.h" - #include "services/network/public/cpp/shared_url_loader_factory.h" +@@ -44,6 +44,13 @@ + #include "google_apis/gaia/gaia_constants.h" + #endif +#include "base/compiler_specific.h" -+#include "base/ranges/algorithm.h" +#include "base/strings/string_split.h" +#include "base/strings/string_util.h" +#include "google_apis/google_api_keys.h" +#include "net/base/url_util.h" ++#include "base/ranges/algorithm.h" + -+ - #if BUILDFLAG(IS_CHROMEOS_ASH) - #include "chrome/browser/app_mode/app_mode_utils.h" - #include "chrome/browser/ash/login/session/user_session_manager.h" -@@ -173,6 +181,14 @@ ExtensionFunction::ResponseAction IdentityGetAuthTokenFunction::Run() { + namespace extensions { + + namespace { +@@ -156,6 +163,14 @@ ExtensionFunction::ResponseAction IdentityGetAuthTokenFunction::Run() { // From here on out, results must be returned asynchronously. StartAsyncRun(); @@ -32,13 +31,10 @@ index b377740b4bd4898e2414a043255e8bb88ec02af4..d2d756a65c65ddef8135c85728a33a08 if (gaia_id.empty() || IsPrimaryAccountOnly()) { // Try the primary account. // TODO(https://crbug.com/932400): collapse the asynchronicity -@@ -405,11 +421,17 @@ void IdentityGetAuthTokenFunction::StartSigninFlow() { - - void IdentityGetAuthTokenFunction::StartMintTokenFlow( +@@ -384,9 +399,15 @@ void IdentityGetAuthTokenFunction::StartMintTokenFlow( IdentityMintRequestQueue::MintType type) { -+// ChromeOS in kiosk mode may start the mint token flow without account. - #if !BUILDFLAG(IS_CHROMEOS_ASH) -- // ChromeOS in kiosk mode may start the mint token flow without account. + #if !BUILDFLAG(IS_CHROMEOS) + // ChromeOS in kiosk mode may start the mint token flow without account. - DCHECK(!token_key_.account_info.IsEmpty()); - DCHECK(IdentityManagerFactory::GetForProfile(GetProfile()) - ->HasAccountWithRefreshToken(token_key_.account_info.account_id)); @@ -54,7 +50,7 @@ index b377740b4bd4898e2414a043255e8bb88ec02af4..d2d756a65c65ddef8135c85728a33a08 #endif TRACE_EVENT_NESTABLE_ASYNC_BEGIN1("identity", "MintTokenFlow", this, "type", type); -@@ -495,6 +517,14 @@ void IdentityGetAuthTokenFunction::StartMintToken( +@@ -467,6 +488,14 @@ void IdentityGetAuthTokenFunction::StartMintToken( } #endif @@ -69,7 +65,7 @@ index b377740b4bd4898e2414a043255e8bb88ec02af4..d2d756a65c65ddef8135c85728a33a08 if (oauth2_info.auto_approve && *oauth2_info.auto_approve) { // oauth2_info.auto_approve is protected by an allowlist in // _manifest_features.json hence only selected extensions take -@@ -537,6 +567,11 @@ void IdentityGetAuthTokenFunction::StartMintToken( +@@ -509,6 +538,11 @@ void IdentityGetAuthTokenFunction::StartMintToken( cache_entry.granted_scopes()); break; case IdentityTokenCacheValue::CACHE_STATUS_NOTFOUND: @@ -81,7 +77,7 @@ index b377740b4bd4898e2414a043255e8bb88ec02af4..d2d756a65c65ddef8135c85728a33a08 case IdentityTokenCacheValue::CACHE_STATUS_REMOTE_CONSENT: ShowRemoteConsentDialog(resolution_data_); break; -@@ -611,6 +646,33 @@ void IdentityGetAuthTokenFunction::OnRemoteConsentSuccess( +@@ -583,6 +617,33 @@ void IdentityGetAuthTokenFunction::OnRemoteConsentSuccess( StartMintTokenFlow(IdentityMintRequestQueue::MINT_TYPE_INTERACTIVE); } @@ -115,7 +111,7 @@ index b377740b4bd4898e2414a043255e8bb88ec02af4..d2d756a65c65ddef8135c85728a33a08 void IdentityGetAuthTokenFunction::OnRefreshTokenUpdatedForAccount( const CoreAccountInfo& account_info) { if (account_listening_mode_ != AccountListeningMode::kListeningTokens) -@@ -760,6 +822,84 @@ void IdentityGetAuthTokenFunction::OnGaiaRemoteConsentFlowApproved( +@@ -732,6 +793,84 @@ void IdentityGetAuthTokenFunction::OnGaiaRemoteConsentFlowApproved( StartMintTokenFlow(IdentityMintRequestQueue::MINT_TYPE_NONINTERACTIVE); } @@ -164,7 +160,7 @@ index b377740b4bd4898e2414a043255e8bb88ec02af4..d2d756a65c65ddef8135c85728a33a08 + } + + auto access_token_it = -+ base::ranges::find(response_pairs, "access_token", ++ base::ranges::find(response_pairs, "access_token", + &std::pair::first); + if (access_token_it == response_pairs.end()) { + CompleteFunctionWithError( diff --git a/patches/chrome-browser-extensions-api-identity-identity_get_auth_token_function.h.patch b/patches/chrome-browser-extensions-api-identity-identity_get_auth_token_function.h.patch index 9a9cda5ee386..4cfbc715dd29 100644 --- a/patches/chrome-browser-extensions-api-identity-identity_get_auth_token_function.h.patch +++ b/patches/chrome-browser-extensions-api-identity-identity_get_auth_token_function.h.patch @@ -1,16 +1,16 @@ diff --git a/chrome/browser/extensions/api/identity/identity_get_auth_token_function.h b/chrome/browser/extensions/api/identity/identity_get_auth_token_function.h -index fd4958bfe33fdc5f34218510593f28108accdf9d..a705bba628a2ff1da76d657ad6f613e3b9466c88 100644 +index a90de50b0243c2a669b53e6580c3bfd70320503b..a5bcdf2a4f8f6805e4d532732854b2315e6c7ceb 100644 --- a/chrome/browser/extensions/api/identity/identity_get_auth_token_function.h +++ b/chrome/browser/extensions/api/identity/identity_get_auth_token_function.h -@@ -51,6 +51,7 @@ class IdentityGetAuthTokenError; +@@ -58,6 +58,7 @@ class IdentityGetAuthTokenError; // successfully, getAuthToken proceeds to the non-interactive flow. class IdentityGetAuthTokenFunction : public ExtensionFunction, public GaiaRemoteConsentFlow::Delegate, + public WebAuthFlow::Delegate, public IdentityMintRequestQueue::Request, public signin::IdentityManager::Observer, - #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -78,6 +79,11 @@ class IdentityGetAuthTokenFunction : public ExtensionFunction, + public OAuth2MintTokenFlow::Delegate { +@@ -82,6 +83,11 @@ class IdentityGetAuthTokenFunction : public ExtensionFunction, void OnGaiaRemoteConsentFlowApproved(const std::string& consent_result, const std::string& gaia_id) override; @@ -22,17 +22,17 @@ index fd4958bfe33fdc5f34218510593f28108accdf9d..a705bba628a2ff1da76d657ad6f613e3 // Starts a login access token request. virtual void StartTokenKeyAccountAccessTokenRequest(); -@@ -194,6 +200,9 @@ class IdentityGetAuthTokenFunction : public ExtensionFunction, +@@ -198,6 +204,9 @@ class IdentityGetAuthTokenFunction : public ExtensionFunction, void OnRemoteConsentSuccess( const RemoteConsentResolutionData& resolution_data) override; + // Used only if Google API keys aren't set up. + void StartWebAuthFlow(); + - #if BUILDFLAG(IS_CHROMEOS_ASH) + #if BUILDFLAG(IS_CHROMEOS) // Starts a login access token request for device robot account. This method // will be called only in Chrome OS for: -@@ -242,6 +251,10 @@ class IdentityGetAuthTokenFunction : public ExtensionFunction, +@@ -246,6 +255,10 @@ class IdentityGetAuthTokenFunction : public ExtensionFunction, // Added for debugging https://crbug.com/1091423. bool remote_consent_approved_ = false; diff --git a/patches/chrome-browser-extensions-component_loader.h.patch b/patches/chrome-browser-extensions-component_loader.h.patch index 1a2b72464e1e..a0955843199b 100644 --- a/patches/chrome-browser-extensions-component_loader.h.patch +++ b/patches/chrome-browser-extensions-component_loader.h.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/extensions/component_loader.h b/chrome/browser/extensions/component_loader.h -index 0ba2893b96e73d5d67ef2e97801f6de8457f3be7..c824d51b04e3c5b0b6e3974f2b953e84bd758407 100644 +index ea0492aa05c8e24393d2faabd09ac3e6c8cb6f77..5334392bcf0dab8a7aec52840b00d2123b68ab7d 100644 --- a/chrome/browser/extensions/component_loader.h +++ b/chrome/browser/extensions/component_loader.h @@ -85,7 +85,7 @@ class ComponentLoader { diff --git a/patches/chrome-browser-extensions-extension_tab_util.cc.patch b/patches/chrome-browser-extensions-extension_tab_util.cc.patch index 34ebbc3380f8..4aef95f2a94f 100644 --- a/patches/chrome-browser-extensions-extension_tab_util.cc.patch +++ b/patches/chrome-browser-extensions-extension_tab_util.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/extensions/extension_tab_util.cc b/chrome/browser/extensions/extension_tab_util.cc -index 48748ca6bfc43c457f1caf89b3724ac539259af2..e00104b261ed051fd7844672424d4c9d726cc332 100644 +index 87e14fc382a29eb65f0606709f56a5d4d34eac8e..9009d69d6984accb5306915fd47839e1a6623fb7 100644 --- a/chrome/browser/extensions/extension_tab_util.cc +++ b/chrome/browser/extensions/extension_tab_util.cc -@@ -815,6 +815,7 @@ bool ExtensionTabUtil::IsKillURL(const GURL& url) { +@@ -822,6 +822,7 @@ bool ExtensionTabUtil::IsKillURL(const GURL& url) { }; if (!url.SchemeIs(content::kChromeUIScheme)) diff --git a/patches/chrome-browser-external_protocol-external_protocol_handler.cc.patch b/patches/chrome-browser-external_protocol-external_protocol_handler.cc.patch index e9cb86a23bfe..2b3f80c8919d 100644 --- a/patches/chrome-browser-external_protocol-external_protocol_handler.cc.patch +++ b/patches/chrome-browser-external_protocol-external_protocol_handler.cc.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/external_protocol/external_protocol_handler.cc b/chrome/browser/external_protocol/external_protocol_handler.cc -index 1ba0226d161465d5e1933e804cbf53ea96f28860..db7ca6be267a4a86804347338ff639e510e29531 100644 +index 0db34bdfa43db78139e21782baa0a16cd0a7d16a..5e45e7008c18b726ebe029559ca2232ee2c13e77 100644 --- a/chrome/browser/external_protocol/external_protocol_handler.cc +++ b/chrome/browser/external_protocol/external_protocol_handler.cc @@ -330,7 +330,7 @@ ExternalProtocolHandler::BlockState ExternalProtocolHandler::GetBlockState( diff --git a/patches/chrome-browser-net-system_network_context_manager.cc.patch b/patches/chrome-browser-net-system_network_context_manager.cc.patch index 895c571ee37e..4a2c9670fb20 100644 --- a/patches/chrome-browser-net-system_network_context_manager.cc.patch +++ b/patches/chrome-browser-net-system_network_context_manager.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/browser/net/system_network_context_manager.cc -index a8b9d9499109e0eeaec6a4654b1098e4cd557863..98a2b36eaa0f9640e0b29918d4326c96dbc5f74b 100644 +index 06ba3f6d0932dc0d93cb34f52178b6a56a282de2..a2a55c49ced68b6da9d114ee9a92dede1744f4dd 100644 --- a/chrome/browser/net/system_network_context_manager.cc +++ b/chrome/browser/net/system_network_context_manager.cc -@@ -332,7 +332,7 @@ class SystemNetworkContextManager::URLLoaderFactoryForSystem +@@ -337,7 +337,7 @@ class SystemNetworkContextManager::URLLoaderFactoryForSystem if (!manager_) return; manager_->GetURLLoaderFactory()->CreateLoaderAndStart( diff --git a/patches/chrome-browser-prefs-browser_prefs.cc.patch b/patches/chrome-browser-prefs-browser_prefs.cc.patch index 770b7b7244db..20f2c4166e84 100644 --- a/patches/chrome-browser-prefs-browser_prefs.cc.patch +++ b/patches/chrome-browser-prefs-browser_prefs.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc -index e6350b369e417ab89e6da2986606d75fc8832e10..fd9e8e531ae452306528a5daf7c4dd1107c9f45a 100644 +index d9867abfabbdb346733430dd6b3006e97f99d7d7..a24adab43ac7c36b3f16484366e16d47434dedda 100644 --- a/chrome/browser/prefs/browser_prefs.cc +++ b/chrome/browser/prefs/browser_prefs.cc -@@ -1257,6 +1257,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) { +@@ -1224,6 +1224,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) { DeviceOAuth2TokenStoreDesktop::RegisterPrefs(registry); #endif @@ -11,7 +11,7 @@ index e6350b369e417ab89e6da2986606d75fc8832e10..fd9e8e531ae452306528a5daf7c4dd11 #if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) screen_ai::RegisterLocalStatePrefs(registry); #endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) -@@ -1610,6 +1612,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, +@@ -1580,6 +1582,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, #endif RegisterProfilePrefsForMigration(registry); diff --git a/patches/chrome-browser-profiles-profile.cc.patch b/patches/chrome-browser-profiles-profile.cc.patch index 7d05b6b08f09..fca24af13ca7 100644 --- a/patches/chrome-browser-profiles-profile.cc.patch +++ b/patches/chrome-browser-profiles-profile.cc.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/profiles/profile.cc b/chrome/browser/profiles/profile.cc -index 03dbc7190157c788148312c01dff8bee6d0442c4..b70bd3763ea74da21b4dd642bb5b6606f0c4ac66 100644 +index 8ab5d6c0417a5485e61ede30ea1e52c78da9d540..a4e5c01692e468a3e04f0119680698a212ffe05b 100644 --- a/chrome/browser/profiles/profile.cc +++ b/chrome/browser/profiles/profile.cc @@ -99,6 +99,7 @@ bool Profile::OTRProfileID::AllowsBrowserWindows() const { diff --git a/patches/chrome-browser-profiles-profile_destroyer.cc.patch b/patches/chrome-browser-profiles-profile_destroyer.cc.patch deleted file mode 100644 index 06947361b59c..000000000000 --- a/patches/chrome-browser-profiles-profile_destroyer.cc.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/chrome/browser/profiles/profile_destroyer.cc b/chrome/browser/profiles/profile_destroyer.cc -index 517fd2a8a924f3076ad14105a0ec2677e18b0c79..1abc39094e3ffa59725dbeec543eac4371b81d18 100644 ---- a/chrome/browser/profiles/profile_destroyer.cc -+++ b/chrome/browser/profiles/profile_destroyer.cc -@@ -88,6 +88,7 @@ void ProfileDestroyer::DestroyProfileWhenAppropriate(Profile* const profile) { - // ignored during shutdown and by the System Profile do not either. - HostSet profile_hosts; - GetHostsForProfile(&profile_hosts, profile); -+ BRAVE_PROFILE_DESTROYER_DESTROY_PROFILE_WHEN_APPROPRIATE - for (Profile* otr_profile : profile->GetAllOffTheRecordProfiles()) { - GetHostsForProfile(&profile_hosts, otr_profile); - } diff --git a/patches/chrome-browser-profiles-profile_impl.cc.patch b/patches/chrome-browser-profiles-profile_impl.cc.patch index 6ca260ffa5bd..853fb31fec4f 100644 --- a/patches/chrome-browser-profiles-profile_impl.cc.patch +++ b/patches/chrome-browser-profiles-profile_impl.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc -index b1a3fc0249f3f6b6458038e6173743a1fd3b5724..8ee0b9bd4591b4b5d73805d4282c24a097c7415e 100644 +index c0a48974dacea6e0985e02d3fef352af347545c0..55b44fe8e0d05ca29ec961483978287b9448dad9 100644 --- a/chrome/browser/profiles/profile_impl.cc +++ b/chrome/browser/profiles/profile_impl.cc -@@ -358,7 +358,7 @@ std::unique_ptr Profile::CreateProfile(const base::FilePath& path, +@@ -360,7 +360,7 @@ std::unique_ptr Profile::CreateProfile(const base::FilePath& path, NOTREACHED(); } diff --git a/patches/chrome-browser-profiles-profile_impl.h.patch b/patches/chrome-browser-profiles-profile_impl.h.patch index 312091ba00ea..01f860a93f4d 100644 --- a/patches/chrome-browser-profiles-profile_impl.h.patch +++ b/patches/chrome-browser-profiles-profile_impl.h.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/profiles/profile_impl.h b/chrome/browser/profiles/profile_impl.h -index 7db7fd820a931f0d3560c83c53ab5990ccf860cc..842114594c200ad92029c24c51ee9555b0901b6c 100644 +index 8bf9b5976ed830e74ad179f28faa9044e92f25f0..184afcf4a79656187806bb2295934aede3274d2e 100644 --- a/chrome/browser/profiles/profile_impl.h +++ b/chrome/browser/profiles/profile_impl.h -@@ -155,6 +155,7 @@ class ProfileImpl : public Profile { +@@ -163,6 +163,7 @@ class ProfileImpl : public Profile { void OnLogin() override; void InitChromeOSPreferences() override; #endif // BUILDFLAG(IS_CHROMEOS_ASH) diff --git a/patches/chrome-browser-profiles-profile_shortcut_manager_win.cc.patch b/patches/chrome-browser-profiles-profile_shortcut_manager_win.cc.patch index dcda7a110522..ed3e11743926 100644 --- a/patches/chrome-browser-profiles-profile_shortcut_manager_win.cc.patch +++ b/patches/chrome-browser-profiles-profile_shortcut_manager_win.cc.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/profiles/profile_shortcut_manager_win.cc b/chrome/browser/profiles/profile_shortcut_manager_win.cc -index 11f19c48fe5e46fb07c3987aa92f1318ab47e1a2..2fdb2e8e4d4c18dff0ce420f94e1ebe5afc5129a 100644 +index 741bbd13a5546b451159d5feeb888f3299a5b78b..0438d80c4759dd94eeaa23cfd468f753d876261d 100644 --- a/chrome/browser/profiles/profile_shortcut_manager_win.cc +++ b/chrome/browser/profiles/profile_shortcut_manager_win.cc @@ -859,7 +859,7 @@ bool ProfileShortcutManager::IsFeatureEnabled() { diff --git a/patches/chrome-browser-renderer_context_menu-render_view_context_menu.cc.patch b/patches/chrome-browser-renderer_context_menu-render_view_context_menu.cc.patch index 021ca4a5a7ed..fb4163c9ba80 100644 --- a/patches/chrome-browser-renderer_context_menu-render_view_context_menu.cc.patch +++ b/patches/chrome-browser-renderer_context_menu-render_view_context_menu.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu.cc b/chrome/browser/renderer_context_menu/render_view_context_menu.cc -index 7db1991010ce734136dc54b49d1fbf60939cfe0e..e9810216d251c8cea849dc4244ba1044ff3747fc 100644 +index 039a9e48ea396c323389b7441d54f63ea3e0b8fb..5880730be7cb70e335e3c3ff5ae3595ac087a80b 100644 --- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc +++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc -@@ -1918,6 +1918,7 @@ void RenderViewContextMenu::AppendSearchProvider() { +@@ -1927,6 +1927,7 @@ void RenderViewContextMenu::AppendSearchProvider() { selection_navigation_url_ = match.destination_url; if (!selection_navigation_url_.is_valid()) return; diff --git a/patches/chrome-browser-renderer_context_menu-render_view_context_menu.h.patch b/patches/chrome-browser-renderer_context_menu-render_view_context_menu.h.patch index 454c55d1674f..da86cc754ad3 100644 --- a/patches/chrome-browser-renderer_context_menu-render_view_context_menu.h.patch +++ b/patches/chrome-browser-renderer_context_menu-render_view_context_menu.h.patch @@ -1,12 +1,12 @@ diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu.h b/chrome/browser/renderer_context_menu/render_view_context_menu.h -index 51695cd6d98a822f0ec4e64a7dc1dc1790341ca1..2faea0f92a3122af3c1b307367a510388db402f9 100644 +index 81be89d1a76c05feee16c1b3cf13fad54b7adb77..d1f25c8fa38b92b2ba49ca2c64fdd83e73f21e0b 100644 --- a/chrome/browser/renderer_context_menu/render_view_context_menu.h +++ b/chrome/browser/renderer_context_menu/render_view_context_menu.h -@@ -149,6 +149,7 @@ class RenderViewContextMenu +@@ -152,6 +152,7 @@ class RenderViewContextMenu // Returns true if keyboard lock is active and requires the user to press and // hold escape to exit exclusive access mode. bool IsPressAndHoldEscRequiredToExitFullscreen() const; + BRAVE_RENDER_VIEW_CONTEXT_MENU_H_ - #if BUILDFLAG(IS_CHROMEOS_ASH) + #if BUILDFLAG(IS_CHROMEOS) virtual const policy::DlpRulesManager* GetDlpRulesManager() const; diff --git a/patches/chrome-browser-resources-bookmarks-api_listener.ts.patch b/patches/chrome-browser-resources-bookmarks-api_listener.ts.patch index 7fdbfe0eefde..f62a06132115 100644 --- a/patches/chrome-browser-resources-bookmarks-api_listener.ts.patch +++ b/patches/chrome-browser-resources-bookmarks-api_listener.ts.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/bookmarks/api_listener.ts b/chrome/browser/resources/bookmarks/api_listener.ts -index 64c2f8431bcdd4ab3126c2b6120b628094412dd8..9f309b832f8eb5079b4f90f05ff87a01e4e8c61d 100644 +index d0375efc85b5e6b7eca6480b2283689e0ca72a21..fd27703c01fe2fb660801aa96060c2cf855198dc 100644 --- a/chrome/browser/resources/bookmarks/api_listener.ts +++ b/chrome/browser/resources/bookmarks/api_listener.ts @@ -118,6 +118,7 @@ function onChildrenReordered( diff --git a/patches/chrome-browser-resources-bookmarks-command_manager.ts.patch b/patches/chrome-browser-resources-bookmarks-command_manager.ts.patch index 9b17ddf70ecb..209fc447ff4b 100644 --- a/patches/chrome-browser-resources-bookmarks-command_manager.ts.patch +++ b/patches/chrome-browser-resources-bookmarks-command_manager.ts.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/bookmarks/command_manager.ts b/chrome/browser/resources/bookmarks/command_manager.ts -index c966e0dd62f6b54bc62cd1dc601125c021ef8a00..b4a2d583a47326ae8e407112a0513361458c269e 100644 +index f24552cae88663a5f3d57d2e9d2108be94db4d33..c7c05e4237c0314469db3a46af8e267430c39eaf 100644 --- a/chrome/browser/resources/bookmarks/command_manager.ts +++ b/chrome/browser/resources/bookmarks/command_manager.ts @@ -428,7 +428,7 @@ export class BookmarksCommandManagerElement extends diff --git a/patches/chrome-browser-resources-bookmarks-reducers.ts.patch b/patches/chrome-browser-resources-bookmarks-reducers.ts.patch index 0002d1c726f0..cdad0f57bb5c 100644 --- a/patches/chrome-browser-resources-bookmarks-reducers.ts.patch +++ b/patches/chrome-browser-resources-bookmarks-reducers.ts.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/bookmarks/reducers.ts b/chrome/browser/resources/bookmarks/reducers.ts -index f8cab26d9859abaacda3f9657ce6b29ecd59f6eb..e78a60caee1c93d182a6233e4663cd5ad0a1a912 100644 +index a0fc02df2a76ac5907b50a8e06df971335e7fcbf..733a3981c6d3c51e8b04ca9e17cfbe002a40ba7d 100644 --- a/chrome/browser/resources/bookmarks/reducers.ts +++ b/chrome/browser/resources/bookmarks/reducers.ts @@ -193,6 +193,9 @@ function editBookmark(nodes: NodeMap, action: EditBookmarkAction): NodeMap { diff --git a/patches/chrome-browser-resources-extensions-extensions.ts.patch b/patches/chrome-browser-resources-extensions-extensions.ts.patch index 087df7cd338c..b463f9463b91 100644 --- a/patches/chrome-browser-resources-extensions-extensions.ts.patch +++ b/patches/chrome-browser-resources-extensions-extensions.ts.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/extensions/extensions.ts b/chrome/browser/resources/extensions/extensions.ts -index 5a20e92a5eac4556f1e60de2f6f8714ae3312aee..b1d3ee336c9d9b8e93ffefeae699b708e61b30ea 100644 +index 4d1af5fe9061370e94c18a60c1fd3e450138e1c2..b430ebc078244eeacbf716a8a4605ba863297cb6 100644 --- a/chrome/browser/resources/extensions/extensions.ts +++ b/chrome/browser/resources/extensions/extensions.ts @@ -2,6 +2,7 @@ @@ -9,4 +9,4 @@ index 5a20e92a5eac4556f1e60de2f6f8714ae3312aee..b1d3ee336c9d9b8e93ffefeae699b708 +import './brave_overrides/index.js'; import './manager.js'; - export {CrCheckboxElement} from 'chrome://resources/cr_elements/cr_checkbox/cr_checkbox.m.js'; + export {CrCheckboxElement} from 'chrome://resources/cr_elements/cr_checkbox/cr_checkbox.js'; diff --git a/patches/chrome-browser-resources-history-history.ts.patch b/patches/chrome-browser-resources-history-history.ts.patch index e2707e3c28fb..2388b37d976f 100644 --- a/patches/chrome-browser-resources-history-history.ts.patch +++ b/patches/chrome-browser-resources-history-history.ts.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/history/history.ts b/chrome/browser/resources/history/history.ts -index ddc12a680b796c83525b4ca604878d76d7752015..1bfddc4f7d03fe98f7a2ef4f8a6be11cc5ea64ab 100644 +index 7f32e0582a7c750f84c32b78d7cbc7f35dcf5167..47da27748609c3f82ebfa49771236f86bace8819 100644 --- a/chrome/browser/resources/history/history.ts +++ b/chrome/browser/resources/history/history.ts @@ -2,6 +2,8 @@ diff --git a/patches/chrome-browser-resources-history-history_item.ts.patch b/patches/chrome-browser-resources-history-history_item.ts.patch index bfd8f9c94afd..2ba03c3292c2 100644 --- a/patches/chrome-browser-resources-history-history_item.ts.patch +++ b/patches/chrome-browser-resources-history-history_item.ts.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/history/history_item.ts b/chrome/browser/resources/history/history_item.ts -index 9d1a65587b690c1d39a165f01227aa5cdd850758..013d32c6f3aee8947faa5d44d72f2038f3e6897b 100644 +index e69fd497e3c2940e0e78406425c00e7e6f80a9cb..f2ad216f0704493160fd1338601c0d9b2d2f3735 100644 --- a/chrome/browser/resources/history/history_item.ts +++ b/chrome/browser/resources/history/history_item.ts @@ -9,6 +9,7 @@ import 'chrome://resources/cr_elements/cr_icons_css.m.js'; @@ -8,5 +8,5 @@ index 9d1a65587b690c1d39a165f01227aa5cdd850758..013d32c6f3aee8947faa5d44d72f2038 import 'chrome://resources/polymer/v3_0/iron-icon/iron-icon.js'; +import 'chrome://brave-resources/page_specific/history/brave_history_item.m.js' - import {CrCheckboxElement} from 'chrome://resources/cr_elements/cr_checkbox/cr_checkbox.m.js'; - import {CrIconButtonElement} from 'chrome://resources/cr_elements/cr_icon_button/cr_icon_button.m.js'; + import {CrCheckboxElement} from 'chrome://resources/cr_elements/cr_checkbox/cr_checkbox.js'; + import {CrIconButtonElement} from 'chrome://resources/cr_elements/cr_icon_button/cr_icon_button.js'; diff --git a/patches/chrome-browser-resources-settings-BUILD.gn.patch b/patches/chrome-browser-resources-settings-BUILD.gn.patch index dd901d116952..02022878a131 100644 --- a/patches/chrome-browser-resources-settings-BUILD.gn.patch +++ b/patches/chrome-browser-resources-settings-BUILD.gn.patch @@ -1,18 +1,10 @@ diff --git a/chrome/browser/resources/settings/BUILD.gn b/chrome/browser/resources/settings/BUILD.gn -index b6d81b8457a70ea46f38af743bffa855622cc261..695b4b863257997b715db0a7fad0fbdb90d3c882 100644 +index ab01660acd836acb11a241bd3ff29790201baf60..1e85dc35af61c74d3cc0794ea1798b009aaea207 100644 --- a/chrome/browser/resources/settings/BUILD.gn +++ b/chrome/browser/resources/settings/BUILD.gn -@@ -175,6 +175,7 @@ ts_library("build_ts") { - ":preprocess", - ":preprocess_generated", - ] -+ in_files += brave_deps_chrome_browser_resources_settings_in_files extra_deps += brave_deps_chrome_browser_resources_settings_extra_deps - } - - generate_grd("build_grd") { -@@ -263,4 +264,5 @@ generate_grd("build_grd") { - manifest_files = - filter_include(get_target_outputs(":build_ts"), [ "*.manifest" ]) +@@ -478,4 +478,5 @@ build_webui("build") { + "lazy_load.rollup.js|lazy_load.js", + ] } -+ deps += [ "//brave/browser/resources/settings:resources" ] ++ extra_build_ts_in_files = brave_deps_chrome_browser_resources_settings_in_files extra_build_ts_extra_deps = brave_deps_chrome_browser_resources_settings_extra_deps extra_build_grd_deps = [ "//brave/browser/resources/settings:resources" ] } diff --git a/patches/chrome-browser-resources-settings-people_page-sync_controls.ts.patch b/patches/chrome-browser-resources-settings-people_page-sync_controls.ts.patch index 709b179b30b9..9325cd8446bb 100644 --- a/patches/chrome-browser-resources-settings-people_page-sync_controls.ts.patch +++ b/patches/chrome-browser-resources-settings-people_page-sync_controls.ts.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/settings/people_page/sync_controls.ts b/chrome/browser/resources/settings/people_page/sync_controls.ts -index 759b87d113c27754f320384d1cf1673e5dafceee..5d85c2d5ca7c19dc5a5ebc54e9837ae4b9610c35 100644 +index 8dac3283d78f6ef50459d5efed93921afb93b9a5..b77a0f94981b23a54d81aecd07582ba7bfad604f 100644 --- a/chrome/browser/resources/settings/people_page/sync_controls.ts +++ b/chrome/browser/resources/settings/people_page/sync_controls.ts @@ -100,7 +100,7 @@ export class SettingsSyncControlsElement extends diff --git a/patches/chrome-browser-resources-settings-privacy_page-personalization_options.html.patch b/patches/chrome-browser-resources-settings-privacy_page-personalization_options.html.patch index 2e31f7496c03..f0c490592d1f 100644 --- a/patches/chrome-browser-resources-settings-privacy_page-personalization_options.html.patch +++ b/patches/chrome-browser-resources-settings-privacy_page-personalization_options.html.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/settings/privacy_page/personalization_options.html b/chrome/browser/resources/settings/privacy_page/personalization_options.html -index b21cd6596bd7f63bd94781379c3b26a9b3fb06d1..2f418b8c36ff0128bdb3a69abee8f65a22eedc93 100644 +index 56fda9d97da5a58cb623f0d375f5a172c9836af4..1a731902a0d3c0e8c67da3ac198b1e0c4a24d91b 100644 --- a/chrome/browser/resources/settings/privacy_page/personalization_options.html +++ b/chrome/browser/resources/settings/privacy_page/personalization_options.html @@ -13,6 +13,7 @@ @@ -7,7 +7,7 @@ index b21cd6596bd7f63bd94781379c3b26a9b3fb06d1..2f418b8c36ff0128bdb3a69abee8f65a } + - + @@ -51,7 +51,7 @@ index b21cd6596bd7f63bd94781379c3b26a9b3fb06d1..2f418b8c36ff0128bdb3a69abee8f65a diff --git a/patches/chrome-browser-resources-settings-privacy_page-personalization_options.ts.patch b/patches/chrome-browser-resources-settings-privacy_page-personalization_options.ts.patch index 70ca40a8cbff..29e13f95326f 100644 --- a/patches/chrome-browser-resources-settings-privacy_page-personalization_options.ts.patch +++ b/patches/chrome-browser-resources-settings-privacy_page-personalization_options.ts.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/resources/settings/privacy_page/personalization_options.ts b/chrome/browser/resources/settings/privacy_page/personalization_options.ts -index ccc1481b7df5f99d0937abc3df8c6d48b892cfcf..6f084d99446112b9ab8577b6a481e52dd1f595f2 100644 +index bd223d35037bbd5344b8c56b3f1f963e80987a9d..7483cf5d860fc8ed518ec64defe1cf094573a0a3 100644 --- a/chrome/browser/resources/settings/privacy_page/personalization_options.ts +++ b/chrome/browser/resources/settings/privacy_page/personalization_options.ts -@@ -74,7 +74,7 @@ export class SettingsPersonalizationOptionsElement extends +@@ -76,7 +76,7 @@ export class SettingsPersonalizationOptionsElement extends syncStatus: Object, @@ -11,7 +11,7 @@ index ccc1481b7df5f99d0937abc3df8c6d48b892cfcf..6f084d99446112b9ab8577b6a481e52d // TODO(dbeam): make a virtual.* pref namespace and set/get this normally // (but handled differently in C++). metricsReportingPref_: { -@@ -116,7 +116,7 @@ export class SettingsPersonalizationOptionsElement extends +@@ -118,7 +118,7 @@ export class SettingsPersonalizationOptionsElement extends pageVisibility: PrivacyPageVisibility; syncStatus: SyncStatus; @@ -20,7 +20,7 @@ index ccc1481b7df5f99d0937abc3df8c6d48b892cfcf..6f084d99446112b9ab8577b6a481e52d private metricsReportingPref_: chrome.settingsPrivate.PrefObject; private showRestart_: boolean; // -@@ -140,7 +140,7 @@ export class SettingsPersonalizationOptionsElement extends +@@ -159,7 +159,7 @@ export class SettingsPersonalizationOptionsElement extends override ready() { super.ready(); @@ -29,7 +29,7 @@ index ccc1481b7df5f99d0937abc3df8c6d48b892cfcf..6f084d99446112b9ab8577b6a481e52d const setMetricsReportingPref = (metricsReporting: MetricsReporting) => this.setMetricsReportingPref_(metricsReporting); this.addWebUIListener('metrics-reporting-change', setMetricsReportingPref); -@@ -174,7 +174,7 @@ export class SettingsPersonalizationOptionsElement extends +@@ -193,7 +193,7 @@ export class SettingsPersonalizationOptionsElement extends } // diff --git a/patches/chrome-browser-resources-settings-privacy_page-privacy_page.html.patch b/patches/chrome-browser-resources-settings-privacy_page-privacy_page.html.patch index c587f582f893..82f02906f0e4 100644 --- a/patches/chrome-browser-resources-settings-privacy_page-privacy_page.html.patch +++ b/patches/chrome-browser-resources-settings-privacy_page-privacy_page.html.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.html b/chrome/browser/resources/settings/privacy_page/privacy_page.html -index 93c60349ed92e4125bc5066f0f32a81397fc6888..5e0cb2dc8c61264e625a9c06a3245c425ba7d15f 100644 +index bc7b142ab26cd337882074c485bf8bed98890735..80f346d301ac6b2bc044a2685e16586fc316f629 100644 --- a/chrome/browser/resources/settings/privacy_page/privacy_page.html +++ b/chrome/browser/resources/settings/privacy_page/privacy_page.html @@ -40,6 +40,7 @@ diff --git a/patches/chrome-browser-resources-settings-privacy_page-privacy_page.ts.patch b/patches/chrome-browser-resources-settings-privacy_page-privacy_page.ts.patch index 31613134cf09..a93b50ae4399 100644 --- a/patches/chrome-browser-resources-settings-privacy_page-privacy_page.ts.patch +++ b/patches/chrome-browser-resources-settings-privacy_page-privacy_page.ts.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.ts b/chrome/browser/resources/settings/privacy_page/privacy_page.ts -index 5081302b7f0462f6ce37df8a19e6ebc3fec458d8..2d64e8cffea0c63365de87efe79863ede2c5ec4b 100644 +index 846b872f9b9019de1f906e91bd86285c04c727e8..260a330b35bfb8e2c84e453e57f0a21741db9dfa 100644 --- a/chrome/browser/resources/settings/privacy_page/privacy_page.ts +++ b/chrome/browser/resources/settings/privacy_page/privacy_page.ts @@ -19,6 +19,7 @@ import '../site_settings/site_data_details_subpage.js'; diff --git a/patches/chrome-browser-resources-settings-privacy_page-privacy_page_browser_proxy.ts.patch b/patches/chrome-browser-resources-settings-privacy_page-privacy_page_browser_proxy.ts.patch index 422c3d052aeb..05b4cd91a779 100644 --- a/patches/chrome-browser-resources-settings-privacy_page-privacy_page_browser_proxy.ts.patch +++ b/patches/chrome-browser-resources-settings-privacy_page-privacy_page_browser_proxy.ts.patch @@ -1,9 +1,9 @@ diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page_browser_proxy.ts b/chrome/browser/resources/settings/privacy_page/privacy_page_browser_proxy.ts -index cf0b426894c3802db532749470c68de8bb01fcb0..a2eef456c483b13f6614d312c817677472e870c8 100644 +index 79866f2afd1c41df8ba5df07c52e6afe0209accb..978453fdbfa4445dd33c2958f96899f161a44190 100644 --- a/chrome/browser/resources/settings/privacy_page/privacy_page_browser_proxy.ts +++ b/chrome/browser/resources/settings/privacy_page/privacy_page_browser_proxy.ts -@@ -46,7 +46,7 @@ export type SecureDnsSetting = { - }; +@@ -46,7 +46,7 @@ export interface SecureDnsSetting { + } export interface PrivacyPageBrowserProxy { - // diff --git a/patches/chrome-browser-resources-settings-route.ts.patch b/patches/chrome-browser-resources-settings-route.ts.patch index c046807c31d0..f79087064351 100644 --- a/patches/chrome-browser-resources-settings-route.ts.patch +++ b/patches/chrome-browser-resources-settings-route.ts.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/settings/route.ts b/chrome/browser/resources/settings/route.ts -index a2e54078ee5d43cb1b4020a34c788d64ec8ec409..44f99601f9acc719186988245c64dbc5183995a9 100644 +index 277f1946c3a6812d1b6378955bafcacae43b4516..52a8b87caf0cf8d6298f0b2f295f2471caee9f93 100644 --- a/chrome/browser/resources/settings/route.ts +++ b/chrome/browser/resources/settings/route.ts @@ -9,6 +9,7 @@ import {pageVisibility} from './page_visibility.js'; @@ -10,7 +10,7 @@ index a2e54078ee5d43cb1b4020a34c788d64ec8ec409..44f99601f9acc719186988245c64dbc5 /** * Add all of the child routes that originate from the privacy route, * regardless of whether the privacy section under basic or advanced. -@@ -217,6 +218,7 @@ function createBrowserSettingsRoutes(): Partial { +@@ -236,6 +237,7 @@ function createBrowserSettingsRoutes(): Partial { // } } diff --git a/patches/chrome-browser-resources-settings-settings.ts.patch b/patches/chrome-browser-resources-settings-settings.ts.patch index cdfb16e7ff5c..0e6679b8346e 100644 --- a/patches/chrome-browser-resources-settings-settings.ts.patch +++ b/patches/chrome-browser-resources-settings-settings.ts.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/settings/settings.ts b/chrome/browser/resources/settings/settings.ts -index 321fb5c4732a37c22a43b32eb948dfb30e88044a..9deb3be5e5df7a32604b23e12880a56e3b5fdd51 100644 +index df81d505ced4b9e8c6540288a0e37be313cb3cf2..91760cdb7d48e93ef1b09004595a55eb548ca68a 100644 --- a/chrome/browser/resources/settings/settings.ts +++ b/chrome/browser/resources/settings/settings.ts @@ -2,6 +2,7 @@ diff --git a/patches/chrome-browser-resources-settings-settings_routes.ts.patch b/patches/chrome-browser-resources-settings-settings_routes.ts.patch index 731e6250453f..cfdae1f10575 100644 --- a/patches/chrome-browser-resources-settings-settings_routes.ts.patch +++ b/patches/chrome-browser-resources-settings-settings_routes.ts.patch @@ -1,10 +1,10 @@ diff --git a/chrome/browser/resources/settings/settings_routes.ts b/chrome/browser/resources/settings/settings_routes.ts -index 0fdf17e243bb5c7ffadec33598a0d22fc0cb2f91..e54b3d5c0a324fc3b896d0ed82713a510ed49410 100644 +index 54062970cfac1ca3b3d151e0be361277c9dd49ac..0f213f9f49824e5df7a3d23fc6189022d5a401e2 100644 --- a/chrome/browser/resources/settings/settings_routes.ts +++ b/chrome/browser/resources/settings/settings_routes.ts -@@ -89,4 +89,5 @@ export type SettingsRoutes = { - SYNC_ADVANCED: Route, - SYSTEM: Route, - TRIGGERED_RESET_DIALOG: Route, -+ GET_STARTED: Route, - }; +@@ -90,4 +90,5 @@ export interface SettingsRoutes { + SYNC_ADVANCED: Route; + SYSTEM: Route; + TRIGGERED_RESET_DIALOG: Route; ++ GET_STARTED: Route; + } diff --git a/patches/chrome-browser-resources-settings-site_settings_page-site_settings_page.ts.patch b/patches/chrome-browser-resources-settings-site_settings_page-site_settings_page.ts.patch index 7bdb29585bd3..8c0e620eb7c3 100644 --- a/patches/chrome-browser-resources-settings-site_settings_page-site_settings_page.ts.patch +++ b/patches/chrome-browser-resources-settings-site_settings_page-site_settings_page.ts.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts b/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts -index bbeb79f1839c7584d7242a0fdf151e3a913ca650..651a9df26feda892ea56d109e19e2bf0a0c71e4d 100644 +index c760ee3f3530df1169b44e8d9f8425d2109c6fac..f96e2cf2b9fad25d618291e7ec68f7bda47a35e4 100644 --- a/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts +++ b/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts @@ -8,6 +8,7 @@ @@ -7,6 +7,6 @@ index bbeb79f1839c7584d7242a0fdf151e3a913ca650..651a9df26feda892ea56d109e19e2bf0 */ +import '../brave_overrides/config.js' - import 'chrome://resources/cr_elements/cr_expand_button/cr_expand_button.m.js'; + import 'chrome://resources/cr_elements/cr_expand_button/cr_expand_button.js'; import 'chrome://resources/cr_elements/cr_link_row/cr_link_row.js'; import 'chrome://resources/cr_elements/shared_style_css.m.js'; diff --git a/patches/chrome-browser-resources-signin-profile_picker-profile_creation_flow-local_profile_customization.html.patch b/patches/chrome-browser-resources-signin-profile_picker-profile_creation_flow-local_profile_customization.html.patch index 839ee79df222..e31569aa9626 100644 --- a/patches/chrome-browser-resources-signin-profile_picker-profile_creation_flow-local_profile_customization.html.patch +++ b/patches/chrome-browser-resources-signin-profile_picker-profile_creation_flow-local_profile_customization.html.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/signin/profile_picker/profile_creation_flow/local_profile_customization.html b/chrome/browser/resources/signin/profile_picker/profile_creation_flow/local_profile_customization.html -index b910e0777bc840b933f8dee4045475e6aeff1095..3ef8552de8f7e60cae3a194917ebb105a9505b52 100644 +index fdad2647151fa12b604f9693fac9318a52c5741d..1ffe2e5f8738f2dbfcad944f98930c087807318c 100644 --- a/chrome/browser/resources/signin/profile_picker/profile_creation_flow/local_profile_customization.html +++ b/chrome/browser/resources/signin/profile_picker/profile_creation_flow/local_profile_customization.html @@ -172,6 +172,7 @@ diff --git a/patches/chrome-browser-resources-signin-profile_picker-profile_picker_main_view.ts.patch b/patches/chrome-browser-resources-signin-profile_picker-profile_picker_main_view.ts.patch index 43c35236aa86..cfc365814960 100644 --- a/patches/chrome-browser-resources-signin-profile_picker-profile_picker_main_view.ts.patch +++ b/patches/chrome-browser-resources-signin-profile_picker-profile_picker_main_view.ts.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/signin/profile_picker/profile_picker_main_view.ts b/chrome/browser/resources/signin/profile_picker/profile_picker_main_view.ts -index 1682461bdaca21736376b1171acb192f550c9abe..6a2e467c71e24b1d29cd9a4102a2da1a97e8fb16 100644 +index 11e0702cc29e202fded0578313e8269e53e0b2bb..bea46298ee37c10edd7f7de38c48f7c701c8cafe 100644 --- a/chrome/browser/resources/signin/profile_picker/profile_picker_main_view.ts +++ b/chrome/browser/resources/signin/profile_picker/profile_picker_main_view.ts @@ -95,6 +95,7 @@ export class ProfilePickerMainViewElement extends diff --git a/patches/chrome-browser-resources-tools-build_webui.gni.patch b/patches/chrome-browser-resources-tools-build_webui.gni.patch index fc4f70e1da15..16e842dceed0 100644 --- a/patches/chrome-browser-resources-tools-build_webui.gni.patch +++ b/patches/chrome-browser-resources-tools-build_webui.gni.patch @@ -1,16 +1,16 @@ diff --git a/chrome/browser/resources/tools/build_webui.gni b/chrome/browser/resources/tools/build_webui.gni -index 3f5bee5aff4d4f7abadd6c31f98294670944dfa7..0bfd335629bd0f1c05820ff89aa8a8c94fca7373 100644 +index cc4a64c61b40e96f6395c57d319f2b1673c8c5e4..783797ce26b9043c1cb57b34dbac2c405a177be9 100644 --- a/chrome/browser/resources/tools/build_webui.gni +++ b/chrome/browser/resources/tools/build_webui.gni -@@ -200,6 +200,7 @@ template("build_webui") { - } - extra_deps += [ ":copy_mojo" ] +@@ -230,6 +230,7 @@ template("build_webui") { + if (defined(invoker.ts_extra_deps)) { + extra_deps += invoker.ts_extra_deps } + if (defined(invoker.extra_build_ts_in_files)) { in_files += invoker.extra_build_ts_in_files } if (defined(invoker.extra_build_ts_extra_deps)) { extra_deps += invoker.extra_build_ts_extra_deps } } if (optimize) { -@@ -243,6 +244,7 @@ template("build_webui") { +@@ -277,6 +278,7 @@ template("build_webui") { deps += invoker.extra_grdp_deps grdp_files = invoker.extra_grdp_files } diff --git a/patches/chrome-browser-resources-tools-optimize_webui.gni.patch b/patches/chrome-browser-resources-tools-optimize_webui.gni.patch index 03d07a977d14..33159a86a9c0 100644 --- a/patches/chrome-browser-resources-tools-optimize_webui.gni.patch +++ b/patches/chrome-browser-resources-tools-optimize_webui.gni.patch @@ -1,12 +1,12 @@ diff --git a/chrome/browser/resources/tools/optimize_webui.gni b/chrome/browser/resources/tools/optimize_webui.gni -index d3461400579c1ee232b2561805fafb1a4a3dba25..4757139a5c0ad526544ceda15ec0a84caa0ad30e 100644 +index 25732ec00e575af482bfe95cd479633679eb0b16..e7e76240532c5a4a01470373ce83ec00e16e632f 100644 --- a/chrome/browser/resources/tools/optimize_webui.gni +++ b/chrome/browser/resources/tools/optimize_webui.gni -@@ -56,6 +56,7 @@ template("optimize_webui") { +@@ -69,6 +69,7 @@ template("optimize_webui") { "//resources/polymer/v3_0/|$polymer_path", "//resources/|$resources_path", ] + import("//brave/browser/resources/tools/brave_optimize_webui.gni") deps += brave_webui_deps external_paths += brave_webui_external_paths + if (defined(invoker.external_paths)) { external_paths += invoker.external_paths - } diff --git a/patches/chrome-browser-resources-tools-optimize_webui.py.patch b/patches/chrome-browser-resources-tools-optimize_webui.py.patch index 0b2b3168f52d..c8b51d8e2206 100644 --- a/patches/chrome-browser-resources-tools-optimize_webui.py.patch +++ b/patches/chrome-browser-resources-tools-optimize_webui.py.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/tools/optimize_webui.py b/chrome/browser/resources/tools/optimize_webui.py -index ce857d278f507425b2fd11d8929c8103a1f8957b..4a26b2c2f1bc2e602a640bd7afd65519334f9ec0 100755 +index 17d94213984d1484f451065fcc55e9d6648aa892..d1a5e0953aef9fc4d89a6bfe18b50fb3a751cccf 100755 --- a/chrome/browser/resources/tools/optimize_webui.py +++ b/chrome/browser/resources/tools/optimize_webui.py @@ -44,6 +44,9 @@ def _request_list_path(out_path, target_name): diff --git a/patches/chrome-browser-safe_browsing-download_protection-check_client_download_request_base.cc.patch b/patches/chrome-browser-safe_browsing-download_protection-check_client_download_request_base.cc.patch index 1fcdf4a2d48f..9f5ca813f409 100644 --- a/patches/chrome-browser-safe_browsing-download_protection-check_client_download_request_base.cc.patch +++ b/patches/chrome-browser-safe_browsing-download_protection-check_client_download_request_base.cc.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/safe_browsing/download_protection/check_client_download_request_base.cc b/chrome/browser/safe_browsing/download_protection/check_client_download_request_base.cc -index 075a150f48d021d8f7aa400fee6fc74e9bda6cad..ccb13b51867ed3f48fad2ca909a250b148b6b156 100644 +index 27e427cd7b58a9ea14184a29ea3154d213ff4afc..baf644f9b05c95e1555d9f64b48c2eb94cde39e7 100644 --- a/chrome/browser/safe_browsing/download_protection/check_client_download_request_base.cc +++ b/chrome/browser/safe_browsing/download_protection/check_client_download_request_base.cc @@ -282,6 +282,7 @@ void CheckClientDownloadRequestBase::OnRequestBuilt( diff --git a/patches/chrome-browser-sync-sync_service_factory.cc.patch b/patches/chrome-browser-sync-sync_service_factory.cc.patch index f714452277d4..e9e45dd29647 100644 --- a/patches/chrome-browser-sync-sync_service_factory.cc.patch +++ b/patches/chrome-browser-sync-sync_service_factory.cc.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/sync/sync_service_factory.cc b/chrome/browser/sync/sync_service_factory.cc -index 2570d93be4632e58485dc0745fbff375e721ebf1..c2f160ffb6b9cc7f93633456142704bcb5a8d723 100644 +index 1df51b258751d870958c39d0882b51137c8d934e..c2fd942bf101cc0d70436c21be7ef69aa36cfa69 100644 --- a/chrome/browser/sync/sync_service_factory.cc +++ b/chrome/browser/sync/sync_service_factory.cc @@ -155,7 +155,7 @@ std::unique_ptr BuildSyncService( diff --git a/patches/chrome-browser-ui-BUILD.gn.patch b/patches/chrome-browser-ui-BUILD.gn.patch index 88025aaec463..16050fbbd5ff 100644 --- a/patches/chrome-browser-ui-BUILD.gn.patch +++ b/patches/chrome-browser-ui-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn -index 3f4929cc5078cea1eac968ef41818823223da20d..ec8bde62a3a8dd0630ad88fba9b3c1faa2d25ad1 100644 +index 17c1f3e28c73a81a652057018d4c02b080576ba7..066ff2f1f0450052859fa8721fdf17d0dba7edcb 100644 --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn -@@ -656,6 +656,7 @@ static_library("ui") { +@@ -658,6 +658,7 @@ static_library("ui") { "//ui/webui", "//v8:v8_version", ] @@ -10,7 +10,7 @@ index 3f4929cc5078cea1eac968ef41818823223da20d..ec8bde62a3a8dd0630ad88fba9b3c1fa # TODO(crbug/925153): Remove this circular dependency. allow_circular_includes_from = [ -@@ -3891,10 +3892,13 @@ static_library("ui") { +@@ -3927,10 +3928,13 @@ static_library("ui") { ] deps += [ "//google_update" ] } else { @@ -27,4 +27,4 @@ index 3f4929cc5078cea1eac968ef41818823223da20d..ec8bde62a3a8dd0630ad88fba9b3c1fa + } } } else { # 'OS!="win" - # The Cast Linux build sets toolkit_views to false, but many files in this + if (toolkit_views) { diff --git a/patches/chrome-browser-ui-android-toolbar-BUILD.gn.patch b/patches/chrome-browser-ui-android-toolbar-BUILD.gn.patch index 461dba6cc5f7..8c09a3f301d5 100644 --- a/patches/chrome-browser-ui-android-toolbar-BUILD.gn.patch +++ b/patches/chrome-browser-ui-android-toolbar-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/android/toolbar/BUILD.gn b/chrome/browser/ui/android/toolbar/BUILD.gn -index 5468e76a9ecda1bbc11949b57e28da56465aa643..6ba31f378a732424c4fbcab70a9deffbd19e8216 100644 +index 56e3c249e07faba4dbe29e922976301f082dca23..f65661a7dac290bfefe5cd55156caf431522d22d 100644 --- a/chrome/browser/ui/android/toolbar/BUILD.gn +++ b/chrome/browser/ui/android/toolbar/BUILD.gn -@@ -107,6 +107,7 @@ android_library("java") { +@@ -108,6 +108,7 @@ android_library("java") { "java/src/org/chromium/chrome/browser/toolbar/top/TopToolbarSceneLayer.java", "java/src/org/chromium/chrome/browser/toolbar/top/ViewShiftingActionBarDelegate.java", ] diff --git a/patches/chrome-browser-ui-android-toolbar-java-src-org-chromium-chrome-browser-toolbar-top-ToolbarPhone.java.patch b/patches/chrome-browser-ui-android-toolbar-java-src-org-chromium-chrome-browser-toolbar-top-ToolbarPhone.java.patch index 213a49a93f2e..b6f85e0e086a 100644 --- a/patches/chrome-browser-ui-android-toolbar-java-src-org-chromium-chrome-browser-toolbar-top-ToolbarPhone.java.patch +++ b/patches/chrome-browser-ui-android-toolbar-java-src-org-chromium-chrome-browser-toolbar-top-ToolbarPhone.java.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhone.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhone.java -index 8467d48c8ed880cbb4ce0f1f6b80592b35df22c0..3df0f5e806acdb911a9e2048e5b2a0cb3588de26 100644 +index 5a74100694c6f1744e0e3f06413fad2eebccf273..f7f29959d59d30459639ef8f19e0c3195334f270 100644 --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhone.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhone.java -@@ -433,6 +433,7 @@ public class ToolbarPhone extends ToolbarLayout implements OnClickListener, TabC +@@ -373,6 +373,7 @@ public class ToolbarPhone extends ToolbarLayout implements OnClickListener, TabC if (mOptionalButton != null) { mOptionalButton.setBackgroundColorFilter(color); } @@ -10,7 +10,7 @@ index 8467d48c8ed880cbb4ce0f1f6b80592b35df22c0..3df0f5e806acdb911a9e2048e5b2a0cb } /** -@@ -550,6 +551,7 @@ public class ToolbarPhone extends ToolbarLayout implements OnClickListener, TabC +@@ -490,6 +491,7 @@ public class ToolbarPhone extends ToolbarLayout implements OnClickListener, TabC EventConstants.PARTNER_HOME_PAGE_BUTTON_PRESSED); } } @@ -18,7 +18,7 @@ index 8467d48c8ed880cbb4ce0f1f6b80592b35df22c0..3df0f5e806acdb911a9e2048e5b2a0cb } @Override -@@ -743,6 +745,7 @@ public class ToolbarPhone extends ToolbarLayout implements OnClickListener, TabC +@@ -681,6 +683,7 @@ public class ToolbarPhone extends ToolbarLayout implements OnClickListener, TabC * @return The right bounds of the location bar after accounting for any visible right buttons. */ private int getBoundsAfterAccountingForRightButtons() { @@ -26,7 +26,7 @@ index 8467d48c8ed880cbb4ce0f1f6b80592b35df22c0..3df0f5e806acdb911a9e2048e5b2a0cb if (mStartSurfaceScrollFraction == 1.0f) return mToolbarSidePadding; int toolbarButtonsContainerWidth = mToolbarButtonsContainer.getMeasuredWidth(); -@@ -1008,6 +1011,7 @@ public class ToolbarPhone extends ToolbarLayout implements OnClickListener, TabC +@@ -930,6 +933,7 @@ public class ToolbarPhone extends ToolbarLayout implements OnClickListener, TabC * New Tab Page. */ private void updateLocationBarLayoutForExpansionAnimation() { @@ -34,7 +34,7 @@ index 8467d48c8ed880cbb4ce0f1f6b80592b35df22c0..3df0f5e806acdb911a9e2048e5b2a0cb TraceEvent.begin("ToolbarPhone.updateLocationBarLayoutForExpansionAnimation"); if (mOptimizationsEnabled && isInTabSwitcherMode()) return; -@@ -2148,6 +2152,7 @@ public class ToolbarPhone extends ToolbarLayout implements OnClickListener, TabC +@@ -1913,6 +1917,7 @@ public class ToolbarPhone extends ToolbarLayout implements OnClickListener, TabC } else { populateUrlClearExpansionAnimatorSet(animators); } diff --git a/patches/chrome-browser-ui-android-toolbar-java-src-org-chromium-chrome-browser-toolbar-top-ToolbarTablet.java.patch b/patches/chrome-browser-ui-android-toolbar-java-src-org-chromium-chrome-browser-toolbar-top-ToolbarTablet.java.patch index 414d444d400a..356be4d1ac8a 100644 --- a/patches/chrome-browser-ui-android-toolbar-java-src-org-chromium-chrome-browser-toolbar-top-ToolbarTablet.java.patch +++ b/patches/chrome-browser-ui-android-toolbar-java-src-org-chromium-chrome-browser-toolbar-top-ToolbarTablet.java.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarTablet.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarTablet.java -index f5ef4e651f5bf8f9fc4078f591cfe89fb1cb92e6..23c432537bc14d071074fe7188033f3c932d1afa 100644 +index 1da8855b710eadd167f39d8582fa360c44a0e4a8..4a76c8e55b8476b8a6b5f040f40b8c9dcf20ceff 100644 --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarTablet.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarTablet.java -@@ -351,10 +351,12 @@ public class ToolbarTablet +@@ -353,10 +353,12 @@ public class ToolbarTablet mOfflineDownloader.downloadPage(getContext(), getToolbarDataProvider().getTab()); RecordUserAction.record("MobileToolbarDownloadPage"); } @@ -15,8 +15,8 @@ index f5ef4e651f5bf8f9fc4078f591cfe89fb1cb92e6..23c432537bc14d071074fe7188033f3c String description = null; Context context = getContext(); Resources resources = context.getResources(); -@@ -431,6 +433,7 @@ public class ToolbarTablet - mLocationBar.getTabletCoordinator().getBackground().setTint(textBoxColor); +@@ -434,6 +436,7 @@ public class ToolbarTablet + mLocationBar.getTabletCoordinator().tintBackground(textBoxColor); mLocationBar.updateVisualsForState(); setToolbarHairlineColor(color); + super.onThemeColorChanged(color, shouldAnimate); diff --git a/patches/chrome-browser-ui-browser.cc.patch b/patches/chrome-browser-ui-browser.cc.patch index a9febc94580e..01f5e17f758a 100644 --- a/patches/chrome-browser-ui-browser.cc.patch +++ b/patches/chrome-browser-ui-browser.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc -index 9347ea3c71b79486c7db064faf2dbfa976c82ce9..5dc83e4a5773c853d89a8dac0dbf01ac4280c3fd 100644 +index 244584b4df1fb85241212c44cca7da3e87c174f3..bdf4ea559179e8e27fc2d8a2dc660210f02fc017 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc -@@ -453,6 +453,7 @@ Browser* Browser::Create(const CreateParams& params) { +@@ -454,6 +454,7 @@ Browser* Browser::Create(const CreateParams& params) { // not possible, e.g. using the wrong profile or during shutdown. The caller // should handle this; see e.g. crbug.com/1141608 and crbug.com/1261628. CHECK_EQ(CreationStatus::kOk, GetCreationStatusForProfile(params.profile)); @@ -10,7 +10,7 @@ index 9347ea3c71b79486c7db064faf2dbfa976c82ce9..5dc83e4a5773c853d89a8dac0dbf01ac return new Browser(params); } -@@ -463,7 +464,7 @@ Browser::Browser(const CreateParams& params) +@@ -464,7 +465,7 @@ Browser::Browser(const CreateParams& params) window_(nullptr), tab_strip_model_delegate_( std::make_unique(this)), diff --git a/patches/chrome-browser-ui-browser_navigator.cc.patch b/patches/chrome-browser-ui-browser_navigator.cc.patch index 6680cb7edfa8..cb20099d361a 100644 --- a/patches/chrome-browser-ui-browser_navigator.cc.patch +++ b/patches/chrome-browser-ui-browser_navigator.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc -index 36244f0893bc6a6ae16c025868d10a3e329e1bf1..0aea561aad68ac09a6bc3477f8e76db39477cebb 100644 +index ef9eff48c64982cda8ce9371df5feb1cf0f12c71..3668772db3d8b4084521f01ac6a3179654ab2bd4 100644 --- a/chrome/browser/ui/browser_navigator.cc +++ b/chrome/browser/ui/browser_navigator.cc -@@ -602,6 +602,7 @@ base::WeakPtr Navigate(NavigateParams* params) { +@@ -598,6 +598,7 @@ base::WeakPtr Navigate(NavigateParams* params) { // Block any navigation requests in locked fullscreen mode. return nullptr; } @@ -10,7 +10,7 @@ index 36244f0893bc6a6ae16c025868d10a3e329e1bf1..0aea561aad68ac09a6bc3477f8e76db3 // Open System Apps in their standalone window if necessary. // TODO(crbug.com/1096345): Remove this code after we integrate with intent -@@ -898,6 +899,7 @@ base::WeakPtr Navigate(NavigateParams* params) { +@@ -891,6 +892,7 @@ base::WeakPtr Navigate(NavigateParams* params) { bool IsHostAllowedInIncognito(const GURL& url) { std::string scheme = url.scheme(); base::StringPiece host = url.host_piece(); diff --git a/patches/chrome-browser-ui-color-BUILD.gn.patch b/patches/chrome-browser-ui-color-BUILD.gn.patch index 7da1a1b6e2a4..089d390351cd 100644 --- a/patches/chrome-browser-ui-color-BUILD.gn.patch +++ b/patches/chrome-browser-ui-color-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/ui/color/BUILD.gn b/chrome/browser/ui/color/BUILD.gn -index 99e5a81eeab7f28e96cd0232ce922c9b1024f09d..1734e90b594d6693f98b7ea9682e6dce1bfc9cb0 100644 +index be4803fdbc2dc14f9aa0547015a679ab286b2b9e..5754cf328b34f0ec64919250d89b50adaf7695c3 100644 --- a/chrome/browser/ui/color/BUILD.gn +++ b/chrome/browser/ui/color/BUILD.gn @@ -38,6 +38,7 @@ source_set("mixers") { diff --git a/patches/chrome-browser-ui-extensions-extension_action_view_controller.cc.patch b/patches/chrome-browser-ui-extensions-extension_action_view_controller.cc.patch index 00708af88747..10c837839edf 100644 --- a/patches/chrome-browser-ui-extensions-extension_action_view_controller.cc.patch +++ b/patches/chrome-browser-ui-extensions-extension_action_view_controller.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/extensions/extension_action_view_controller.cc b/chrome/browser/ui/extensions/extension_action_view_controller.cc -index 9bee2af486635c708418259de379c26f74d04a2c..d357be81e3620f1c6250801e63fd4814a1aa2814 100644 +index 39aaa2064a84c40fe19064d7cef6494357f260bf..1172b70fd548f831b03333a566b46e0aed149770 100644 --- a/chrome/browser/ui/extensions/extension_action_view_controller.cc +++ b/chrome/browser/ui/extensions/extension_action_view_controller.cc -@@ -65,7 +65,6 @@ ExtensionActionViewController::Create( +@@ -67,7 +67,6 @@ ExtensionActionViewController::Create( Browser* browser, ExtensionsContainer* extensions_container) { DCHECK(browser); diff --git a/patches/chrome-browser-ui-extensions-extension_action_view_controller.h.patch b/patches/chrome-browser-ui-extensions-extension_action_view_controller.h.patch index 156442fa84d0..704fe9eae4d2 100644 --- a/patches/chrome-browser-ui-extensions-extension_action_view_controller.h.patch +++ b/patches/chrome-browser-ui-extensions-extension_action_view_controller.h.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/ui/extensions/extension_action_view_controller.h b/chrome/browser/ui/extensions/extension_action_view_controller.h -index 7248884f6368fb0f9e15e2fdbb6b013799b6839a..44104470e81ad3402ce22721c18a451f8c706bce 100644 +index 00aec3dbade1b321f5ea0cec2552d199da2f62b4..9195758012ae7dd6732ebfcc5370d57c4d888c49 100644 --- a/chrome/browser/ui/extensions/extension_action_view_controller.h +++ b/chrome/browser/ui/extensions/extension_action_view_controller.h @@ -18,6 +18,7 @@ diff --git a/patches/chrome-browser-ui-extensions-icon_with_badge_image_source.h.patch b/patches/chrome-browser-ui-extensions-icon_with_badge_image_source.h.patch index 2e21d6795497..c0d376901691 100644 --- a/patches/chrome-browser-ui-extensions-icon_with_badge_image_source.h.patch +++ b/patches/chrome-browser-ui-extensions-icon_with_badge_image_source.h.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/ui/extensions/icon_with_badge_image_source.h b/chrome/browser/ui/extensions/icon_with_badge_image_source.h -index c27ce4b3826b9871e512f6d2535c9a2d6c124996..2a9836b67082fa008408460f4213f7d4d9e04d31 100644 +index 033c1667fe943a983d52d4b5551364998489e8cb..687599bc46410d09553fabf3f3eab1a6d4a3f52f 100644 --- a/chrome/browser/ui/extensions/icon_with_badge_image_source.h +++ b/chrome/browser/ui/extensions/icon_with_badge_image_source.h @@ -62,6 +62,7 @@ class IconWithBadgeImageSource : public gfx::CanvasImageSource { diff --git a/patches/chrome-browser-ui-startup-startup_browser_creator_impl.cc.patch b/patches/chrome-browser-ui-startup-startup_browser_creator_impl.cc.patch index cb7b6596ed6f..32f74f58a221 100644 --- a/patches/chrome-browser-ui-startup-startup_browser_creator_impl.cc.patch +++ b/patches/chrome-browser-ui-startup-startup_browser_creator_impl.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/startup/startup_browser_creator_impl.cc b/chrome/browser/ui/startup/startup_browser_creator_impl.cc -index 9849f42ce78fcdca2b768ab457bf2352bbf8e6a8..7411d746d570eb85269c17c2d3d15d3df2c3a02f 100644 +index 66d8732483ecf1935a7e972df1f57454dc518ec3..df82159a7daa2ae565d39018ac10cfb0dbd41526 100644 --- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc +++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc -@@ -382,6 +382,7 @@ StartupBrowserCreatorImpl::DetermineURLsAndLaunch( +@@ -381,6 +381,7 @@ StartupBrowserCreatorImpl::DetermineURLsAndLaunch( #elif !BUILDFLAG(IS_CHROMEOS_ASH) welcome_enabled = welcome::IsEnabled(profile_) && welcome::HasModulesToShow(profile_); diff --git a/patches/chrome-browser-ui-tab_helpers.cc.patch b/patches/chrome-browser-ui-tab_helpers.cc.patch index 2729876b3e4f..4f6891a060fe 100644 --- a/patches/chrome-browser-ui-tab_helpers.cc.patch +++ b/patches/chrome-browser-ui-tab_helpers.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc -index c03d79f67c4494143be99a1b9f4c129e8afa7211..98dc3de2271d237fe491a9c5ad89a1783102832a 100644 +index fdcb0ebb3c52b384a7dba616a0429042c4c220d2..c775fcbf3e3adee9ddde6972023b56473abc34a6 100644 --- a/chrome/browser/ui/tab_helpers.cc +++ b/chrome/browser/ui/tab_helpers.cc -@@ -646,4 +646,5 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { +@@ -645,4 +645,5 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { // This is common code for all of us. PLEASE DO YOUR PART to keep it tidy and // organized. diff --git a/patches/chrome-browser-ui-tabs-tab_strip_model.h.patch b/patches/chrome-browser-ui-tabs-tab_strip_model.h.patch index 25086c5245d8..2bd808df7a67 100644 --- a/patches/chrome-browser-ui-tabs-tab_strip_model.h.patch +++ b/patches/chrome-browser-ui-tabs-tab_strip_model.h.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/tabs/tab_strip_model.h b/chrome/browser/ui/tabs/tab_strip_model.h -index b55c2cc9c777a69d9a597e8c39a465f53bf822bb..a1162f255fe2420a5b30610856497be382bb2736 100644 +index 33e44b494be73cbdf594a48945ccba1b6d1f1b06..c58cb43afb742773764cb5e96ae9111c58176e81 100644 --- a/chrome/browser/ui/tabs/tab_strip_model.h +++ b/chrome/browser/ui/tabs/tab_strip_model.h -@@ -647,6 +647,7 @@ class TabStripModel : public TabGroupController { +@@ -573,6 +573,7 @@ class TabStripModel : public TabGroupController { // Serialise this object into a trace. void WriteIntoTrace(perfetto::TracedValue context) const; diff --git a/patches/chrome-browser-ui-toolbar-toolbar_actions_model.h.patch b/patches/chrome-browser-ui-toolbar-toolbar_actions_model.h.patch index 24762ccd26a0..2fcb0b7da63a 100644 --- a/patches/chrome-browser-ui-toolbar-toolbar_actions_model.h.patch +++ b/patches/chrome-browser-ui-toolbar-toolbar_actions_model.h.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/ui/toolbar/toolbar_actions_model.h b/chrome/browser/ui/toolbar/toolbar_actions_model.h -index 8e7b4ce5da0412d3a11882e5c7172fe441e07c94..a407351635b9de2de3c2b6b9d4610c9c3d990295 100644 +index a8c2e54cfb4a58315f49a52212b35213b4b27091..d607c836e98c56ffbb8130b745ebd5f6aacb6d7a 100644 --- a/chrome/browser/ui/toolbar/toolbar_actions_model.h +++ b/chrome/browser/ui/toolbar/toolbar_actions_model.h @@ -27,6 +27,7 @@ class Browser; @@ -18,7 +18,7 @@ index 8e7b4ce5da0412d3a11882e5c7172fe441e07c94..a407351635b9de2de3c2b6b9d4610c9c using ActionId = std::string; ToolbarActionsModel(Profile* profile, -@@ -174,7 +176,7 @@ class ToolbarActionsModel : public extensions::ExtensionActionAPI::Observer, +@@ -176,7 +178,7 @@ class ToolbarActionsModel : public extensions::ExtensionActionAPI::Observer, void RemovePref(const ActionId& action_id); // Returns true if the given |extension| should be added to the toolbar. diff --git a/patches/chrome-browser-ui-views-bookmarks-bookmark_bar_view.cc.patch b/patches/chrome-browser-ui-views-bookmarks-bookmark_bar_view.cc.patch index bd159dc0a263..003952ac0fa4 100644 --- a/patches/chrome-browser-ui-views-bookmarks-bookmark_bar_view.cc.patch +++ b/patches/chrome-browser-ui-views-bookmarks-bookmark_bar_view.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc -index 48cc9305c1129e470cfa4d26659caa06f45cae5c..1d1e80fa038fcc83a64d769b787e0b09fc1009ec 100644 +index 11eac50acea42b5fd53685546537f0508e1b9b71..cc0e3f7d62b30d05a2ad7a0a0b92a0d83b0b2294 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc +++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc -@@ -852,6 +852,7 @@ void BookmarkBarView::Layout() { +@@ -851,6 +851,7 @@ void BookmarkBarView::Layout() { x = next_x; } } diff --git a/patches/chrome-browser-ui-views-location_bar-icon_label_bubble_view.cc.patch b/patches/chrome-browser-ui-views-location_bar-icon_label_bubble_view.cc.patch index 4933e94b655c..fe85ed5e99ed 100644 --- a/patches/chrome-browser-ui-views-location_bar-icon_label_bubble_view.cc.patch +++ b/patches/chrome-browser-ui-views-location_bar-icon_label_bubble_view.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc -index b31d9187e518e0c62f1705a6b10335cfcc75975d..a2f29d20fe89d69773c5116da6c065774122817f 100644 +index de55c74df6f92fd981f702a95cde73f45e4e1b10..57c0d1546583c0b9f946371e91ccb910c555007f 100644 --- a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc +++ b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc -@@ -591,6 +591,7 @@ SkPath IconLabelBubbleView::GetHighlightPath() const { +@@ -598,6 +598,7 @@ SkPath IconLabelBubbleView::GetHighlightPath() const { const float corner_radius = highlight_bounds.height() / 2.f; const SkRect rect = RectToSkRect(highlight_bounds); diff --git a/patches/chrome-browser-ui-views-location_bar-location_bar_view.cc.patch b/patches/chrome-browser-ui-views-location_bar-location_bar_view.cc.patch index ccb2875bc187..be047eeb5202 100644 --- a/patches/chrome-browser-ui-views-location_bar-location_bar_view.cc.patch +++ b/patches/chrome-browser-ui-views-location_bar-location_bar_view.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc -index 99dddaa8d4f456488238dbd7210630958a0a1a7b..632e053042ebcf33dc62f199fa25b6e539f18065 100644 +index 1012d36ea3742b48c516d2b61921afec6a891e3f..b004da4ec0818a182ff399025c8ca28cc24f8532 100644 --- a/chrome/browser/ui/views/location_bar/location_bar_view.cc +++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc -@@ -663,6 +663,7 @@ void LocationBarView::Layout() { +@@ -650,6 +650,7 @@ void LocationBarView::Layout() { } }; diff --git a/patches/chrome-browser-ui-views-overlay-overlay_window_views.cc.patch b/patches/chrome-browser-ui-views-overlay-overlay_window_views.cc.patch index e6c421b64e9b..03fd7ea16639 100644 --- a/patches/chrome-browser-ui-views-overlay-overlay_window_views.cc.patch +++ b/patches/chrome-browser-ui-views-overlay-overlay_window_views.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/views/overlay/overlay_window_views.cc b/chrome/browser/ui/views/overlay/overlay_window_views.cc -index 55b53039e4db6afa197fbb61c40d0a21095c5bf9..185acd998cb7d4a4733406456bd166e7e411d9dc 100644 +index 590d247e1136b9ac5f766a613e8d91916eb0dda4..29a7e09cb817a307906fd50137d37c3527f135dd 100644 --- a/chrome/browser/ui/views/overlay/overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/overlay_window_views.cc -@@ -539,6 +539,7 @@ void OverlayWindowViews::UpdateMaxSize(const gfx::Rect& work_area) { +@@ -540,6 +540,7 @@ void OverlayWindowViews::UpdateMaxSize(const gfx::Rect& work_area) { max_size_ = new_max_size; diff --git a/patches/chrome-browser-ui-views-page_info-page_info_main_view.cc.patch b/patches/chrome-browser-ui-views-page_info-page_info_main_view.cc.patch index 03c09fb87835..5998220cf6c0 100644 --- a/patches/chrome-browser-ui-views-page_info-page_info_main_view.cc.patch +++ b/patches/chrome-browser-ui-views-page_info-page_info_main_view.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/views/page_info/page_info_main_view.cc b/chrome/browser/ui/views/page_info/page_info_main_view.cc -index 61db98363ffaec451bed8e7f8f9ca94812a0be27..9a6faee8a15ad1c2d31f3d42bcd4f1c447d0e927 100644 +index b753db83f82791a44c661c280db968338f34908a..c74824f4b6befd1991ac54a9dfb11c4a2a2ec8a0 100644 --- a/chrome/browser/ui/views/page_info/page_info_main_view.cc +++ b/chrome/browser/ui/views/page_info/page_info_main_view.cc -@@ -513,6 +513,7 @@ gfx::Size PageInfoMainView::CalculatePreferredSize() const { +@@ -525,6 +525,7 @@ gfx::Size PageInfoMainView::CalculatePreferredSize() const { if (site_settings_view_) { width = std::max(width, site_settings_view_->GetPreferredSize().width()); width = std::max(width, permissions_view_->GetPreferredSize().width()); diff --git a/patches/chrome-browser-ui-views-page_info-page_info_view_factory.cc.patch b/patches/chrome-browser-ui-views-page_info-page_info_view_factory.cc.patch index 2b58490984e6..7d6606e661ff 100644 --- a/patches/chrome-browser-ui-views-page_info-page_info_view_factory.cc.patch +++ b/patches/chrome-browser-ui-views-page_info-page_info_view_factory.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/views/page_info/page_info_view_factory.cc b/chrome/browser/ui/views/page_info/page_info_view_factory.cc -index dc8e531789711583b9dfc48e2efd2607de3fb3df..2fc87ce2096a165267fab545fd475d4498d7852d 100644 +index e1bf7517d869ecce079a77c7d2b1c19adfa02efe..95dc6525be4f906910644eb2653a50af3660e88f 100644 --- a/chrome/browser/ui/views/page_info/page_info_view_factory.cc +++ b/chrome/browser/ui/views/page_info/page_info_view_factory.cc -@@ -236,6 +236,7 @@ const ui::ImageModel PageInfoViewFactory::GetPermissionIcon( +@@ -244,6 +244,7 @@ const ui::ImageModel PageInfoViewFactory::GetPermissionIcon( const PageInfo::PermissionInfo& info) { const gfx::VectorIcon* icon = &gfx::kNoneIcon; switch (info.type) { diff --git a/patches/chrome-browser-ui-views-profiles-profile_menu_view.h.patch b/patches/chrome-browser-ui-views-profiles-profile_menu_view.h.patch index d289302d5240..145e7d181bfd 100644 --- a/patches/chrome-browser-ui-views-profiles-profile_menu_view.h.patch +++ b/patches/chrome-browser-ui-views-profiles-profile_menu_view.h.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/ui/views/profiles/profile_menu_view.h b/chrome/browser/ui/views/profiles/profile_menu_view.h -index 7981369bbd5c9d12fdefbdfa3d217f8d3bf041c0..31888bb9336df68e71d5717b1867fc0b62cac56c 100644 +index 65da61bb6d1b1174d70ca6e5962dc925b0195066..c9144fa70546b07cd4ddc6fa4125cde4e55c3fc5 100644 --- a/chrome/browser/ui/views/profiles/profile_menu_view.h +++ b/chrome/browser/ui/views/profiles/profile_menu_view.h @@ -46,6 +46,7 @@ class ProfileMenuView : public ProfileMenuViewBase { diff --git a/patches/chrome-browser-ui-views-profiles-profile_menu_view_base.h.patch b/patches/chrome-browser-ui-views-profiles-profile_menu_view_base.h.patch index f0bfb3888440..a640335fa3e3 100644 --- a/patches/chrome-browser-ui-views-profiles-profile_menu_view_base.h.patch +++ b/patches/chrome-browser-ui-views-profiles-profile_menu_view_base.h.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/views/profiles/profile_menu_view_base.h b/chrome/browser/ui/views/profiles/profile_menu_view_base.h -index d97e5066971ee22ddfe59fe12eef32e51b0578a7..8b39d999d4cec686cb52455d90d79e8ae9e89a1c 100644 +index 8b27c6ca2b77c8bfe39fe0bbda0f1846cd94d9a4..4d026f1679b5586ef31f88b201129107a0d0fb44 100644 --- a/chrome/browser/ui/views/profiles/profile_menu_view_base.h +++ b/chrome/browser/ui/views/profiles/profile_menu_view_base.h -@@ -167,6 +167,7 @@ class ProfileMenuViewBase : public content::WebContentsDelegate, +@@ -156,6 +156,7 @@ class ProfileMenuViewBase : public content::WebContentsDelegate, void set_perform_menu_actions_for_testing(bool perform_menu_actions) { perform_menu_actions_ = perform_menu_actions; } diff --git a/patches/chrome-browser-ui-views-send_tab_to_self-send_tab_to_self_device_picker_bubble_view.cc.patch b/patches/chrome-browser-ui-views-send_tab_to_self-send_tab_to_self_device_picker_bubble_view.cc.patch index 44f08092b1b9..85ce07c7fc19 100644 --- a/patches/chrome-browser-ui-views-send_tab_to_self-send_tab_to_self_device_picker_bubble_view.cc.patch +++ b/patches/chrome-browser-ui-views-send_tab_to_self-send_tab_to_self_device_picker_bubble_view.cc.patch @@ -1,12 +1,12 @@ diff --git a/chrome/browser/ui/views/send_tab_to_self/send_tab_to_self_device_picker_bubble_view.cc b/chrome/browser/ui/views/send_tab_to_self/send_tab_to_self_device_picker_bubble_view.cc -index d916dfe8d143101dd8dfc8a569bb5505c533963e..4cc4a190be358c5b0ee11ec6e35f2459831564c7 100644 +index da73f04a6ef437751b84f98a2bdd0e07835acaac..20eeee7e855a3f98eab4774b96142685bc6ae0d5 100644 --- a/chrome/browser/ui/views/send_tab_to_self/send_tab_to_self_device_picker_bubble_view.cc +++ b/chrome/browser/ui/views/send_tab_to_self/send_tab_to_self_device_picker_bubble_view.cc -@@ -122,6 +122,7 @@ void SendTabToSelfDevicePickerBubbleView::Init() { +@@ -125,6 +125,7 @@ void SendTabToSelfDevicePickerBubbleView::Init() { CreateHintTextLabel(); CreateDevicesScrollView(); + BRAVE_SEND_TAB_TO_SELFDEVICE_PICKER_BUBBLE_VIEW_INIT - AddChildView(BuildManageAccountDevicesLinkView(controller_)); - } - + AddChildView(std::make_unique()); + views::View* footer = AddChildView( + BuildManageAccountDevicesLinkView(/*show_link=*/true, controller_)); diff --git a/patches/chrome-browser-ui-views-side_panel-side_panel_coordinator.cc.patch b/patches/chrome-browser-ui-views-side_panel-side_panel_coordinator.cc.patch index 772c6e761100..a3172825634f 100644 --- a/patches/chrome-browser-ui-views-side_panel-side_panel_coordinator.cc.patch +++ b/patches/chrome-browser-ui-views-side_panel-side_panel_coordinator.cc.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/ui/views/side_panel/side_panel_coordinator.cc b/chrome/browser/ui/views/side_panel/side_panel_coordinator.cc -index 968b54c3d8bf6f52f6fa0cbf5ba143aca667c165..bcac2b3dac41977ec46a0aded2134d96a9b97cc2 100644 +index 2a457d0d6d8703366f1b93141640ed1c9e8529d1..53821406f1f9c3ef3919f0b53409e1071e52ce9a 100644 --- a/chrome/browser/ui/views/side_panel/side_panel_coordinator.cc +++ b/chrome/browser/ui/views/side_panel/side_panel_coordinator.cc @@ -175,6 +175,7 @@ SidePanelCoordinator::~SidePanelCoordinator() { @@ -10,7 +10,7 @@ index 968b54c3d8bf6f52f6fa0cbf5ba143aca667c165..bcac2b3dac41977ec46a0aded2134d96 if (!entry_id.has_value()) entry_id = GetLastActiveEntryId().value_or(kDefaultEntry); -@@ -483,6 +484,7 @@ std::unique_ptr SidePanelCoordinator::CreateHeader() { +@@ -494,6 +495,7 @@ std::unique_ptr SidePanelCoordinator::CreateHeader() { ChromeLayoutProvider::Get()->GetDistanceMetric( ChromeDistanceMetric::DISTANCE_SIDE_PANEL_HEADER_VECTOR_ICON_SIZE))); diff --git a/patches/chrome-browser-ui-views-tabs-tab_style_views.cc.patch b/patches/chrome-browser-ui-views-tabs-tab_style_views.cc.patch index 04e056dcdbb4..f9850071a292 100644 --- a/patches/chrome-browser-ui-views-tabs-tab_style_views.cc.patch +++ b/patches/chrome-browser-ui-views-tabs-tab_style_views.cc.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/ui/views/tabs/tab_style_views.cc b/chrome/browser/ui/views/tabs/tab_style_views.cc -index 385ed3e7675d23fd274c0fd53308de059f2a9056..be396888e54f69a5a7e8c8c1b29c77a30cba7eb7 100644 +index 0499d76e10b84a0959e1ec6dfbf875771b81ec2a..11a5d11d1cc395fbae90ce6c6bb33d0392c2d60a 100644 --- a/chrome/browser/ui/views/tabs/tab_style_views.cc +++ b/chrome/browser/ui/views/tabs/tab_style_views.cc @@ -74,6 +74,7 @@ class GM2TabStyle : public TabStyleViews { @@ -10,7 +10,7 @@ index 385ed3e7675d23fd274c0fd53308de059f2a9056..be396888e54f69a5a7e8c8c1b29c77a3 // Gets the bounds for the leading and trailing separators for a tab. SeparatorBounds GetSeparatorBounds(float scale) const; -@@ -291,6 +292,7 @@ SkPath GM2TabStyle::GetPath(PathType path_type, +@@ -285,6 +286,7 @@ SkPath GM2TabStyle::GetPath(PathType path_type, const ShapeModifier shape_modifier = GetShapeModifier(path_type); const bool extend_left_to_bottom = shape_modifier & kNoLowerLeftArc; const bool extend_right_to_bottom = shape_modifier & kNoLowerRightArc; @@ -18,7 +18,7 @@ index 385ed3e7675d23fd274c0fd53308de059f2a9056..be396888e54f69a5a7e8c8c1b29c77a3 SkPath path; -@@ -567,7 +569,7 @@ TabStyle::SeparatorBounds GM2TabStyle::GetSeparatorBounds(float scale) const { +@@ -561,7 +563,7 @@ TabStyle::SeparatorBounds GM2TabStyle::GetSeparatorBounds(float scale) const { separator_bounds.leading = gfx::RectF(aligned_bounds.x() + corner_radius, aligned_bounds.y() + @@ -27,7 +27,7 @@ index 385ed3e7675d23fd274c0fd53308de059f2a9056..be396888e54f69a5a7e8c8c1b29c77a3 separator_size.width(), separator_size.height()); separator_bounds.trailing = separator_bounds.leading; -@@ -937,12 +939,16 @@ void GM2TabStyle::PaintSeparators(gfx::Canvas* canvas) const { +@@ -911,12 +913,16 @@ void GM2TabStyle::PaintSeparators(gfx::Canvas* canvas) const { SK_AlphaOPAQUE)); }; diff --git a/patches/chrome-browser-ui-views-toolbar-toolbar_view.cc.patch b/patches/chrome-browser-ui-views-toolbar-toolbar_view.cc.patch index 82c1f8eb3ee1..8402100afa21 100644 --- a/patches/chrome-browser-ui-views-toolbar-toolbar_view.cc.patch +++ b/patches/chrome-browser-ui-views-toolbar-toolbar_view.cc.patch @@ -1,12 +1,12 @@ diff --git a/chrome/browser/ui/views/toolbar/toolbar_view.cc b/chrome/browser/ui/views/toolbar/toolbar_view.cc -index ef34f041219b57493503d3dda3345f5a76cb2eec..5c421e824b43a6a497531ffbfc496c31c1fbf654 100644 +index 370b4898ca6ca0b2489b0ee16a6d02fde69dd6cc..a2a1fd16d167f7de3c043907c065fd7b028de63b 100644 --- a/chrome/browser/ui/views/toolbar/toolbar_view.cc +++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc -@@ -365,6 +365,7 @@ void ToolbarView::Init() { - } else { - // TODO(crbug.com/932818): Remove this once the - // |kAutofillEnableToolbarStatusChip| is fully launched. -+ BRAVE_TOOLBAR_VIEW_INIT - avatar_ = - AddChildView(std::make_unique(browser_view_)); - avatar_->SetVisible(show_avatar_toolbar_button); +@@ -338,6 +338,7 @@ void ToolbarView::Init() { + if (side_panel_button) + side_panel_button_ = AddChildView(std::move(side_panel_button)); + ++ BRAVE_TOOLBAR_VIEW_INIT + avatar_ = AddChildView(std::make_unique(browser_view_)); + bool show_avatar_toolbar_button = true; + #if BUILDFLAG(IS_CHROMEOS_ASH) diff --git a/patches/chrome-browser-ui-webui-BUILD.gn.patch b/patches/chrome-browser-ui-webui-BUILD.gn.patch index 54e963075498..a84f3e0d3a68 100644 --- a/patches/chrome-browser-ui-webui-BUILD.gn.patch +++ b/patches/chrome-browser-ui-webui-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/webui/BUILD.gn b/chrome/browser/ui/webui/BUILD.gn -index 2f2ac276d6b0da6c4898da4ea3d6ef2bc8230232..91eaf53c9a5fa4e844a878066b6d991009294f7f 100644 +index d8d8de838d504be2bfa22ad911d6e3773f1136fd..3bfc90d02418ae0f3244cd88db778f133ccbbe62 100644 --- a/chrome/browser/ui/webui/BUILD.gn +++ b/chrome/browser/ui/webui/BUILD.gn -@@ -64,4 +64,5 @@ source_set("configs") { +@@ -66,4 +66,5 @@ source_set("configs") { ] } } diff --git a/patches/chrome-browser-ui-webui-chrome_web_ui_controller_factory.cc.patch b/patches/chrome-browser-ui-webui-chrome_web_ui_controller_factory.cc.patch index e0e113b5ba45..8e1597ed0ee3 100644 --- a/patches/chrome-browser-ui-webui-chrome_web_ui_controller_factory.cc.patch +++ b/patches/chrome-browser-ui-webui-chrome_web_ui_controller_factory.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc -index e7e355af6fb92e3a4f7563442ac3fe453b1c3a71..54e3257d16920f90e8d0861f144d390823a6746b 100644 +index 822f9cdc574288cdc03b10b8b83eca083ee97b5a..2c82c757b0b9574b03e672bebdb6d18c174236f2 100644 --- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc +++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc -@@ -1433,6 +1433,7 @@ void ChromeWebUIControllerFactory::GetFaviconForURL( +@@ -1436,6 +1436,7 @@ void ChromeWebUIControllerFactory::GetFaviconForURL( // static ChromeWebUIControllerFactory* ChromeWebUIControllerFactory::GetInstance() { diff --git a/patches/chrome-browser-ui-webui-extensions-extensions_ui.cc.patch b/patches/chrome-browser-ui-webui-extensions-extensions_ui.cc.patch index 49b4caaa1cde..569b82260d2b 100644 --- a/patches/chrome-browser-ui-webui-extensions-extensions_ui.cc.patch +++ b/patches/chrome-browser-ui-webui-extensions-extensions_ui.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/webui/extensions/extensions_ui.cc b/chrome/browser/ui/webui/extensions/extensions_ui.cc -index c65009de2283b94623895cb4a4200b2ea6700b8a..a39bff5202b03d32317fd3f097c84a72515df787 100644 +index 4c3f9b2c3fb5eba1ae4447882b8b4b204d096ffc..01f6896722ef57d47a02a205fa6dcab623800356 100644 --- a/chrome/browser/ui/webui/extensions/extensions_ui.cc +++ b/chrome/browser/ui/webui/extensions/extensions_ui.cc -@@ -370,6 +370,8 @@ content::WebUIDataSource* CreateExtensionsSource(Profile* profile, +@@ -374,6 +374,8 @@ content::WebUIDataSource* CreateExtensionsSource(Profile* profile, base::FeatureList::IsEnabled( extensions_features::kExtensionsMenuAccessControl)); diff --git a/patches/chrome-browser-ui-webui-settings-import_data_handler.cc.patch b/patches/chrome-browser-ui-webui-settings-import_data_handler.cc.patch index 31a9428d47e9..0ade0dcf477e 100644 --- a/patches/chrome-browser-ui-webui-settings-import_data_handler.cc.patch +++ b/patches/chrome-browser-ui-webui-settings-import_data_handler.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/webui/settings/import_data_handler.cc b/chrome/browser/ui/webui/settings/import_data_handler.cc -index 73ad5260441a8fec0482801847957c1d02e7ef5c..87fe3fd7f86251ddf6c7b9e186b9cfc80c5be58c 100644 +index 042b1f1c5a87a28e524b1c816a6ffa628cd07ef4..002a8acf009d41a93db33e74027f782da9b6200c 100644 --- a/chrome/browser/ui/webui/settings/import_data_handler.cc +++ b/chrome/browser/ui/webui/settings/import_data_handler.cc -@@ -130,6 +130,7 @@ void ImportDataHandler::HandleImportData(const base::Value::List& args) { +@@ -135,6 +135,7 @@ void ImportDataHandler::HandleImportData(const base::Value::List& args) { selected_items |= importer::PASSWORDS; if (*types.FindBoolKey(prefs::kImportDialogSearchEngine)) selected_items |= importer::SEARCH_ENGINES; @@ -10,7 +10,7 @@ index 73ad5260441a8fec0482801847957c1d02e7ef5c..87fe3fd7f86251ddf6c7b9e186b9cfc8 const importer::SourceProfile& source_profile = importer_list_->GetSourceProfileAt(browser_index); -@@ -208,6 +209,7 @@ void ImportDataHandler::SendBrowserProfileData(const std::string& callback_id) { +@@ -213,6 +214,7 @@ void ImportDataHandler::SendBrowserProfileData(const std::string& callback_id) { browser_profile.Set("autofillFormData", (browser_services & importer::AUTOFILL_FORM_DATA) != 0); diff --git a/patches/chrome-browser-ui-webui-settings-people_handler.cc.patch b/patches/chrome-browser-ui-webui-settings-people_handler.cc.patch index 07efe5da8db7..4b2551630355 100644 --- a/patches/chrome-browser-ui-webui-settings-people_handler.cc.patch +++ b/patches/chrome-browser-ui-webui-settings-people_handler.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/webui/settings/people_handler.cc b/chrome/browser/ui/webui/settings/people_handler.cc -index 6c2ec134c48c6c1811a98eb2ac71c545c8119b45..0085a999f1f8eac5dc52f4a901e4932653354f35 100644 +index 6eaf74064b4fcc9457c4f2ff3d7fce15a571a65c..3b9210f9264bea9094de4afa6882269cf172c205 100644 --- a/chrome/browser/ui/webui/settings/people_handler.cc +++ b/chrome/browser/ui/webui/settings/people_handler.cc -@@ -856,6 +856,7 @@ void PeopleHandler::OnStateChanged(syncer::SyncService* sync_service) { +@@ -855,6 +855,7 @@ void PeopleHandler::OnStateChanged(syncer::SyncService* sync_service) { void PeopleHandler::BeforeUnloadDialogCancelled() { // The before unload dialog is only shown during the first sync setup. @@ -10,7 +10,7 @@ index 6c2ec134c48c6c1811a98eb2ac71c545c8119b45..0085a999f1f8eac5dc52f4a901e49326 DCHECK(IdentityManagerFactory::GetForProfile(profile_)->HasPrimaryAccount( signin::ConsentLevel::kSync)); syncer::SyncService* service = GetSyncService(); -@@ -905,6 +906,7 @@ base::Value PeopleHandler::GetSyncStatusDictionary() const { +@@ -904,6 +905,7 @@ base::Value::Dict PeopleHandler::GetSyncStatusDictionary() const { service && !disallowed_by_policy && service->IsSetupInProgress() && !service->GetUserSettings()->IsFirstSetupComplete() && identity_manager->HasPrimaryAccount(signin::ConsentLevel::kSync)); @@ -18,7 +18,7 @@ index 6c2ec134c48c6c1811a98eb2ac71c545c8119b45..0085a999f1f8eac5dc52f4a901e49326 const SyncStatusLabels status_labels = GetSyncStatusLabels(profile_); // TODO(crbug.com/1027467): Consider unifying some of the fields below to -@@ -1071,6 +1073,7 @@ void PeopleHandler::MaybeMarkSyncConfiguring() { +@@ -1066,6 +1068,7 @@ void PeopleHandler::MaybeMarkSyncConfiguring() { } bool PeopleHandler::IsProfileAuthNeededOrHasErrors() { diff --git a/patches/chrome-browser-ui-webui-settings-settings_localized_strings_provider.cc.patch b/patches/chrome-browser-ui-webui-settings-settings_localized_strings_provider.cc.patch index 60219eeaf4df..a72927cc4c3a 100644 --- a/patches/chrome-browser-ui-webui-settings-settings_localized_strings_provider.cc.patch +++ b/patches/chrome-browser-ui-webui-settings-settings_localized_strings_provider.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc -index 29a39fe5bccbdfbb96c9f1a667af3b00759f1de4..e5c2b6a489eef0dec40cc4443bb0eb9699ca4be6 100644 +index de3ef4167bf07c8c6839003d03d92d1da269dc05..9cc9ddc251c80bc4a1e13981f00a58c564bf54c7 100644 --- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc +++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc -@@ -3145,6 +3145,7 @@ void AddLocalizedStrings(content::WebUIDataSource* html_source, +@@ -3159,6 +3159,7 @@ void AddLocalizedStrings(content::WebUIDataSource* html_source, policy_indicator::AddLocalizedStrings(html_source); AddSecurityKeysStrings(html_source); diff --git a/patches/chrome-browser-ui-webui-settings-site_settings_helper.cc.patch b/patches/chrome-browser-ui-webui-settings-site_settings_helper.cc.patch index 30d042ecf8ed..78a7c98e0b52 100644 --- a/patches/chrome-browser-ui-webui-settings-site_settings_helper.cc.patch +++ b/patches/chrome-browser-ui-webui-settings-site_settings_helper.cc.patch @@ -1,16 +1,16 @@ diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/browser/ui/webui/settings/site_settings_helper.cc -index 95b5df7e355303c42e8eb540643b9ce08dfccb18..38e2408496ecfab6330d53dcfa00684a71baabae 100644 +index ddc961b87e423c8f2d003e1ca3f13ca7b7d8db9f..a69f7ff56fb778408711a7fd5e20418fb7961cb4 100644 --- a/chrome/browser/ui/webui/settings/site_settings_helper.cc +++ b/chrome/browser/ui/webui/settings/site_settings_helper.cc -@@ -160,6 +160,7 @@ const ContentSettingsTypeNameEntry kContentSettingsTypeGroupNames[] = { - {ContentSettingsType::REQUEST_DESKTOP_SITE, nullptr}, +@@ -162,6 +162,7 @@ const ContentSettingsTypeNameEntry kContentSettingsTypeGroupNames[] = { {ContentSettingsType::GET_DISPLAY_MEDIA_SET_SELECT_ALL_SCREENS, nullptr}, {ContentSettingsType::NOTIFICATION_INTERACTIONS, nullptr}, + {ContentSettingsType::REDUCED_ACCEPT_LANGUAGE, nullptr}, + BRAVE_CONTENT_SETTINGS_TYPE_GROUP_NAMES_LIST }; static_assert(std::size(kContentSettingsTypeGroupNames) == -@@ -384,6 +385,7 @@ bool HasRegisteredGroupName(ContentSettingsType type) { +@@ -364,6 +365,7 @@ bool HasRegisteredGroupName(ContentSettingsType type) { } ContentSettingsType ContentSettingsTypeFromGroupName(base::StringPiece name) { diff --git a/patches/chrome-browser-web_applications-os_integration-web_app_shortcut_mac.mm.patch b/patches/chrome-browser-web_applications-os_integration-web_app_shortcut_mac.mm.patch index efe2d1f0c3f3..29836c3bcdb9 100644 --- a/patches/chrome-browser-web_applications-os_integration-web_app_shortcut_mac.mm.patch +++ b/patches/chrome-browser-web_applications-os_integration-web_app_shortcut_mac.mm.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/web_applications/os_integration/web_app_shortcut_mac.mm b/chrome/browser/web_applications/os_integration/web_app_shortcut_mac.mm -index 350370a75679a540d57b2d339b7545ec2f84212d..808ba974bccd3bded7dd6e8d24fe473c9e547bec 100644 +index b703ce74a4ac695d19706dc568026c1cbc71fab7..a016f92e62d1bceaf0f7807f8ed989dd3d4b6f65 100644 --- a/chrome/browser/web_applications/os_integration/web_app_shortcut_mac.mm +++ b/chrome/browser/web_applications/os_integration/web_app_shortcut_mac.mm -@@ -793,6 +793,7 @@ base::FilePath GetChromeAppsFolder() { +@@ -742,6 +742,7 @@ base::FilePath GetChromeAppsFolder() { if (path.empty()) return path; diff --git a/patches/chrome-common-BUILD.gn.patch b/patches/chrome-common-BUILD.gn.patch index 774b4e5a1d19..73f34f1d36ed 100644 --- a/patches/chrome-common-BUILD.gn.patch +++ b/patches/chrome-common-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn -index 20b82925438f560c26e1bd32f3bd1c9a0a6345ac..6810c6412b6cdf8bc882ddb57995dad04ad75499 100644 +index 0a12b557d74690e253ac96613c470aa7ab6c8b11..fd3ac2766de8a8b05bae00a51b5996ca8fa24c24 100644 --- a/chrome/common/BUILD.gn +++ b/chrome/common/BUILD.gn @@ -89,6 +89,7 @@ source_set("channel_info") { @@ -10,7 +10,7 @@ index 20b82925438f560c26e1bd32f3bd1c9a0a6345ac..6810c6412b6cdf8bc882ddb57995dad0 } source_set("ini_parser") { -@@ -535,6 +536,7 @@ static_library("non_code_constants") { +@@ -536,6 +537,7 @@ static_library("non_code_constants") { "//printing/buildflags", "//ui/base:buildflags", ] diff --git a/patches/chrome-common-extensions-api-developer_private.idl.patch b/patches/chrome-common-extensions-api-developer_private.idl.patch index 73531eef74d8..43a614d0a7d5 100644 --- a/patches/chrome-common-extensions-api-developer_private.idl.patch +++ b/patches/chrome-common-extensions-api-developer_private.idl.patch @@ -1,8 +1,8 @@ diff --git a/chrome/common/extensions/api/developer_private.idl b/chrome/common/extensions/api/developer_private.idl -index bb9b7822843468e50c85d47c2fa8adc1c1caccfc..65107aaccfbefc139bea83dd6e7050abec6ad077 100644 +index 9d9c9223c7a569f680133234871477fc27ff5574..d6587f574e9b719b1123066aaeecf98ec16fe9f1 100644 --- a/chrome/common/extensions/api/developer_private.idl +++ b/chrome/common/extensions/api/developer_private.idl -@@ -232,6 +232,7 @@ namespace developerPrivate { +@@ -233,6 +233,7 @@ namespace developerPrivate { DOMString iconUrl; DOMString id; AccessModifier incognitoAccess; diff --git a/patches/chrome-common-extensions-chrome_extensions_client.cc.patch b/patches/chrome-common-extensions-chrome_extensions_client.cc.patch index 87de0b52c85d..27255a6e425f 100644 --- a/patches/chrome-common-extensions-chrome_extensions_client.cc.patch +++ b/patches/chrome-common-extensions-chrome_extensions_client.cc.patch @@ -1,5 +1,5 @@ diff --git a/chrome/common/extensions/chrome_extensions_client.cc b/chrome/common/extensions/chrome_extensions_client.cc -index f7b8a689a2539f8415d606b61e36e29ac724aac6..b73f49914179010e5ed0c2b6c9a0586488d39baf 100644 +index 18ffa823eed934026f5f760cf8b35094548c8530..9f4de1a6b441ddcf38d0652beee4260af834c668 100644 --- a/chrome/common/extensions/chrome_extensions_client.cc +++ b/chrome/common/extensions/chrome_extensions_client.cc @@ -13,6 +13,7 @@ diff --git a/patches/chrome-installer-linux-BUILD.gn.patch b/patches/chrome-installer-linux-BUILD.gn.patch index c5ec70fba6f3..0aa7b4bfe05f 100644 --- a/patches/chrome-installer-linux-BUILD.gn.patch +++ b/patches/chrome-installer-linux-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/chrome/installer/linux/BUILD.gn b/chrome/installer/linux/BUILD.gn -index c0d81d6ffb9640ef96f895868345b38c514a2869..06c0e3839d90e07654d1f6bb56c4b612827c0a8e 100644 +index a96472b11824123801b89353350eafab5b5a6a05..1488c34247d42c8fdb111eb444964cfd25ea79e2 100644 --- a/chrome/installer/linux/BUILD.gn +++ b/chrome/installer/linux/BUILD.gn @@ -89,6 +89,7 @@ if (build_with_internal_optimization_guide) { diff --git a/patches/chrome-installer-mac-BUILD.gn.patch b/patches/chrome-installer-mac-BUILD.gn.patch index c49a543c0678..e876e6a7973f 100644 --- a/patches/chrome-installer-mac-BUILD.gn.patch +++ b/patches/chrome-installer-mac-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/chrome/installer/mac/BUILD.gn b/chrome/installer/mac/BUILD.gn -index 4d5e867b30661bb5b316088dd86657e4394fa9ed..508769a521dac1162afc85324b9753674ff7ee2d 100644 +index 3fdf2271b95d225eedaaa2291b3f524067c1eb48..601fe99d2c73e8c90238f21bbe57d1d03b822354 100644 --- a/chrome/installer/mac/BUILD.gn +++ b/chrome/installer/mac/BUILD.gn @@ -18,7 +18,8 @@ group("mac") { diff --git a/patches/chrome-installer-mini_installer-BUILD.gn.patch b/patches/chrome-installer-mini_installer-BUILD.gn.patch index c944b7043e93..89917f01681c 100644 --- a/patches/chrome-installer-mini_installer-BUILD.gn.patch +++ b/patches/chrome-installer-mini_installer-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/chrome/installer/mini_installer/BUILD.gn b/chrome/installer/mini_installer/BUILD.gn -index d7ac881770b38a25cfe0610bc7f8ed29ad3af454..7c2c6449aa3e6fc9423527b701fc2da3ac83fd28 100644 +index 7edb8b094375d95c7b1603f42cb534d13bf79ca8..965eda6c933ea0891f2a31f2f1afae83dc500364 100644 --- a/chrome/installer/mini_installer/BUILD.gn +++ b/chrome/installer/mini_installer/BUILD.gn @@ -13,6 +13,7 @@ import("//third_party/icu/config.gni") diff --git a/patches/chrome-installer-setup-BUILD.gn.patch b/patches/chrome-installer-setup-BUILD.gn.patch index f6f2f4c672ce..f0b368fcc34d 100644 --- a/patches/chrome-installer-setup-BUILD.gn.patch +++ b/patches/chrome-installer-setup-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/chrome/installer/setup/BUILD.gn b/chrome/installer/setup/BUILD.gn -index a0d57f1fc1f59aec10d21673721f580b232848a2..e827d16a6f05ed35e26fd127de0d3fb990158ee5 100644 +index bfe3388738b4a27606b0a123b0ad23dbcb4c9871..b0c1efe9f64cfb3ba0b53328dbbbd84cf8107277 100644 --- a/chrome/installer/setup/BUILD.gn +++ b/chrome/installer/setup/BUILD.gn @@ -129,6 +129,7 @@ if (is_win) { diff --git a/patches/chrome-installer-util-BUILD.gn.patch b/patches/chrome-installer-util-BUILD.gn.patch index 79c6fb13a97d..61bafbb1c7cd 100644 --- a/patches/chrome-installer-util-BUILD.gn.patch +++ b/patches/chrome-installer-util-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/chrome/installer/util/BUILD.gn b/chrome/installer/util/BUILD.gn -index 1d98d6d992749dd2b5f90408d7dbed8b4696c064..0a6b4a8d7e77633181d723ec98ae7742e3a17c1f 100644 +index 881de4697c84fc5a46e3fbb861ccc283ff5a43d9..baf85c9b86ac33cd942a8366df7f7b6a70c53ba9 100644 --- a/chrome/installer/util/BUILD.gn +++ b/chrome/installer/util/BUILD.gn -@@ -204,6 +204,7 @@ static_library("with_no_strings") { +@@ -206,6 +206,7 @@ static_library("with_no_strings") { "initial_preferences.h", ] } @@ -10,7 +10,7 @@ index 1d98d6d992749dd2b5f90408d7dbed8b4696c064..0a6b4a8d7e77633181d723ec98ae7742 } # Use this version of installer_util to link to the generated strings in .rc -@@ -239,7 +240,18 @@ generate_embedded_i18n("generate_strings") { +@@ -241,7 +242,18 @@ generate_embedded_i18n("generate_strings") { output_file_name_base = "installer_util_strings" diff --git a/patches/chrome-installer-util-shell_util.cc.patch b/patches/chrome-installer-util-shell_util.cc.patch index 6305066c735c..0eaf5f87460c 100644 --- a/patches/chrome-installer-util-shell_util.cc.patch +++ b/patches/chrome-installer-util-shell_util.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc -index 2c2a0dd1060e3234ed459a4a3d2dd2e7b8554fd8..d91855a6bfcba5220c0857a47d0e8053ac91d3ff 100644 +index d28060af2c791678ba4d8b65cb87a0756c252b85..2250797821aeaf2af7b96cd6b18e2e771559f024 100644 --- a/chrome/installer/util/shell_util.cc +++ b/chrome/installer/util/shell_util.cc -@@ -362,6 +362,7 @@ void GetChromeProgIdEntries( +@@ -367,6 +367,7 @@ void GetChromeProgIdEntries( app_info.delegate_clsid = install_static::GetLegacyCommandExecuteImplClsid(); GetProgIdEntries(app_info, entries); @@ -10,7 +10,7 @@ index 2c2a0dd1060e3234ed459a4a3d2dd2e7b8554fd8..d91855a6bfcba5220c0857a47d0e8053 if (!app_info.delegate_clsid.empty()) { auto delegate_execute_entries = -@@ -458,6 +459,7 @@ void GetShellIntegrationEntries( +@@ -463,6 +464,7 @@ void GetShellIntegrationEntries( const std::wstring html_prog_id(GetBrowserProgId(suffix)); for (int i = 0; ShellUtil::kPotentialFileAssociations[i] != nullptr; i++) { @@ -18,7 +18,7 @@ index 2c2a0dd1060e3234ed459a4a3d2dd2e7b8554fd8..d91855a6bfcba5220c0857a47d0e8053 entries->push_back(std::make_unique( capabilities + L"\\FileAssociations", ShellUtil::kPotentialFileAssociations[i], html_prog_id)); -@@ -482,6 +484,7 @@ void GetAppExtRegistrationEntries( +@@ -487,6 +489,7 @@ void GetAppExtRegistrationEntries( std::wstring key_name = base::StrCat({ShellUtil::kRegClasses, kFilePathSeparator, ext, kFilePathSeparator, ShellUtil::kRegOpenWithProgids}); @@ -26,7 +26,7 @@ index 2c2a0dd1060e3234ed459a4a3d2dd2e7b8554fd8..d91855a6bfcba5220c0857a47d0e8053 entries->push_back( std::make_unique(key_name, prog_id, std::wstring())); } -@@ -1806,8 +1809,10 @@ const wchar_t* ShellUtil::kPotentialFileAssociations[] = { +@@ -1872,8 +1875,10 @@ const wchar_t* ShellUtil::kPotentialFileAssociations[] = { L".htm", L".html", L".pdf", L".shtml", L".svg", L".xht", L".xhtml", L".webp", nullptr}; const wchar_t* ShellUtil::kBrowserProtocolAssociations[] = {L"ftp", L"http", diff --git a/patches/chrome-renderer-BUILD.gn.patch b/patches/chrome-renderer-BUILD.gn.patch index bd42b362c03e..db84b88a1455 100644 --- a/patches/chrome-renderer-BUILD.gn.patch +++ b/patches/chrome-renderer-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/chrome/renderer/BUILD.gn b/chrome/renderer/BUILD.gn -index 0ad8a99a23d47ebdc2806cd6fc17b391cd0a58b3..b79c2a202cee814d7eb33bfbcc9c5cbfbba53219 100644 +index de222ffdf2658b02ec00d53087f3486510e22072..935572bd9b6bce9a275d848cbfe12f18644b0e24 100644 --- a/chrome/renderer/BUILD.gn +++ b/chrome/renderer/BUILD.gn @@ -214,6 +214,7 @@ static_library("renderer") { diff --git a/patches/chrome-renderer-chrome_content_renderer_client.cc.patch b/patches/chrome-renderer-chrome_content_renderer_client.cc.patch index 0d30313ba8ce..649f9304d72b 100644 --- a/patches/chrome-renderer-chrome_content_renderer_client.cc.patch +++ b/patches/chrome-renderer-chrome_content_renderer_client.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc -index 0cc423db56e007d0bfab8cd8730b6279931f8c84..2119191d85ccae969bb53b70561f41f272ac1639 100644 +index a7ffa185b5df0073b7503453cf4478e80d774e68..2cd42e1f2a504c5b6c1e1b780d8d7e7fae51e0a4 100644 --- a/chrome/renderer/chrome_content_renderer_client.cc +++ b/chrome/renderer/chrome_content_renderer_client.cc -@@ -549,7 +549,7 @@ void ChromeContentRendererClient::RenderFrameCreated( +@@ -560,7 +560,7 @@ void ChromeContentRendererClient::RenderFrameCreated( ChromeExtensionsRendererClient::GetInstance()->extension_dispatcher()); #endif content_settings::ContentSettingsAgentImpl* content_settings = @@ -11,8 +11,8 @@ index 0cc423db56e007d0bfab8cd8730b6279931f8c84..2119191d85ccae969bb53b70561f41f2 render_frame, should_allow_for_content_settings, std::move(content_settings_delegate)); if (chrome_observer_.get()) { -@@ -735,6 +735,7 @@ void ChromeContentRendererClient::RenderFrameCreated( - &RenderFrameFontFamilyAccessor::Bind, render_frame)); +@@ -750,6 +750,7 @@ void ChromeContentRendererClient::RenderFrameCreated( + render_frame)); } #endif + BRAVE_RENDER_FRAME_CREATED diff --git a/patches/chrome-renderer-chrome_content_renderer_client.h.patch b/patches/chrome-renderer-chrome_content_renderer_client.h.patch index 2d3c8488b470..6f07b1aa5cd9 100644 --- a/patches/chrome-renderer-chrome_content_renderer_client.h.patch +++ b/patches/chrome-renderer-chrome_content_renderer_client.h.patch @@ -1,8 +1,8 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.h b/chrome/renderer/chrome_content_renderer_client.h -index 4ba204c360b97df2004e2ead3f41147771d3b94b..95a6f98e587172e1acd72c83cad1f8838b90b332 100644 +index 559931226223d4edab1ea36baa281a3f83ca87d9..86aaa1f63171c75bd0f8aa3c00d2084dcbc33135 100644 --- a/chrome/renderer/chrome_content_renderer_client.h +++ b/chrome/renderer/chrome_content_renderer_client.h -@@ -229,6 +229,7 @@ class ChromeContentRendererClient +@@ -230,6 +230,7 @@ class ChromeContentRendererClient #endif private: diff --git a/patches/chrome-test-BUILD.gn.patch b/patches/chrome-test-BUILD.gn.patch index f5a66333f666..c21fba54231b 100644 --- a/patches/chrome-test-BUILD.gn.patch +++ b/patches/chrome-test-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn -index df3163b43baeb68eaab222f64b3bc4b58c55140c..8bb8d00203ae5742ffea36aa2093ef7929ac51af 100644 +index ade95f3592fc54e69ec8717c7542ef2eae645056..91a70733ca020f95ed36c4e37baeab89e65604f3 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -317,6 +317,7 @@ static_library("test_support") { +@@ -316,6 +316,7 @@ static_library("test_support") { "//ui/gl", ] @@ -10,7 +10,7 @@ index df3163b43baeb68eaab222f64b3bc4b58c55140c..8bb8d00203ae5742ffea36aa2093ef79 data_deps = [] if (enable_pdf) { -@@ -5033,7 +5034,7 @@ if (is_android) { +@@ -5093,7 +5094,7 @@ config("disable_thinlto_cache_flags") { } config("pdb_larger_than_4gb") { diff --git a/patches/chrome-test-views-accessibility_checker.cc.patch b/patches/chrome-test-views-accessibility_checker.cc.patch deleted file mode 100644 index 0d0bd02d15ee..000000000000 --- a/patches/chrome-test-views-accessibility_checker.cc.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/chrome/test/views/accessibility_checker.cc b/chrome/test/views/accessibility_checker.cc -index 58e149ba642ca43cbc5e1b6aa2cb0d60a8e84372..04320ff652e8950d97229a65e0a3cede723536ef 100644 ---- a/chrome/test/views/accessibility_checker.cc -+++ b/chrome/test/views/accessibility_checker.cc -@@ -44,6 +44,7 @@ bool DoesViewHaveAccessibleNameOrLabelError(ui::AXNodeData* data) { - // 2) Explicitly setting the name to "" is allowed if the view uses - // AXNodedata.SetNameExplicitlyEmpty(). - -+ data->SetNameExplicitlyEmpty(); - // It has a name, we're done. - if (!data->GetStringAttribute(StringAttribute::kName).empty()) - return false; diff --git a/patches/chrome-tools-build-win-create_installer_archive.py.patch b/patches/chrome-tools-build-win-create_installer_archive.py.patch index 1842e98b60c5..4a4549b2621b 100644 --- a/patches/chrome-tools-build-win-create_installer_archive.py.patch +++ b/patches/chrome-tools-build-win-create_installer_archive.py.patch @@ -1,5 +1,5 @@ diff --git a/chrome/tools/build/win/create_installer_archive.py b/chrome/tools/build/win/create_installer_archive.py -index dfa3ee4f5f544e0f99543169639dd9687d03e807..1cc78c4efe33ed8ae796fbf9a087bb7f68c5680f 100755 +index cc4a6f262712377a7a5b0a272f434e263a06b8bb..86e6f06e4c50dc60bcfccb30ad2a011bfec84749 100755 --- a/chrome/tools/build/win/create_installer_archive.py +++ b/chrome/tools/build/win/create_installer_archive.py @@ -42,6 +42,8 @@ SETUP_PATCH_FILE_PREFIX = "setup_patch" @@ -19,7 +19,7 @@ index dfa3ee4f5f544e0f99543169639dd9687d03e807..1cc78c4efe33ed8ae796fbf9a087bb7f if include_snapshotblob == '1': CopySectionFilesToStagingDir(config, 'SNAPSHOTBLOB', staging_dir, build_dir, -@@ -187,7 +190,7 @@ def GetPrevVersion(build_dir, temp_dir, last_chrome_installer, output_name): +@@ -190,7 +193,7 @@ def GetPrevVersion(build_dir, temp_dir, last_chrome_installer, output_name): output_name + ARCHIVE_SUFFIX) cmd = [lzma_exec, 'x', @@ -28,7 +28,7 @@ index dfa3ee4f5f544e0f99543169639dd9687d03e807..1cc78c4efe33ed8ae796fbf9a087bb7f prev_archive_file, 'Chrome-bin/*/chrome.dll',] RunSystemCommand(cmd, options.verbose) -@@ -562,6 +565,8 @@ def main(options): +@@ -565,6 +568,8 @@ def main(options): if prev_version: version_numbers = prev_version.split('.') prev_build_number = version_numbers[2] + '.' + version_numbers[3] @@ -37,7 +37,7 @@ index dfa3ee4f5f544e0f99543169639dd9687d03e807..1cc78c4efe33ed8ae796fbf9a087bb7f # Name of the archive file built (for example - chrome.7z or # patch--.7z or patch-.7z -@@ -635,6 +640,7 @@ def _ParseOptions(): +@@ -638,6 +643,7 @@ def _ParseOptions(): 'with the installer archive {x86|x64}.') parser.add_option('-v', '--verbose', action='store_true', dest='verbose', default=False) diff --git a/patches/chrome-utility-BUILD.gn.patch b/patches/chrome-utility-BUILD.gn.patch index 62e2d95a893f..5e162476f55b 100644 --- a/patches/chrome-utility-BUILD.gn.patch +++ b/patches/chrome-utility-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/chrome/utility/BUILD.gn b/chrome/utility/BUILD.gn -index ba5c91ed65b5674a80bb77083cc01a92986631ce..f056853fe326af0b6eece81cfbdc9e4b03659f85 100644 +index 696cd2684b082358831adfce85d9b7620b0e83f7..3bed9229593eefe90d8dba51f757fb5aab6c3bd5 100644 --- a/chrome/utility/BUILD.gn +++ b/chrome/utility/BUILD.gn @@ -72,6 +72,8 @@ static_library("utility") { diff --git a/patches/components-bookmarks-browser-bookmark_model.h.patch b/patches/components-bookmarks-browser-bookmark_model.h.patch index f353a79514c0..3c74f156fb07 100644 --- a/patches/components-bookmarks-browser-bookmark_model.h.patch +++ b/patches/components-bookmarks-browser-bookmark_model.h.patch @@ -1,8 +1,8 @@ diff --git a/components/bookmarks/browser/bookmark_model.h b/components/bookmarks/browser/bookmark_model.h -index 6117be3c78b1a42c21fd9567962b897e4e69826f..6426e52829d58660b8a454c63d7368f17593a520 100644 +index 6347e4ecced49e358512d98891a4ac5d8a844777..1dad9c9e103641dc80ab99c4396a62badf126a24 100644 --- a/components/bookmarks/browser/bookmark_model.h +++ b/components/bookmarks/browser/bookmark_model.h -@@ -326,6 +326,7 @@ class BookmarkModel : public BookmarkUndoProvider, +@@ -332,6 +332,7 @@ class BookmarkModel : public BookmarkUndoProvider, return weak_factory_.GetWeakPtr(); } diff --git a/patches/components-browser_ui-site_settings-android-java-src-org-chromium-components-browser_ui-site_settings-SingleCategorySettings.java.patch b/patches/components-browser_ui-site_settings-android-java-src-org-chromium-components-browser_ui-site_settings-SingleCategorySettings.java.patch index 94bc647bd880..7b96732ccf62 100644 --- a/patches/components-browser_ui-site_settings-android-java-src-org-chromium-components-browser_ui-site_settings-SingleCategorySettings.java.patch +++ b/patches/components-browser_ui-site_settings-android-java-src-org-chromium-components-browser_ui-site_settings-SingleCategorySettings.java.patch @@ -1,8 +1,8 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java -index 22ec8feaa65c79473b5e7d0fd3d9765c1a49072e..42dd62c201b4b4d0349705d3c5058f98608aac3c 100644 +index 6c05dcc4e0dea9640176d5f90236366b2c209d5d..abc15d16ee6869d1d9e58576b59909c0d5971724 100644 --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java -@@ -420,7 +420,7 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment +@@ -426,7 +426,7 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment if (queryHasChanged) getInfoForOrigins(); return true; } diff --git a/patches/components-browser_ui-site_settings-android-java-src-org-chromium-components-browser_ui-site_settings-SiteSettingsCategory.java.patch b/patches/components-browser_ui-site_settings-android-java-src-org-chromium-components-browser_ui-site_settings-SiteSettingsCategory.java.patch index 89d82027a68e..9d45c9cd4faf 100644 --- a/patches/components-browser_ui-site_settings-android-java-src-org-chromium-components-browser_ui-site_settings-SiteSettingsCategory.java.patch +++ b/patches/components-browser_ui-site_settings-android-java-src-org-chromium-components-browser_ui-site_settings-SiteSettingsCategory.java.patch @@ -1,5 +1,5 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java -index 1ea3178640cab1de828e400a97664b2e0cf4e8a6..6dee63560a07aade306f68b5c6a6bb237383c8e1 100644 +index 74ad5fdea9448ba4b9a930981f47b1ec8960e938..de7cc5f6deab0f6a9e6b672ce119e522dd446304 100644 --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java @@ -43,7 +43,7 @@ public class SiteSettingsCategory { diff --git a/patches/components-content_settings-browser-page_specific_content_settings.cc.patch b/patches/components-content_settings-browser-page_specific_content_settings.cc.patch index 3afbe62c9aa1..0cf498057193 100644 --- a/patches/components-content_settings-browser-page_specific_content_settings.cc.patch +++ b/patches/components-content_settings-browser-page_specific_content_settings.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/content_settings/browser/page_specific_content_settings.cc b/components/content_settings/browser/page_specific_content_settings.cc -index fe1ef5b9c1c3b067fc91b1b6910ee2c86d4cb8a3..742568ea40b6d7160b08108286b697e039989951 100644 +index a4fab50560c8e3f60a99b9e531198d7de7f2c9dc..6151e719940024320e1a663838bd676aa68b5d83 100644 --- a/components/content_settings/browser/page_specific_content_settings.cc +++ b/components/content_settings/browser/page_specific_content_settings.cc -@@ -417,6 +417,7 @@ bool PageSpecificContentSettings::IsContentBlocked( +@@ -565,6 +565,7 @@ bool PageSpecificContentSettings::IsContentBlocked( content_type == ContentSettingsType::ADS || content_type == ContentSettingsType::SOUND || content_type == ContentSettingsType::CLIPBOARD_READ_WRITE || @@ -10,7 +10,7 @@ index fe1ef5b9c1c3b067fc91b1b6910ee2c86d4cb8a3..742568ea40b6d7160b08108286b697e0 content_type == ContentSettingsType::SENSORS || content_type == ContentSettingsType::GEOLOCATION) { const auto& it = content_settings_status_.find(content_type); -@@ -440,6 +441,7 @@ bool PageSpecificContentSettings::IsContentAllowed( +@@ -588,6 +589,7 @@ bool PageSpecificContentSettings::IsContentAllowed( content_type != ContentSettingsType::PPAPI_BROKER && content_type != ContentSettingsType::MIDI_SYSEX && content_type != ContentSettingsType::CLIPBOARD_READ_WRITE && diff --git a/patches/components-content_settings-core-browser-content_settings_registry.cc.patch b/patches/components-content_settings-core-browser-content_settings_registry.cc.patch index bd387cb6e19b..6fb787144a13 100644 --- a/patches/components-content_settings-core-browser-content_settings_registry.cc.patch +++ b/patches/components-content_settings-core-browser-content_settings_registry.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/content_settings/core/browser/content_settings_registry.cc b/components/content_settings/core/browser/content_settings_registry.cc -index 272fef3f74acc60f0b9d9f36b2a81e7242b426ac..16cb03685fd3ba3a357df2b20025b153f29dfb7d 100644 +index ffca613b252436108881c15b6f69abdc0277fb58..72f1cc550e65f40a8a0cd7a1c48c6b995ed01809 100644 --- a/components/content_settings/core/browser/content_settings_registry.cc +++ b/components/content_settings/core/browser/content_settings_registry.cc -@@ -664,6 +664,7 @@ void ContentSettingsRegistry::Init() { +@@ -667,6 +667,7 @@ void ContentSettingsRegistry::Init() { ContentSettingsInfo::INHERIT_IN_INCOGNITO, ContentSettingsInfo::PERSISTENT, ContentSettingsInfo::EXCEPTIONS_ON_SECURE_ORIGINS_ONLY); diff --git a/patches/components-content_settings-core-browser-cookie_settings.cc.patch b/patches/components-content_settings-core-browser-cookie_settings.cc.patch index 7cecc582996f..9b94cc104351 100644 --- a/patches/components-content_settings-core-browser-cookie_settings.cc.patch +++ b/patches/components-content_settings-core-browser-cookie_settings.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/content_settings/core/browser/cookie_settings.cc b/components/content_settings/core/browser/cookie_settings.cc -index ccb986759151b48f871b8c1c48f163b78c2a0868..6d287391431a62045ed1b64798a548415dd97123 100644 +index 0acb2f8d4bcf8e583d87fa8941362f2fcd8d7c84..2bf9f849dcaf0d8649f91af6fa1e9f6872de5dc2 100644 --- a/components/content_settings/core/browser/cookie_settings.cc +++ b/components/content_settings/core/browser/cookie_settings.cc -@@ -191,6 +191,7 @@ ContentSetting CookieSettings::GetCookieSettingInternal( +@@ -194,6 +194,7 @@ ContentSetting CookieSettings::GetCookieSettingInternal( DCHECK(value.is_int()); ContentSetting setting = ValueToContentSetting(value); bool block = block_third && is_third_party_request; diff --git a/patches/components-content_settings-core-common-content_settings.cc.patch b/patches/components-content_settings-core-common-content_settings.cc.patch index db62aba74121..9cbd9329c547 100644 --- a/patches/components-content_settings-core-common-content_settings.cc.patch +++ b/patches/components-content_settings-core-common-content_settings.cc.patch @@ -1,11 +1,11 @@ diff --git a/components/content_settings/core/common/content_settings.cc b/components/content_settings/core/common/content_settings.cc -index b861950751caa9100fe9e7db6256158840509b0b..79aaeb4df0e58dbb79383ba1b87d18c789fcf55a 100644 +index faed596e2f4089aa015f360274cc4ce09203aa26..ad85decae23744b15dc69bda8f4060f1784ef16d 100644 --- a/components/content_settings/core/common/content_settings.cc +++ b/components/content_settings/core/common/content_settings.cc -@@ -104,6 +104,7 @@ constexpr HistogramValue kHistogramValue[] = { - {ContentSettingsType::REQUEST_DESKTOP_SITE, 84}, +@@ -105,6 +105,7 @@ constexpr HistogramValue kHistogramValue[] = { {ContentSettingsType::FEDERATED_IDENTITY_API, 85}, {ContentSettingsType::NOTIFICATION_INTERACTIONS, 86}, + {ContentSettingsType::REDUCED_ACCEPT_LANGUAGE, 87}, + BRAVE_HISTOGRAM_VALUE_LIST }; diff --git a/patches/components-content_settings-core-common-content_settings_types.h.patch b/patches/components-content_settings-core-common-content_settings_types.h.patch deleted file mode 100644 index 79b64be9c71b..000000000000 --- a/patches/components-content_settings-core-common-content_settings_types.h.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/components/content_settings/core/common/content_settings_types.h b/components/content_settings/core/common/content_settings_types.h -index 9c6728a428ba0ec1fd058a7f29661c8e55a4bf9c..30f6bcc5b913e4ababb4dd3c63a3d0b4d98ddac0 100644 ---- a/components/content_settings/core/common/content_settings_types.h -+++ b/components/content_settings/core/common/content_settings_types.h -@@ -287,6 +287,7 @@ enum class ContentSettingsType : int32_t { - // in local time. - NOTIFICATION_INTERACTIONS, - -+ BRAVE_CONTENT_SETTINGS_TYPES_LIST, - NUM_TYPES, - }; - diff --git a/patches/components-content_settings-core-common-cookie_settings_base.h.patch b/patches/components-content_settings-core-common-cookie_settings_base.h.patch index dfdaba7c5f44..ea10f400702a 100644 --- a/patches/components-content_settings-core-common-cookie_settings_base.h.patch +++ b/patches/components-content_settings-core-common-cookie_settings_base.h.patch @@ -1,14 +1,8 @@ diff --git a/components/content_settings/core/common/cookie_settings_base.h b/components/content_settings/core/common/cookie_settings_base.h -index 954be95c153ca822d3dc9f41868d82545a20b3ff..37f71e8c3b0be178dc8a928dac36f3ed7ac09c64 100644 +index deb6d6139075e30cf372b134d843adc5a3c4d332..b9d4d52d21cde5b612d3862ecfd551b337f7d44b 100644 --- a/components/content_settings/core/common/cookie_settings_base.h +++ b/components/content_settings/core/common/cookie_settings_base.h -@@ -66,12 +66,12 @@ namespace content_settings { - // |top_frame_origin|. This is done inconsistently and needs to be fixed. - class CookieSettingsBase { - public: -- CookieSettingsBase() = default; -+ CookieSettingsBase(); - +@@ -71,7 +71,7 @@ class CookieSettingsBase { CookieSettingsBase(const CookieSettingsBase&) = delete; CookieSettingsBase& operator=(const CookieSettingsBase&) = delete; diff --git a/patches/components-content_settings-renderer-content_settings_agent_impl.cc.patch b/patches/components-content_settings-renderer-content_settings_agent_impl.cc.patch index 870e8b802175..c21a5c04ffff 100644 --- a/patches/components-content_settings-renderer-content_settings_agent_impl.cc.patch +++ b/patches/components-content_settings-renderer-content_settings_agent_impl.cc.patch @@ -1,5 +1,5 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc b/components/content_settings/renderer/content_settings_agent_impl.cc -index 3e0be5b6bc5cebb9b0aae6902ebbb7a08156dfb6..01e8c6eba5feb7a719749b130ee59b7f1e86fa37 100644 +index 701d6a5155f57601546c184fda0a16535b8e9a85..520691d66a9bd700c13bcc1696f41cbf3602ce60 100644 --- a/components/content_settings/renderer/content_settings_agent_impl.cc +++ b/components/content_settings/renderer/content_settings_agent_impl.cc @@ -439,6 +439,7 @@ bool ContentSettingsAgentImpl::IsAllowlistedForContentSettings() const { diff --git a/patches/components-download-internal-common-download_item_impl.cc.patch b/patches/components-download-internal-common-download_item_impl.cc.patch index 775dae5402ef..2d18ab91cfba 100644 --- a/patches/components-download-internal-common-download_item_impl.cc.patch +++ b/patches/components-download-internal-common-download_item_impl.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/download/internal/common/download_item_impl.cc b/components/download/internal/common/download_item_impl.cc -index 827aa517a92a97569ee23fc067b7c751f1d39cdc..552ef91857a5e294f1951c6e67ceb86d17d530bf 100644 +index 29fb763b5ec12d8aa7aaf77a22487479ba1843c5..6b96f0e9e6ab5e7c6dc3c1f9d5edf60bae64e96e 100644 --- a/components/download/internal/common/download_item_impl.cc +++ b/components/download/internal/common/download_item_impl.cc -@@ -2013,8 +2013,8 @@ void DownloadItemImpl::OnDownloadCompleting() { +@@ -1933,8 +1933,8 @@ void DownloadItemImpl::OnDownloadCompleting() { base::Unretained(download_file_.get()), GetTargetFilePath(), delegate_->GetApplicationClientIdForFileScanning(), diff --git a/patches/components-embedder_support-user_agent_utils.cc.patch b/patches/components-embedder_support-user_agent_utils.cc.patch index a3ea67292fea..548947800136 100644 --- a/patches/components-embedder_support-user_agent_utils.cc.patch +++ b/patches/components-embedder_support-user_agent_utils.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/embedder_support/user_agent_utils.cc b/components/embedder_support/user_agent_utils.cc -index 6eb4847667c19e51f6eb1f2126182b7e538154af..2bb58426ba1cb730b169b9b5b8c174717d28b1c9 100644 +index 97ddfb060d5ab9aa48de283ef34d8583568bc269..06d15d11b2d881155ed5fcd1671140b60ed1dfae 100644 --- a/components/embedder_support/user_agent_utils.cc +++ b/components/embedder_support/user_agent_utils.cc -@@ -256,6 +256,7 @@ const blink::UserAgentBrandList GetUserAgentBrandList( +@@ -268,6 +268,7 @@ const blink::UserAgentBrandList GetUserAgentBrandList( #if !BUILDFLAG(CHROMIUM_BRANDING) brand = version_info::GetProductName(); #endif diff --git a/patches/components-external_intents-android-BUILD.gn.patch b/patches/components-external_intents-android-BUILD.gn.patch index 898266707469..a209aa3d6139 100644 --- a/patches/components-external_intents-android-BUILD.gn.patch +++ b/patches/components-external_intents-android-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/components/external_intents/android/BUILD.gn b/components/external_intents/android/BUILD.gn -index 2eee9282ab6ba129e472c9ca1df8b19b7f1f578c..3a08843cb4fe76ed6e49ce602f88c92671c14280 100644 +index 611d3192bbb938710f7efbea742fb7df634a3cd1..3255d7be8371a569914bd8ae978c6fcfdf7bb4be 100644 --- a/components/external_intents/android/BUILD.gn +++ b/components/external_intents/android/BUILD.gn -@@ -68,6 +68,7 @@ static_library("android") { +@@ -67,6 +67,7 @@ static_library("android") { "//components/navigation_interception", "//content/public/browser", ] diff --git a/patches/components-favicon-core-favicon_database.cc.patch b/patches/components-favicon-core-favicon_database.cc.patch index ccf9ab049b64..50eded833ce4 100644 --- a/patches/components-favicon-core-favicon_database.cc.patch +++ b/patches/components-favicon-core-favicon_database.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/favicon/core/favicon_database.cc b/components/favicon/core/favicon_database.cc -index a8f5b1b801c15463273b39c82d8dea56b210a6f6..e4c2770f49ebc8f374d8250e0e1870531d56d71c 100644 +index aab95fb9cb3440f13ebb7282e7cb3b0dba8b1f8f..85194f883449e7d2f274e6280a817bef92c16560 100644 --- a/components/favicon/core/favicon_database.cc +++ b/components/favicon/core/favicon_database.cc -@@ -508,6 +508,7 @@ FaviconBitmapID FaviconDatabase::AddFaviconBitmap( +@@ -509,6 +509,7 @@ FaviconBitmapID FaviconDatabase::AddFaviconBitmap( base::Time time, const gfx::Size& pixel_size) { DCHECK(icon_id); @@ -10,7 +10,7 @@ index a8f5b1b801c15463273b39c82d8dea56b210a6f6..e4c2770f49ebc8f374d8250e0e187053 sql::Statement statement(db_.GetCachedStatement( SQL_FROM_HERE, -@@ -560,8 +561,8 @@ bool FaviconDatabase::SetFaviconBitmap( +@@ -561,8 +562,8 @@ bool FaviconDatabase::SetFaviconBitmap( } else { statement.BindNull(0); } @@ -21,7 +21,7 @@ index a8f5b1b801c15463273b39c82d8dea56b210a6f6..e4c2770f49ebc8f374d8250e0e187053 statement.BindInt64(3, bitmap_id); return statement.Run(); -@@ -569,6 +570,7 @@ bool FaviconDatabase::SetFaviconBitmap( +@@ -570,6 +571,7 @@ bool FaviconDatabase::SetFaviconBitmap( bool FaviconDatabase::SetFaviconBitmapLastUpdateTime(FaviconBitmapID bitmap_id, base::Time time) { diff --git a/patches/components-history-core-browser-history_types.h.patch b/patches/components-history-core-browser-history_types.h.patch index 96b790c5b55a..e1e5f89fc90f 100644 --- a/patches/components-history-core-browser-history_types.h.patch +++ b/patches/components-history-core-browser-history_types.h.patch @@ -1,8 +1,8 @@ diff --git a/components/history/core/browser/history_types.h b/components/history/core/browser/history_types.h -index f19f6f8d66c2cbca23155818c0c33db30f263436..06a303182c6f96966250d02de51bc7e79cb93ecd 100644 +index 3ce2d10528aff49c12b09ff8327dc738c847a28c..5c658b27db4322d66c212d3d62423a7dae8d5183 100644 --- a/components/history/core/browser/history_types.h +++ b/components/history/core/browser/history_types.h -@@ -50,6 +50,8 @@ enum VisitSource { +@@ -51,6 +51,8 @@ enum VisitSource { SOURCE_FIREFOX_IMPORTED = 3, SOURCE_IE_IMPORTED = 4, SOURCE_SAFARI_IMPORTED = 5, @@ -10,4 +10,4 @@ index f19f6f8d66c2cbca23155818c0c33db30f263436..06a303182c6f96966250d02de51bc7e7 + SOURCE_BRAVE_IMPORTED = 7, }; - typedef int64_t VisitID; + // Corresponds to the "id" column of the "visits" SQL table. diff --git a/patches/components-infobars-core-infobar_delegate.h.patch b/patches/components-infobars-core-infobar_delegate.h.patch index 2105a2dec6d0..cf57145719c3 100644 --- a/patches/components-infobars-core-infobar_delegate.h.patch +++ b/patches/components-infobars-core-infobar_delegate.h.patch @@ -1,5 +1,5 @@ diff --git a/components/infobars/core/infobar_delegate.h b/components/infobars/core/infobar_delegate.h -index 7128e748daa6504dd9f058eb7cd4eff118a90757..eff2b3dbe530ce61ae8e170ddc932b29bf456575 100644 +index fae18f19fb2865c491bfe9c65a2c6a9fb3107374..00d27ddf547c1d2bf553ff59a260fb3b23a4e51f 100644 --- a/components/infobars/core/infobar_delegate.h +++ b/components/infobars/core/infobar_delegate.h @@ -180,6 +180,7 @@ class InfoBarDelegate { diff --git a/patches/components-metrics-BUILD.gn.patch b/patches/components-metrics-BUILD.gn.patch index 1a854c9e07f0..4bee1009043a 100644 --- a/patches/components-metrics-BUILD.gn.patch +++ b/patches/components-metrics-BUILD.gn.patch @@ -1,10 +1,10 @@ diff --git a/components/metrics/BUILD.gn b/components/metrics/BUILD.gn -index 334f527bfbefddbe19883d24d738e00a0d385d3c..03fc051ad0b2f93894827890bcf8ce3d2012fe71 100644 +index 2006302e4bebb7382d63537714751d1701edc10e..b0bf88b6bfd8d640eaee2bfb56ff1c01b1023f67 100644 --- a/components/metrics/BUILD.gn +++ b/components/metrics/BUILD.gn -@@ -192,6 +192,7 @@ static_library("metrics") { - if (is_fuchsia) { - sources += [ "drive_metrics_provider_fuchsia.cc" ] +@@ -200,6 +200,7 @@ static_library("metrics") { + "motherboard_metrics_provider.h", + ] } + import("//brave/components/metrics/sources.gni") deps += brave_components_metrics_deps } diff --git a/patches/components-omnibox-browser-BUILD.gn.patch b/patches/components-omnibox-browser-BUILD.gn.patch index 5061aaad7efc..a990d826fd0c 100644 --- a/patches/components-omnibox-browser-BUILD.gn.patch +++ b/patches/components-omnibox-browser-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/components/omnibox/browser/BUILD.gn b/components/omnibox/browser/BUILD.gn -index 53214103aa465336f9a8c013487b60cac540e613..20030780acfdf64418ae936ae2e97ce84665d0ae 100644 +index 1e35bcb56a28345a6cf5e91b79900652a691461c..cd235c9f3db428db90acd57678252716de429c4b 100644 --- a/components/omnibox/browser/BUILD.gn +++ b/components/omnibox/browser/BUILD.gn -@@ -290,6 +290,7 @@ static_library("browser") { +@@ -292,6 +292,7 @@ static_library("browser") { "//ui/base", "//ui/gfx", ] diff --git a/patches/components-omnibox-browser-autocomplete_controller.cc.patch b/patches/components-omnibox-browser-autocomplete_controller.cc.patch index 5e6c131075ce..307b6e82c51f 100644 --- a/patches/components-omnibox-browser-autocomplete_controller.cc.patch +++ b/patches/components-omnibox-browser-autocomplete_controller.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/omnibox/browser/autocomplete_controller.cc b/components/omnibox/browser/autocomplete_controller.cc -index f6a85f48e5743e42788c7d244dd1d7a91174c0c9..1c0c28e851fda8a107faa2180bc7b125c06f3a4f 100644 +index cfedc49bcff6d6b625f0d96936befbdf5a517004..1c422943809eb5ba6c4391b64e5ef45e20574045 100644 --- a/components/omnibox/browser/autocomplete_controller.cc +++ b/components/omnibox/browser/autocomplete_controller.cc -@@ -355,6 +355,7 @@ AutocompleteController::AutocompleteController( +@@ -378,6 +378,7 @@ AutocompleteController::AutocompleteController( if (provider_types & AutocompleteProvider::TYPE_SEARCH) { search_provider_ = new SearchProvider(provider_client_.get(), this); providers_.push_back(search_provider_.get()); @@ -10,7 +10,7 @@ index f6a85f48e5743e42788c7d244dd1d7a91174c0c9..1c0c28e851fda8a107faa2180bc7b125 } // Providers run in the order they're added. Add `HistoryURLProvider` after // `SearchProvider` because: -@@ -933,6 +934,8 @@ void AutocompleteController::UpdateResult( +@@ -957,6 +958,8 @@ void AutocompleteController::UpdateResult( metrics_.OnUpdateResult(last_result_for_logging, result_.GetMatchDedupComparators()); diff --git a/patches/components-omnibox-browser-omnibox_edit_model.cc.patch b/patches/components-omnibox-browser-omnibox_edit_model.cc.patch index 0cf7190e01b4..00587ad97f00 100644 --- a/patches/components-omnibox-browser-omnibox_edit_model.cc.patch +++ b/patches/components-omnibox-browser-omnibox_edit_model.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/omnibox/browser/omnibox_edit_model.cc b/components/omnibox/browser/omnibox_edit_model.cc -index a7a3da64a354218b4c45349e9c9561e1b2fcac12..4f37d099cf91c264c71f257e74c1842e4f663a36 100644 +index 9d3f7ba5fecb7b53a4911939fd193f2f7eb8b439..e692a04c0531b9a72a50be22450203a5a0b5f921 100644 --- a/components/omnibox/browser/omnibox_edit_model.cc +++ b/components/omnibox/browser/omnibox_edit_model.cc -@@ -415,6 +415,7 @@ void OmniboxEditModel::AdjustTextForCopy(int sel_min, +@@ -451,6 +451,7 @@ void OmniboxEditModel::AdjustTextForCopy(int sel_min, (*text == display_text_ || *text == url_for_editing_)) { *url_from_text = controller()->GetLocationBarModel()->GetURL(); *write_url = true; diff --git a/patches/components-page_info-page_info.cc.patch b/patches/components-page_info-page_info.cc.patch index 31e37c90252c..cfe3c0656692 100644 --- a/patches/components-page_info-page_info.cc.patch +++ b/patches/components-page_info-page_info.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/page_info/page_info.cc b/components/page_info/page_info.cc -index 8af14cdd2d1352f2e85e1f40779c64c04368f1bf..dea427d7162709c0b9b098efdccae555c9b74cf5 100644 +index 2fc62009e3e1cfc0a96a22faa26c77679890a188..9867d012405f31f8dac51ad238f6d8410e179847 100644 --- a/components/page_info/page_info.cc +++ b/components/page_info/page_info.cc -@@ -1082,6 +1082,7 @@ void PageInfo::PresentSitePermissions() { +@@ -1113,6 +1113,7 @@ void PageInfo::PresentSitePermissions() { } } diff --git a/patches/components-password_manager-core-browser-login_database.cc.patch b/patches/components-password_manager-core-browser-login_database.cc.patch index 9acbf13cc472..1f38774b1d35 100644 --- a/patches/components-password_manager-core-browser-login_database.cc.patch +++ b/patches/components-password_manager-core-browser-login_database.cc.patch @@ -1,5 +1,5 @@ diff --git a/components/password_manager/core/browser/login_database.cc b/components/password_manager/core/browser/login_database.cc -index 925670108ae38fe46c8b9b84329902f980f3d677..c285fb9153b86241a007f7dd5a14f2b1b0aa3c1d 100644 +index a717f89d036f8392f5583e6750000afda6cfcc5f..bb4b3496289135551cee57477d1dcdb72be12292 100644 --- a/components/password_manager/core/browser/login_database.cc +++ b/components/password_manager/core/browser/login_database.cc @@ -1879,6 +1879,7 @@ FormRetrievalResult LoginDatabase::StatementToForms( diff --git a/patches/components-password_manager-core-browser-password_form_filling.cc.patch b/patches/components-password_manager-core-browser-password_form_filling.cc.patch index 0133ed25e331..c85595157128 100644 --- a/patches/components-password_manager-core-browser-password_form_filling.cc.patch +++ b/patches/components-password_manager-core-browser-password_form_filling.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/password_manager/core/browser/password_form_filling.cc b/components/password_manager/core/browser/password_form_filling.cc -index ccecb39f6e2468a1c468db2e542f394c57fbec30..10dad5f3b1c4d5f2d3595cc9dcc7e7b607de9f8b 100644 +index 573f931b25187fe1f1b7e91e8c635e93ccf01740..529c591a0d0a0d92effe920402a4cac351924cde 100644 --- a/components/password_manager/core/browser/password_form_filling.cc +++ b/components/password_manager/core/browser/password_form_filling.cc -@@ -225,6 +225,7 @@ LikelyFormFilling SendFillInformationToRenderer( +@@ -232,6 +232,7 @@ LikelyFormFilling SendFillInformationToRenderer( bool wait_for_username = wait_for_username_reason != WaitForUsernameReason::kDontWait; diff --git a/patches/components-permissions-android-BUILD.gn.patch b/patches/components-permissions-android-BUILD.gn.patch index 4c5c71929801..9191f4ad70bb 100644 --- a/patches/components-permissions-android-BUILD.gn.patch +++ b/patches/components-permissions-android-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/components/permissions/android/BUILD.gn b/components/permissions/android/BUILD.gn -index 633785a045d88cce3677d4e3faaccdf457b036ea..8af643d163f991da3eb12d9dc7a52e53046e997e 100644 +index a2e2cf394c47789418e94911c6b8a0614d8b1de6..57891d12e1687e6e6e44acfdaace375a9163f74f 100644 --- a/components/permissions/android/BUILD.gn +++ b/components/permissions/android/BUILD.gn -@@ -115,6 +115,7 @@ android_library("java") { +@@ -113,6 +113,7 @@ android_library("java") { "java/src/org/chromium/components/permissions/nfc/NfcSystemLevelPrompt.java", "java/src/org/chromium/components/permissions/nfc/NfcSystemLevelSetting.java", ] diff --git a/patches/components-permissions-permission_manager.cc.patch b/patches/components-permissions-permission_manager.cc.patch index 89b14b17d90f..c26dc499b2cc 100644 --- a/patches/components-permissions-permission_manager.cc.patch +++ b/patches/components-permissions-permission_manager.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/permissions/permission_manager.cc b/components/permissions/permission_manager.cc -index 96d7af0319c885e883669516fc05de60417fa3a1..654a6581c6a63f00c1463d194a8089528a8e7c5b 100644 +index 04d25e19943c704e06a4859f01fa69455e232ac3..d2f73db0779bf344dadefdca0aa0883ecfc5da99 100644 --- a/components/permissions/permission_manager.cc +++ b/components/permissions/permission_manager.cc -@@ -396,6 +396,7 @@ void PermissionManager::RequestPermissionsFromCurrentDocument( +@@ -266,6 +266,7 @@ void PermissionManager::RequestPermissionsFromCurrentDocument( const PermissionRequestID request_id(render_frame_host, request_local_id); const GURL requesting_origin = @@ -10,8 +10,8 @@ index 96d7af0319c885e883669516fc05de60417fa3a1..654a6581c6a63f00c1463d194a808952 PermissionUtil::GetLastCommittedOriginAsURL(render_frame_host); const GURL embedding_origin = GetEmbeddingOrigin(render_frame_host, requesting_origin); -@@ -455,6 +456,7 @@ PermissionStatus PermissionManager::GetPermissionStatusForCurrentDocument( - PermissionUtil::PermissionTypeToContentSetting(permission); +@@ -347,6 +348,7 @@ PermissionManager::GetPermissionResultForCurrentDocument( + PermissionUtil::PermissionTypeToContentSettingType(permission); const GURL requesting_origin = + BRAVE_FORCED_REQUESTING_ORIGIN diff --git a/patches/components-permissions-permission_uma_util.cc.patch b/patches/components-permissions-permission_uma_util.cc.patch index 13c2b91a7083..d5c2b87f4120 100644 --- a/patches/components-permissions-permission_uma_util.cc.patch +++ b/patches/components-permissions-permission_uma_util.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/permissions/permission_uma_util.cc b/components/permissions/permission_uma_util.cc -index 4fd0e68c220b543ed4eeaee5aad5e917895af3a2..9140c778a184d675826a5cb1eea809cfba1dddf5 100644 +index fc01fd72653691acdf0f1a2b514061b0c1bd6777..a24486ce2ae62a283604ebd8247330e939b868ac 100644 --- a/components/permissions/permission_uma_util.cc +++ b/components/permissions/permission_uma_util.cc -@@ -110,6 +110,7 @@ RequestTypeForUma GetUmaValueForRequestType(RequestType request_type) { +@@ -109,6 +109,7 @@ RequestTypeForUma GetUmaValueForRequestType(RequestType request_type) { case RequestType::kWindowPlacement: return RequestTypeForUma::PERMISSION_WINDOW_PLACEMENT; #endif diff --git a/patches/components-permissions-permission_util.cc.patch b/patches/components-permissions-permission_util.cc.patch new file mode 100644 index 000000000000..361ee13d224c --- /dev/null +++ b/patches/components-permissions-permission_util.cc.patch @@ -0,0 +1,12 @@ +diff --git a/components/permissions/permission_util.cc b/components/permissions/permission_util.cc +index 65de1e6a64ac98f2afb9a822c4b365a5bb3c657b..39b86e063a9ecac86249711437dd59da61c8e65d 100644 +--- a/components/permissions/permission_util.cc ++++ b/components/permissions/permission_util.cc +@@ -367,6 +367,7 @@ ContentSettingsType PermissionUtil::PermissionTypeToContentSettingTypeSafe( + return ContentSettingsType::DISPLAY_CAPTURE; + case PermissionType::NUM: + break; ++ PERMISSION_UTIL_PERMISSION_TYPE_TO_CONTENT_SETTINGS_TYPE + } + + return ContentSettingsType::DEFAULT; diff --git a/patches/components-policy-tools-generate_policy_source.py.patch b/patches/components-policy-tools-generate_policy_source.py.patch index 67f6be1d4445..88e67260fa6b 100644 --- a/patches/components-policy-tools-generate_policy_source.py.patch +++ b/patches/components-policy-tools-generate_policy_source.py.patch @@ -1,8 +1,8 @@ diff --git a/components/policy/tools/generate_policy_source.py b/components/policy/tools/generate_policy_source.py -index 7fb456b7a0a77d016c5e16ea597dc6f7831131ef..3741b89178b3e58377deb2ecf9938c6c37ea3bbc 100755 +index a211079ea1e0777e84a7ef12fe3e6ee05c06fb12..f8923256329d263c3fdd4b38c2faef9126685fbf 100755 --- a/components/policy/tools/generate_policy_source.py +++ b/components/policy/tools/generate_policy_source.py -@@ -54,6 +54,7 @@ PLATFORM_STRINGS = { +@@ -55,6 +55,7 @@ PLATFORM_STRINGS = { 'chrome.win7': ['win'], } @@ -10,7 +10,7 @@ index 7fb456b7a0a77d016c5e16ea597dc6f7831131ef..3741b89178b3e58377deb2ecf9938c6c class PolicyDetails: """Parses a policy template and caches all its details.""" -@@ -381,6 +382,7 @@ def main(): +@@ -382,6 +383,7 @@ def main(): chrome_major_version = ParseVersionFile(version_path) template_file_contents = _LoadJSONFile(template_file_name) diff --git a/patches/components-safe_browsing-core-common-safe_browsing_prefs.cc.patch b/patches/components-safe_browsing-core-common-safe_browsing_prefs.cc.patch index 61d053322e51..74f911fd5ab7 100644 --- a/patches/components-safe_browsing-core-common-safe_browsing_prefs.cc.patch +++ b/patches/components-safe_browsing-core-common-safe_browsing_prefs.cc.patch @@ -1,5 +1,5 @@ diff --git a/components/safe_browsing/core/common/safe_browsing_prefs.cc b/components/safe_browsing/core/common/safe_browsing_prefs.cc -index cf55188e9e5f96f26b93864a9633ea82be5414b3..8dad1448200b3211fdf24f7d39060ff84649f7a9 100644 +index 83fc75cadd10c6c968343e829cef0e817456b80a..4fa4853c82ce358c60a030ffbe2454c9bea1b95b 100644 --- a/components/safe_browsing/core/common/safe_browsing_prefs.cc +++ b/components/safe_browsing/core/common/safe_browsing_prefs.cc @@ -150,6 +150,7 @@ bool IsSafeBrowsingEnabled(const PrefService& prefs) { diff --git a/patches/components-search_engines-default_search_manager.cc.patch b/patches/components-search_engines-default_search_manager.cc.patch index 96d316aa7e72..be6045dff8ac 100644 --- a/patches/components-search_engines-default_search_manager.cc.patch +++ b/patches/components-search_engines-default_search_manager.cc.patch @@ -1,5 +1,5 @@ diff --git a/components/search_engines/default_search_manager.cc b/components/search_engines/default_search_manager.cc -index a17d1d4c3b908895acc0b9e43984766e13949b9f..e5bee77f140f024f6c2e9abc41157466c5b222d5 100644 +index e966269360cbe8bb758f0305310147edcbe6c442..70a64550f3dc0ea300ef358d892d7eebe44ab424 100644 --- a/components/search_engines/default_search_manager.cc +++ b/components/search_engines/default_search_manager.cc @@ -312,6 +312,7 @@ void DefaultSearchManager::LoadDefaultSearchEngineFromPrefs() { diff --git a/patches/components-sync-driver-BUILD.gn.patch b/patches/components-sync-driver-BUILD.gn.patch index d31691f3530e..ae4d80150c76 100644 --- a/patches/components-sync-driver-BUILD.gn.patch +++ b/patches/components-sync-driver-BUILD.gn.patch @@ -1,12 +1,10 @@ diff --git a/components/sync/driver/BUILD.gn b/components/sync/driver/BUILD.gn -index 17b1b21fd9e4b2e1f64301178cd0ddd68f074e6c..4ae393d561a2786f644f0d1ce096cb9a7457c7cb 100644 +index b065870c6f0faccee2afa799e5b3962dc33c3565..b434cca86e8ad9e2371ab88fa415913d9670ce31 100644 --- a/components/sync/driver/BUILD.gn +++ b/components/sync/driver/BUILD.gn -@@ -109,6 +109,7 @@ static_library("driver") { +@@ -109,4 +109,5 @@ static_library("driver") { } configs += [ "//build/config/compiler:wexit_time_destructors" ] + sources += brave_components_sync_driver_sources deps += brave_components_sync_driver_deps } - - static_library("test_support") { diff --git a/patches/components-sync-driver-sync_service_impl.h.patch b/patches/components-sync-driver-sync_service_impl.h.patch index 3cd52ee8fbee..d3315e1870c6 100644 --- a/patches/components-sync-driver-sync_service_impl.h.patch +++ b/patches/components-sync-driver-sync_service_impl.h.patch @@ -1,5 +1,5 @@ diff --git a/components/sync/driver/sync_service_impl.h b/components/sync/driver/sync_service_impl.h -index f45bf677f419bc2735b6942afb1d7d04ec189530..4aced8f1696adce6cbcceb172d42007bfb6c2b4b 100644 +index ec0a179baa16e6c8b23f8558adc763dd3e676a03..ae8ea0a85d512158057f1a8450619e37a39f918e 100644 --- a/components/sync/driver/sync_service_impl.h +++ b/components/sync/driver/sync_service_impl.h @@ -245,6 +245,7 @@ class SyncServiceImpl : public SyncService, diff --git a/patches/components-sync-protocol-proto_visitors.h.patch b/patches/components-sync-protocol-proto_visitors.h.patch index 2e753fa3dd82..a1551305377e 100644 --- a/patches/components-sync-protocol-proto_visitors.h.patch +++ b/patches/components-sync-protocol-proto_visitors.h.patch @@ -1,8 +1,8 @@ diff --git a/components/sync/protocol/proto_visitors.h b/components/sync/protocol/proto_visitors.h -index 9dd2374342d6e39cb3c2c81224335f136b6f8e31..c55eebae68a93e418cd4e4101a2e9498d5c34aab 100644 +index 3f450cd4f098855c68234adfbe092bf176d033b5..339a9a4638cd763ff378703763afa67a56ae5c41 100644 --- a/components/sync/protocol/proto_visitors.h +++ b/components/sync/protocol/proto_visitors.h -@@ -401,6 +401,7 @@ VISIT_PROTO_FIELDS(const sync_pb::DeviceInfoSpecifics& proto) { +@@ -471,6 +471,7 @@ VISIT_PROTO_FIELDS(const sync_pb::DeviceInfoSpecifics& proto) { VISIT(manufacturer); VISIT(last_updated_timestamp); VISIT(feature_fields); @@ -10,7 +10,7 @@ index 9dd2374342d6e39cb3c2c81224335f136b6f8e31..c55eebae68a93e418cd4e4101a2e9498 VISIT(sharing_fields); VISIT(invalidation_fields); VISIT(paask_fields); -@@ -413,6 +414,7 @@ VISIT_PROTO_FIELDS(const sync_pb::FeatureSpecificFields& proto) { +@@ -483,6 +484,7 @@ VISIT_PROTO_FIELDS(const sync_pb::FeatureSpecificFields& proto) { VISIT(send_tab_to_self_receiving_enabled); } diff --git a/patches/components-sync-protocol-protocol_sources.gni.patch b/patches/components-sync-protocol-protocol_sources.gni.patch index d221811b0fd9..24f55efd21ca 100644 --- a/patches/components-sync-protocol-protocol_sources.gni.patch +++ b/patches/components-sync-protocol-protocol_sources.gni.patch @@ -1,8 +1,8 @@ diff --git a/components/sync/protocol/protocol_sources.gni b/components/sync/protocol/protocol_sources.gni -index 99e33100cced9a9e573bf3850ec055f60d360772..65ade753c0d8941ee3701cb63b18cabdaf2c731b 100644 +index ad4c341d90c15e218a25a193110dafb65735c412..46632592486d30ee6892d3975adf08ea92ffae4b 100644 --- a/components/sync/protocol/protocol_sources.gni +++ b/components/sync/protocol/protocol_sources.gni -@@ -73,3 +73,4 @@ sync_protocol_sources = [ +@@ -75,3 +75,4 @@ sync_protocol_sources = [ "wifi_configuration_specifics.proto", "workspace_desk_specifics.proto", ] diff --git a/patches/components-sync_device_info-BUILD.gn.patch b/patches/components-sync_device_info-BUILD.gn.patch index 5431eed72d96..a86a1f17b0c4 100644 --- a/patches/components-sync_device_info-BUILD.gn.patch +++ b/patches/components-sync_device_info-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/components/sync_device_info/BUILD.gn b/components/sync_device_info/BUILD.gn -index ed4e2ae3cd30456b071aa120007bfa5850d07b73..885c3e9f31252282720f02ebae27eb7b91e6c4a3 100644 +index 8e23456aad1e16fdb80d6738743ca8c6196237c4..ac82e83bb987bd1acf6d45338fa563f23231c366 100644 --- a/components/sync_device_info/BUILD.gn +++ b/components/sync_device_info/BUILD.gn -@@ -85,6 +85,7 @@ static_library("sync_device_info") { +@@ -88,6 +88,7 @@ static_library("sync_device_info") { "//chromeos/system", ] } diff --git a/patches/components-translate-content-renderer-per_frame_translate_agent.cc.patch b/patches/components-translate-content-renderer-per_frame_translate_agent.cc.patch index 070602d6b6bf..11bd9812e1ca 100644 --- a/patches/components-translate-content-renderer-per_frame_translate_agent.cc.patch +++ b/patches/components-translate-content-renderer-per_frame_translate_agent.cc.patch @@ -1,5 +1,5 @@ diff --git a/components/translate/content/renderer/per_frame_translate_agent.cc b/components/translate/content/renderer/per_frame_translate_agent.cc -index 34974e0bf54b5210faf8b16fc764657f9b55221e..807f21ac6da0bbe29eebe3ef6e5a441e2dc3271a 100644 +index 4426d4b2c6fc22d7cd6dff76ab8bb473112ee2cf..f96bb86592acadf17a9c3f3f03cfb4139e03f13e 100644 --- a/components/translate/content/renderer/per_frame_translate_agent.cc +++ b/components/translate/content/renderer/per_frame_translate_agent.cc @@ -49,7 +49,7 @@ const int kTranslateInitCheckDelayMs = 150; diff --git a/patches/components-update_client-BUILD.gn.patch b/patches/components-update_client-BUILD.gn.patch index 550dd793f43d..fc78ddc0a02e 100644 --- a/patches/components-update_client-BUILD.gn.patch +++ b/patches/components-update_client-BUILD.gn.patch @@ -1,11 +1,12 @@ diff --git a/components/update_client/BUILD.gn b/components/update_client/BUILD.gn -index 6b4f654318ee333bf7bed2765f0d6b3308ce82be..27c1cf7c4afa1193515bbb9b465576187fab3d24 100644 +index e24cc2f013ec994054f7adc6152c1697a0f76a51..b414095666384a9789ac16bd7dc1c3d13b291874 100644 --- a/components/update_client/BUILD.gn +++ b/components/update_client/BUILD.gn -@@ -165,6 +165,7 @@ static_library("update_client") { - "background_downloader_win.h", +@@ -186,6 +186,8 @@ static_library("update_client") { + "puffin_patcher.h", ] } ++ + deps += brave_components_update_client_deps public_deps = brave_components_update_client_public_deps } diff --git a/patches/content-browser-renderer_host-navigation_controller_impl.cc.patch b/patches/content-browser-renderer_host-navigation_controller_impl.cc.patch index 4a8c0139dff8..93b4e088e0fb 100644 --- a/patches/content-browser-renderer_host-navigation_controller_impl.cc.patch +++ b/patches/content-browser-renderer_host-navigation_controller_impl.cc.patch @@ -1,8 +1,8 @@ diff --git a/content/browser/renderer_host/navigation_controller_impl.cc b/content/browser/renderer_host/navigation_controller_impl.cc -index 40b1947b593d1be851f1562fd1b8aad2987c33d1..fdd3b0664ebff4fb415c9050ca952d27fe397a72 100644 +index ff84096f7cf90a55fc333b633101e8628b197185..2c48a07408401c9a8881f3f257572386d0844702 100644 --- a/content/browser/renderer_host/navigation_controller_impl.cc +++ b/content/browser/renderer_host/navigation_controller_impl.cc -@@ -3421,16 +3421,17 @@ base::WeakPtr NavigationControllerImpl::NavigateWithoutEntry( +@@ -3430,16 +3430,17 @@ base::WeakPtr NavigationControllerImpl::NavigateWithoutEntry( // Note: we intentionally leave the pending entry in place for renderer debug // URLs, unlike the cases below where we clear it if the navigation doesn't // proceed. diff --git a/patches/content-browser-renderer_host-navigation_request.cc.patch b/patches/content-browser-renderer_host-navigation_request.cc.patch index 7aacbd4556f1..4d2a6b021cde 100644 --- a/patches/content-browser-renderer_host-navigation_request.cc.patch +++ b/patches/content-browser-renderer_host-navigation_request.cc.patch @@ -1,8 +1,8 @@ diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc -index d542f33b7c5cecb6e66649597bb0d50d74bb3837..9b955eebb5de683a642b8884aefa23b5bf494aa5 100644 +index 37434a26db44ed035fcbebd9febbda10efa859da..8838f90151869bfa7cb2c0923b16b5e5827ef6d3 100644 --- a/content/browser/renderer_host/navigation_request.cc +++ b/content/browser/renderer_host/navigation_request.cc -@@ -2773,6 +2773,7 @@ void NavigationRequest::OnRequestRedirected( +@@ -2790,6 +2790,7 @@ void NavigationRequest::OnRequestRedirected( common_params_->url = redirect_info.new_url; common_params_->method = redirect_info.new_method; common_params_->referrer->url = GURL(redirect_info.new_referrer); @@ -10,7 +10,7 @@ index d542f33b7c5cecb6e66649597bb0d50d74bb3837..9b955eebb5de683a642b8884aefa23b5 common_params_->referrer = Referrer::SanitizeForRequest( common_params_->url, *common_params_->referrer); -@@ -4158,6 +4159,7 @@ void NavigationRequest::OnStartChecksComplete( +@@ -4249,6 +4250,7 @@ void NavigationRequest::OnStartChecksComplete( headers.MergeFrom(TakeModifiedRequestHeaders()); begin_params_->headers = headers.ToString(); diff --git a/patches/content-browser-webui-web_ui_impl.cc.patch b/patches/content-browser-webui-web_ui_impl.cc.patch index d80290a49895..a943733ccd2b 100644 --- a/patches/content-browser-webui-web_ui_impl.cc.patch +++ b/patches/content-browser-webui-web_ui_impl.cc.patch @@ -1,8 +1,8 @@ diff --git a/content/browser/webui/web_ui_impl.cc b/content/browser/webui/web_ui_impl.cc -index cb6c372f2cc9f25f2d3e1092427eda028e55e1b6..b47bab448584868fb612669657d0451323746ab1 100644 +index fbf415fc36b8d9b61b6e25e4eb6bc7427949f28f..195d3af41a22d9a1742df4c1cf70b0e996f19827 100644 --- a/content/browser/webui/web_ui_impl.cc +++ b/content/browser/webui/web_ui_impl.cc -@@ -75,6 +75,7 @@ WebUIImpl::WebUIImpl(WebContentsImpl* contents, RenderFrameHostImpl* frame_host) +@@ -76,6 +76,7 @@ WebUIImpl::WebUIImpl(WebContentsImpl* contents, RenderFrameHostImpl* frame_host) RenderFrameHostImpl::LifecycleStateImpl::kActive || frame_host->lifecycle_state() == RenderFrameHostImpl::LifecycleStateImpl::kSpeculative); diff --git a/patches/content-common-BUILD.gn.patch b/patches/content-common-BUILD.gn.patch index ac90600b29ec..9c7bea666bb0 100644 --- a/patches/content-common-BUILD.gn.patch +++ b/patches/content-common-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn -index 1ac4a63325dca9c8664c9bc1dacd125325d31c9d..b81f8e1eb759518a3de99d7d33b881d310823f2b 100644 +index fe887ad846b8b70e135fcbc64a36b3d2a0b6804e..3a389857c8cd7ef71eca22512a8b4f226400a8b7 100644 --- a/content/common/BUILD.gn +++ b/content/common/BUILD.gn -@@ -42,6 +42,7 @@ source_set("common") { +@@ -70,6 +70,7 @@ source_set("common") { visibility = [ "//content/*", "//tools/ipc_fuzzer/message_replay:ipc_fuzzer_replay", diff --git a/patches/content-public-browser-content_browser_client.h.patch b/patches/content-public-browser-content_browser_client.h.patch index bd3a0588fd97..2c09adce52a8 100644 --- a/patches/content-public-browser-content_browser_client.h.patch +++ b/patches/content-public-browser-content_browser_client.h.patch @@ -1,8 +1,8 @@ diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index 614766cd642efdeab96acac461c1b0482bf030f3..5c990a54f918532a61f95ce3c1ed6f435bfbe9e4 100644 +index bac29d867e465c87f69ea4f28eac118718db0992..7bdb838090d75a3905e25f7eceb14d557b07da4c 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -2021,6 +2021,7 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -2034,6 +2034,7 @@ class CONTENT_EXPORT ContentBrowserClient { virtual ui::AXMode GetAXModeForBrowserContext( BrowserContext* browser_context); diff --git a/patches/content-renderer-render_frame_impl.cc.patch b/patches/content-renderer-render_frame_impl.cc.patch index a86928823767..37dbf20416c1 100644 --- a/patches/content-renderer-render_frame_impl.cc.patch +++ b/patches/content-renderer-render_frame_impl.cc.patch @@ -1,8 +1,8 @@ diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index 207c1b54f12712a8d20a18a024c5ebfb37430d9a..2e12abffe9b76c2f1398386d70c0ab60a168d71b 100644 +index d70f6df69aa604972755d1cfe0cfcd2b0369f68c..9c0f25c4e2436bbbbf9f65ed68609697c4686fb6 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4471,6 +4471,7 @@ bool RenderFrameImpl::ShouldUseUserAgentOverride() const { +@@ -4402,6 +4402,7 @@ bool RenderFrameImpl::ShouldUseUserAgentOverride() const { // Temporarily return early and fix properly as part of // https://crbug.com/426555. if (web_view->MainFrame()->IsWebRemoteFrame()) diff --git a/patches/content-renderer-render_thread_impl.cc.patch b/patches/content-renderer-render_thread_impl.cc.patch index 147cf626b597..83827b0d4ff3 100644 --- a/patches/content-renderer-render_thread_impl.cc.patch +++ b/patches/content-renderer-render_thread_impl.cc.patch @@ -1,8 +1,8 @@ diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc -index 914ecfff4bcec204e549e7d688d898df4b55f486..2f602f21ec0146e5bfac950f741e6f06b459503b 100644 +index a15cfb291dea69d78bad2b4726b013d8a636a361..2118f20bb41cc1d33eb63b356bfaacf3ea318008 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -932,6 +932,7 @@ void RenderThreadImpl::InitializeRenderer( +@@ -933,6 +933,7 @@ void RenderThreadImpl::InitializeRenderer( } void RenderThreadImpl::RegisterSchemes() { diff --git a/patches/extensions-browser-api-web_request-web_request_api.cc.patch b/patches/extensions-browser-api-web_request-web_request_api.cc.patch index 56ee123e5b48..0c7b13399891 100644 --- a/patches/extensions-browser-api-web_request-web_request_api.cc.patch +++ b/patches/extensions-browser-api-web_request-web_request_api.cc.patch @@ -1,8 +1,8 @@ diff --git a/extensions/browser/api/web_request/web_request_api.cc b/extensions/browser/api/web_request/web_request_api.cc -index 2caefc69c046a6432b66a3e98b68f24d60769504..da7c6c8a7cdb64f336e057ef791f1ea208d3dec5 100644 +index c1c48c2b7f2175c55adac971c84cd7b040c1af6e..344dba50662026d889b594fb10f605af9be7bc17 100644 --- a/extensions/browser/api/web_request/web_request_api.cc +++ b/extensions/browser/api/web_request/web_request_api.cc -@@ -1367,6 +1367,9 @@ ExtensionWebRequestEventRouter::OnAuthRequired( +@@ -1372,6 +1372,9 @@ ExtensionWebRequestEventRouter::OnAuthRequired( const net::AuthChallengeInfo& auth_info, AuthCallback callback, net::AuthCredentials* credentials) { diff --git a/patches/extensions-browser-extension_event_histogram_value.h.patch b/patches/extensions-browser-extension_event_histogram_value.h.patch deleted file mode 100644 index 8b3cca12d170..000000000000 --- a/patches/extensions-browser-extension_event_histogram_value.h.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/extensions/browser/extension_event_histogram_value.h b/extensions/browser/extension_event_histogram_value.h -index 387260b4a4bb69cc32fd4ec03c022537ef6ef340..fe75f51bdec0a53d2bc73f0f1bfc24b1fc0e2216 100644 ---- a/extensions/browser/extension_event_histogram_value.h -+++ b/extensions/browser/extension_event_histogram_value.h -@@ -516,6 +516,20 @@ enum HistogramValue { - ACCESSIBILITY_PRIVATE_ON_PUMPKIN_INSTALLED = 494, - ENTERPRISE_REMOTE_APPS_ON_REMOTE_APP_LAUNCHED = 495, - INPUT_METHOD_PRIVATE_ON_CARET_BOUNDS_CHANGED = 496, -+ -+ BRAVE_START = 600, -+ BRAVE_AD_BLOCKED, -+ BRAVE_WALLET_CREATED, -+ BRAVE_ON_WALLET_PROPERTIES, -+ BRAVE_ON_PUBLISHER_DATA, -+ BRAVE_ON_CURRENT_REPORT, -+ BRAVE_ON_BRAVE_THEME_TYPE_CHANGED, -+ BRAVE_REWARDS_NOTIFICATION_ADDED, -+ BRAVE_REWARDS_NOTIFICATION_DELETED, -+ BRAVE_REWARDS_ALL_NOTIFICATIONS_DELETED, -+ BRAVE_REWARDS_GET_NOTIFICATION, -+ BRAVE_REWARDS_GET_ALL_NOTIFICATIONS, -+ BRAVE_WALLET_FAILED, - // Last entry: Add new entries above, then run: - // tools/metrics/histograms/update_extension_histograms.py - ENUM_BOUNDARY diff --git a/patches/extensions-browser-sandboxed_unpacker.cc.patch b/patches/extensions-browser-sandboxed_unpacker.cc.patch index 3b69441900f2..3fe9b526a8d5 100644 --- a/patches/extensions-browser-sandboxed_unpacker.cc.patch +++ b/patches/extensions-browser-sandboxed_unpacker.cc.patch @@ -1,8 +1,8 @@ diff --git a/extensions/browser/sandboxed_unpacker.cc b/extensions/browser/sandboxed_unpacker.cc -index ea5fa4eeb3c56ef3e649f34a2d568608ab3041ed..c642522f2125e01f4d0b54d6c626d82900e62041 100644 +index 6e1dc99b8313c04aedee65ccdf3c893d1890bb74..0852bb3177489092e0254c5531315673b931ef82 100644 --- a/extensions/browser/sandboxed_unpacker.cc +++ b/extensions/browser/sandboxed_unpacker.cc -@@ -999,6 +999,7 @@ absl::optional SandboxedUnpacker::RewriteManifestFile( +@@ -1049,6 +1049,7 @@ absl::optional SandboxedUnpacker::RewriteManifestFile( DCHECK(!public_key_.empty()); base::Value final_manifest = manifest.Clone(); final_manifest.SetStringKey(manifest_keys::kPublicKey, public_key_); diff --git a/patches/extensions-common-api-_api_features.json.patch b/patches/extensions-common-api-_api_features.json.patch index 24b4ad5a2236..2875b1133d6c 100644 --- a/patches/extensions-common-api-_api_features.json.patch +++ b/patches/extensions-common-api-_api_features.json.patch @@ -1,5 +1,5 @@ diff --git a/extensions/common/api/_api_features.json b/extensions/common/api/_api_features.json -index bb5bae5f98d790868cc3c8ec087012d80010bad3..799654228a6cb05f8bb4bf1a399958165ca6b989 100644 +index 6c5f31314942459cb3177232ba682db45ad4d06e..0dcc1d59372dcc53dbcf84c6e79c760ec629e881 100644 --- a/extensions/common/api/_api_features.json +++ b/extensions/common/api/_api_features.json @@ -563,6 +563,7 @@ diff --git a/patches/extensions-common-api-_permission_features.json.patch b/patches/extensions-common-api-_permission_features.json.patch index e111a219992b..ab426d177cbc 100644 --- a/patches/extensions-common-api-_permission_features.json.patch +++ b/patches/extensions-common-api-_permission_features.json.patch @@ -1,5 +1,5 @@ diff --git a/extensions/common/api/_permission_features.json b/extensions/common/api/_permission_features.json -index 90245009efe6b97f0b17c96e301e5ad368a57b42..825ac408666181dad2dc1059a0bbb73277ceb6b0 100644 +index 52fd6778253a0e6938061c7dab3492dff48b1db5..a08e6c41ef8939a716a21e06793b6ff7299e420f 100644 --- a/extensions/common/api/_permission_features.json +++ b/extensions/common/api/_permission_features.json @@ -314,6 +314,7 @@ diff --git a/patches/ios-chrome-browser-BUILD.gn.patch b/patches/ios-chrome-browser-BUILD.gn.patch index 46e91de4e333..f42fcb6e7485 100644 --- a/patches/ios-chrome-browser-BUILD.gn.patch +++ b/patches/ios-chrome-browser-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/ios/chrome/browser/BUILD.gn b/ios/chrome/browser/BUILD.gn -index d1af4494cf724a8fb4e90eaea3c9d8e02964d409..b6fb0ba6866dc7a461c87bea270ebc18c173c473 100644 +index e175726a7534452ced1b27fd1fb26d009e09ac1c..cc07c1e2ef906584121372191b2a4f217b06cce8 100644 --- a/ios/chrome/browser/BUILD.gn +++ b/ios/chrome/browser/BUILD.gn @@ -130,6 +130,7 @@ source_set("browser") { diff --git a/patches/ios-chrome-browser-net-ios_chrome_network_delegate.h.patch b/patches/ios-chrome-browser-net-ios_chrome_network_delegate.h.patch index 7efb5fd00b99..e0d8599f9d02 100644 --- a/patches/ios-chrome-browser-net-ios_chrome_network_delegate.h.patch +++ b/patches/ios-chrome-browser-net-ios_chrome_network_delegate.h.patch @@ -1,11 +1,11 @@ diff --git a/ios/chrome/browser/net/ios_chrome_network_delegate.h b/ios/chrome/browser/net/ios_chrome_network_delegate.h -index a84345cfcead8d80325064cdf7c8e4cbaa36deea..0c74065f9081630a39e37cbc01004358937f00fe 100644 +index 7924f9cfc53401b397934ad649e717b5c4315677..b1e493ca002b8829b86feccb468d88973c230e71 100644 --- a/ios/chrome/browser/net/ios_chrome_network_delegate.h +++ b/ios/chrome/browser/net/ios_chrome_network_delegate.h -@@ -48,6 +48,7 @@ class IOSChromeNetworkDelegate : public net::NetworkDelegateImpl { - PrefService* pref_service); +@@ -49,6 +49,7 @@ class IOSChromeNetworkDelegate : public net::NetworkDelegateImpl { private: + using QueryReason = content_settings::CookieSettings::QueryReason; + BRAVE_IOS_CHROME_NETWORK_DELEGATE_H // NetworkDelegate implementation. int OnBeforeURLRequest(net::URLRequest* request, diff --git a/patches/ios-chrome-browser-prefs-browser_prefs.mm.patch b/patches/ios-chrome-browser-prefs-browser_prefs.mm.patch index b03f43057be4..a1cad235772d 100644 --- a/patches/ios-chrome-browser-prefs-browser_prefs.mm.patch +++ b/patches/ios-chrome-browser-prefs-browser_prefs.mm.patch @@ -1,8 +1,8 @@ diff --git a/ios/chrome/browser/prefs/browser_prefs.mm b/ios/chrome/browser/prefs/browser_prefs.mm -index f18a70b7e1bf0fc635278afd7d8ff66d21cd6450..cbf13623fec89381fea80a416f30a50b6d752b26 100644 +index 4d86ea0dd360ddfa560563d22d0567a579ffe1b0..16cf22c432405b2589eee5ac8c4a33b01caa8c25 100644 --- a/ios/chrome/browser/prefs/browser_prefs.mm +++ b/ios/chrome/browser/prefs/browser_prefs.mm -@@ -231,6 +231,7 @@ void RegisterLocalStatePrefs(PrefRegistrySimple* registry) { +@@ -180,6 +180,7 @@ void RegisterLocalStatePrefs(PrefRegistrySimple* registry) { registry->RegisterIntegerPref(kFRETrialGroupPrefName, 0); registry->RegisterIntegerPref(kTrialGroupV3PrefName, 0); @@ -10,10 +10,11 @@ index f18a70b7e1bf0fc635278afd7d8ff66d21cd6450..cbf13623fec89381fea80a416f30a50b } void RegisterBrowserStatePrefs(user_prefs::PrefRegistrySyncable* registry) { -@@ -363,6 +364,7 @@ void RegisterBrowserStatePrefs(user_prefs::PrefRegistrySyncable* registry) { - policy::policy_prefs::kUserPolicyNotificationWasShown, false); - - registry->RegisterIntegerPref(kAccountIdMigrationState, 0); +@@ -298,6 +299,8 @@ void RegisterBrowserStatePrefs(user_prefs::PrefRegistrySyncable* registry) { + PrefRegistry::LOSSY_PREF); + registry->RegisterTimePref(prefs::kIosShareChromeLastShare, base::Time(), + PrefRegistry::LOSSY_PREF); ++ + BRAVE_REGISTER_BROWSER_STATE_PREFS } diff --git a/patches/ios-chrome-browser-sync-sync_service_factory.mm.patch b/patches/ios-chrome-browser-sync-sync_service_factory.mm.patch index c16395151492..9554cc79fce5 100644 --- a/patches/ios-chrome-browser-sync-sync_service_factory.mm.patch +++ b/patches/ios-chrome-browser-sync-sync_service_factory.mm.patch @@ -1,8 +1,8 @@ diff --git a/ios/chrome/browser/sync/sync_service_factory.mm b/ios/chrome/browser/sync/sync_service_factory.mm -index 46915532135a93d2c0cd5c6703a15c745ab69517..7efea632930b7868bbe68527b98e30d54758fdab 100644 +index 2f95cfba180005c7f04de769c21a0898209f48b9..1128a84e8a0b79b5a1ea7454a045c27e99fd33b4 100644 --- a/ios/chrome/browser/sync/sync_service_factory.mm +++ b/ios/chrome/browser/sync/sync_service_factory.mm -@@ -157,7 +157,7 @@ std::unique_ptr SyncServiceFactory::BuildServiceInstanceFor( +@@ -149,7 +149,7 @@ std::unique_ptr SyncServiceFactory::BuildServiceInstanceFor( policy_connector ? policy_connector->GetPolicyService() : nullptr; auto sync_service = diff --git a/patches/mojo-public-tools-mojom-mojom_parser.py.patch b/patches/mojo-public-tools-mojom-mojom_parser.py.patch index 6b57b01bf6fd..29fa38fc9924 100644 --- a/patches/mojo-public-tools-mojom-mojom_parser.py.patch +++ b/patches/mojo-public-tools-mojom-mojom_parser.py.patch @@ -1,5 +1,5 @@ diff --git a/mojo/public/tools/mojom/mojom_parser.py b/mojo/public/tools/mojom/mojom_parser.py -index 2994d2cece8885d2db85b53ed5ba1c4e1c2df1fb..8430e91347826a593c95635ffdc079d93d48107e 100755 +index cbce1d948ef957a784aeec703091c2b1a798a543..5c43e479f464acee85e8c4f2cf05185bd3b7fbf9 100755 --- a/mojo/public/tools/mojom/mojom_parser.py +++ b/mojo/public/tools/mojom/mojom_parser.py @@ -182,6 +182,7 @@ def _ParseAstHelper(mojom_abspath, enabled_features): diff --git a/patches/net-BUILD.gn.patch b/patches/net-BUILD.gn.patch index 1f498e06003c..6e745c11b95c 100644 --- a/patches/net-BUILD.gn.patch +++ b/patches/net-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/net/BUILD.gn b/net/BUILD.gn -index 029d409152339f81d127b5695bbc3d3d0384b4f1..e470be2820d8fb10e44794db9a6520f063c2f2b4 100644 +index 52f286fde3e32e382079ca2df03af1c125ea1624..ae6612198ca9f1fed4708e2c8e91e4dd488dd8a7 100644 --- a/net/BUILD.gn +++ b/net/BUILD.gn -@@ -1119,6 +1119,7 @@ component("net") { +@@ -1124,6 +1124,7 @@ component("net") { "reporting/reporting_uploader.h", ] } diff --git a/patches/net-cookies-canonical_cookie.cc.patch b/patches/net-cookies-canonical_cookie.cc.patch index 5b4800a470ec..e4dc8722030f 100644 --- a/patches/net-cookies-canonical_cookie.cc.patch +++ b/patches/net-cookies-canonical_cookie.cc.patch @@ -1,8 +1,8 @@ diff --git a/net/cookies/canonical_cookie.cc b/net/cookies/canonical_cookie.cc -index 91d210fa1683da314922a15734d4fabbde8ab873..abed8a9427b0cfe3748ef3f31dd6c2407553fb5c 100644 +index 06fbffaee108b1d4f44ab687e7766da4837c838b..a27b680c0abaea713ee57b3166cbdab1a20951b4 100644 --- a/net/cookies/canonical_cookie.cc +++ b/net/cookies/canonical_cookie.cc -@@ -552,6 +552,7 @@ base::Time CanonicalCookie::ValidateAndAdjustExpiryDate( +@@ -515,6 +515,7 @@ base::Time CanonicalCookie::ValidateAndAdjustExpiryDate( // * network_handler.cc::MakeCookieFromProtocolValues fixed_creation_date = base::Time::Now(); } diff --git a/patches/net-dns-host_cache.cc.patch b/patches/net-dns-host_cache.cc.patch index ff17cc35b1f3..57aeb50867b3 100644 --- a/patches/net-dns-host_cache.cc.patch +++ b/patches/net-dns-host_cache.cc.patch @@ -1,8 +1,8 @@ diff --git a/net/dns/host_cache.cc b/net/dns/host_cache.cc -index 88dbcf54c84c6e950d96db52cf355ef650884ac5..b8f9bcb1ba81210da61163683b497fc76f366841 100644 +index 042d9ff186de4d01a46e5832c21d5d7871d3bb2a..7cc8d891df34ba99509b0bd3e4159dd508b90a70 100644 --- a/net/dns/host_cache.cc +++ b/net/dns/host_cache.cc -@@ -396,6 +396,7 @@ HostCache::Entry HostCache::Entry::CopyWithDefaultPort(uint16_t port) const { +@@ -387,6 +387,7 @@ HostCache::Entry HostCache::Entry::CopyWithDefaultPort(uint16_t port) const { hostname = HostPortPair(hostname.host(), port); } } diff --git a/patches/net-proxy_resolution-configured_proxy_resolution_service.cc.patch b/patches/net-proxy_resolution-configured_proxy_resolution_service.cc.patch index 847d117e0bad..d86f40b875da 100644 --- a/patches/net-proxy_resolution-configured_proxy_resolution_service.cc.patch +++ b/patches/net-proxy_resolution-configured_proxy_resolution_service.cc.patch @@ -1,5 +1,5 @@ diff --git a/net/proxy_resolution/configured_proxy_resolution_service.cc b/net/proxy_resolution/configured_proxy_resolution_service.cc -index d8d6fe7b4c584c431e7f65911bbae1ec31bdf285..fe6ac2816d3959fedb2838219a0028f990c8c1d6 100644 +index 929ddb38ccc70958f5a65f850f3e2dfb40c024a4..72f49b24ed897ce12e8b2e4e89d36980df7ab013 100644 --- a/net/proxy_resolution/configured_proxy_resolution_service.cc +++ b/net/proxy_resolution/configured_proxy_resolution_service.cc @@ -976,6 +976,7 @@ int ConfiguredProxyResolutionService::TryToCompleteSynchronously( diff --git a/patches/sandbox-policy-win-sandbox_win.cc.patch b/patches/sandbox-policy-win-sandbox_win.cc.patch index 51b6bbb99e27..6b893538de6c 100644 --- a/patches/sandbox-policy-win-sandbox_win.cc.patch +++ b/patches/sandbox-policy-win-sandbox_win.cc.patch @@ -1,8 +1,8 @@ diff --git a/sandbox/policy/win/sandbox_win.cc b/sandbox/policy/win/sandbox_win.cc -index 7246e7e12247f886075c419ed21bd969f3a2eeed..5dcde4653c7fba96701e4a29b05d8d08834aa5be 100644 +index 89653c1cef50e66c62534fb8802b5b1a66e29bf3..e2475f1fe890abcffc666cc9eb63fcaa9ef8d4a7 100644 --- a/sandbox/policy/win/sandbox_win.cc +++ b/sandbox/policy/win/sandbox_win.cc -@@ -743,6 +743,7 @@ ResultCode LaunchWithoutSandbox( +@@ -744,6 +744,7 @@ ResultCode LaunchWithoutSandbox( base::Process* process) { base::LaunchOptions options; options.handles_to_inherit = handles_to_inherit; diff --git a/patches/services-network-cookie_settings.cc.patch b/patches/services-network-cookie_settings.cc.patch index 6b3802f211c1..ebdf1f5eeec4 100644 --- a/patches/services-network-cookie_settings.cc.patch +++ b/patches/services-network-cookie_settings.cc.patch @@ -1,8 +1,8 @@ diff --git a/services/network/cookie_settings.cc b/services/network/cookie_settings.cc -index 6649c65f66f0501456d3db9b3643974a5c6c40a6..8566f6c72c2a7e5ac9665f4cd51a779589c2be39 100644 +index bc8267ddd131cd6c3b0472975970467524f5d64c..26decc18c44056f7dfb0e4cb9797dc7764d7be0c 100644 --- a/services/network/cookie_settings.cc +++ b/services/network/cookie_settings.cc -@@ -254,6 +254,7 @@ CookieSettings::GetCookieSettingWithMetadata( +@@ -260,6 +260,7 @@ CookieSettings::GetCookieSettingWithMetadata(const GURL& url, match) { cookie_setting = match->GetContentSetting(); found_explicit_setting = IsExplicitSetting(*match); diff --git a/patches/services-network-cors-cors_url_loader.cc.patch b/patches/services-network-cors-cors_url_loader.cc.patch index 0412eefe77e2..4e7fb53e4069 100644 --- a/patches/services-network-cors-cors_url_loader.cc.patch +++ b/patches/services-network-cors-cors_url_loader.cc.patch @@ -1,8 +1,8 @@ diff --git a/services/network/cors/cors_url_loader.cc b/services/network/cors/cors_url_loader.cc -index 4bec718faedbdcb2b4a15f91b686b580a7c09ad7..80a7cd8341ec1d60b89e760c6581f17cf062baf8 100644 +index 02308439afd608d7623a86c06671dc924d86af56..a8a37b6c14f3144f0c914cb4273a95cfb7a0ebf6 100644 --- a/services/network/cors/cors_url_loader.cc +++ b/services/network/cors/cors_url_loader.cc -@@ -684,6 +684,7 @@ void CorsURLLoader::StartRequest() { +@@ -719,6 +719,7 @@ void CorsURLLoader::StartRequest() { (fetch_cors_flag_ || (request_.method != net::HttpRequestHeaders::kGetMethod && request_.method != net::HttpRequestHeaders::kHeadMethod))) { diff --git a/patches/services-network-public-cpp-BUILD.gn.patch b/patches/services-network-public-cpp-BUILD.gn.patch index 151b36149820..869d7c8de827 100644 --- a/patches/services-network-public-cpp-BUILD.gn.patch +++ b/patches/services-network-public-cpp-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/services/network/public/cpp/BUILD.gn b/services/network/public/cpp/BUILD.gn -index 97738fd4d168c5c53c74fea321e5b8c2c0ab0cf3..55482a1c512fbfb5b721d5c68b57b39a55176735 100644 +index 2685ea866af9ad402d96aadcc38fc8e229af67ae..f76c1b45921d575650872061f1b200fe80b824fb 100644 --- a/services/network/public/cpp/BUILD.gn +++ b/services/network/public/cpp/BUILD.gn @@ -180,6 +180,7 @@ component("cpp") { diff --git a/patches/services-network-public-cpp-cors-cors.cc.patch b/patches/services-network-public-cpp-cors-cors.cc.patch index f8786a8073a8..f9ce9d3829c8 100644 --- a/patches/services-network-public-cpp-cors-cors.cc.patch +++ b/patches/services-network-public-cpp-cors-cors.cc.patch @@ -1,8 +1,8 @@ diff --git a/services/network/public/cpp/cors/cors.cc b/services/network/public/cpp/cors/cors.cc -index e349353578a0991b38fc1197ec2b440562474d86..a3e4e2de13162a2724ad08d3c893435c539bd997 100644 +index 01744779bb2493559ee0616859f29af0df34a455..8ce34e669049c69a9722fddd609cb5da6b1db840 100644 --- a/services/network/public/cpp/cors/cors.cc +++ b/services/network/public/cpp/cors/cors.cc -@@ -340,6 +340,7 @@ bool IsCorsSafelistedHeader(const std::string& name, const std::string& value) { +@@ -345,6 +345,7 @@ bool IsCorsSafelistedHeader(const std::string& name, const std::string& value) { // was introduced to enable safely experimenting with sending a reduced // user agent string in the `User-Agent` header. "sec-ch-ua-reduced", diff --git a/patches/third_party-blink-public-devtools_protocol-browser_protocol.pdl.patch b/patches/third_party-blink-public-devtools_protocol-browser_protocol.pdl.patch index 5ea8dc336155..a9307ded0977 100644 --- a/patches/third_party-blink-public-devtools_protocol-browser_protocol.pdl.patch +++ b/patches/third_party-blink-public-devtools_protocol-browser_protocol.pdl.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/public/devtools_protocol/browser_protocol.pdl b/third_party/blink/public/devtools_protocol/browser_protocol.pdl -index 73feffdbb21001f6672d0987228018aaa3c4a0da..c41050934ffd322bcca8441b5ba17022c167c856 100644 +index 89f9fe3345d6b701b65b9620e4e269015a3d6c9f..c3d08b435451f0fc1f8d6999bf0970c12f8dff1e 100644 --- a/third_party/blink/public/devtools_protocol/browser_protocol.pdl +++ b/third_party/blink/public/devtools_protocol/browser_protocol.pdl -@@ -7131,6 +7131,8 @@ domain Page +@@ -7165,6 +7165,8 @@ domain Page web-share window-placement xr-spatial-tracking diff --git a/patches/third_party-blink-renderer-bindings-generated_in_modules.gni.patch b/patches/third_party-blink-renderer-bindings-generated_in_modules.gni.patch index 13c5c6927d16..b1220b433fe0 100644 --- a/patches/third_party-blink-renderer-bindings-generated_in_modules.gni.patch +++ b/patches/third_party-blink-renderer-bindings-generated_in_modules.gni.patch @@ -1,5 +1,5 @@ diff --git a/third_party/blink/renderer/bindings/generated_in_modules.gni b/third_party/blink/renderer/bindings/generated_in_modules.gni -index 514327ecc6761464522babb36c7e278fd120adad..db2ac06b4d637e0d2406c0b1f396cca66ca53c15 100644 +index 9a957c01b1f59775290a5a15b6bef292e2ef1d5a..9c8cfb17c6d0068ceaab68c559f42262943354fd 100644 --- a/third_party/blink/renderer/bindings/generated_in_modules.gni +++ b/third_party/blink/renderer/bindings/generated_in_modules.gni @@ -2566,6 +2566,7 @@ generated_interface_sources_in_modules = [ @@ -9,4 +9,4 @@ index 514327ecc6761464522babb36c7e278fd120adad..db2ac06b4d637e0d2406c0b1f396cca6 +generated_interface_sources_in_modules += brave_generated_interface_sources_in_modules generated_namespace_sources_in_modules = [ - "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_gpu_buffer_usage.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_css.cc", diff --git a/patches/third_party-blink-renderer-bindings-idl_in_modules.gni.patch b/patches/third_party-blink-renderer-bindings-idl_in_modules.gni.patch index 2655471a7980..8695567a9c33 100644 --- a/patches/third_party-blink-renderer-bindings-idl_in_modules.gni.patch +++ b/patches/third_party-blink-renderer-bindings-idl_in_modules.gni.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/renderer/bindings/idl_in_modules.gni b/third_party/blink/renderer/bindings/idl_in_modules.gni -index be41d9799aa1e9c953919327700a12184877918a..21e7b44bb48964ad8ae7d4a7c080fe042f512c72 100644 +index bf50224d3714b204687c95bde07c853d86552df5..eeccc0ef95f8de166b1aa4eab6510629de0365d8 100644 --- a/third_party/blink/renderer/bindings/idl_in_modules.gni +++ b/third_party/blink/renderer/bindings/idl_in_modules.gni -@@ -1169,6 +1169,7 @@ static_idl_files_in_modules = get_path_info( +@@ -1168,6 +1168,7 @@ static_idl_files_in_modules = get_path_info( "//third_party/blink/renderer/modules/xr/xr_webgl_layer_init.idl", ], "abspath") diff --git a/patches/third_party-blink-renderer-core-BUILD.gn.patch b/patches/third_party-blink-renderer-core-BUILD.gn.patch index f1bb0d3b026e..8a69227e31d9 100644 --- a/patches/third_party-blink-renderer-core-BUILD.gn.patch +++ b/patches/third_party-blink-renderer-core-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn -index 67e1ab84f4e4d395f8de8225786b7688ac9397e5..c2f7515aad1a3762bdf223534c0576f235e8f509 100644 +index 5bea05b0312f0e81b49b467270417f68983bd805..1c457e8ddd26b9b7c179151213554b3c249e5fed 100644 --- a/third_party/blink/renderer/core/BUILD.gn +++ b/third_party/blink/renderer/core/BUILD.gn @@ -365,6 +365,7 @@ component("core") { diff --git a/patches/third_party-blink-renderer-core-html-canvas-html_canvas_element.cc.patch b/patches/third_party-blink-renderer-core-html-canvas-html_canvas_element.cc.patch index 5b50e439387c..6b6835afeede 100644 --- a/patches/third_party-blink-renderer-core-html-canvas-html_canvas_element.cc.patch +++ b/patches/third_party-blink-renderer-core-html-canvas-html_canvas_element.cc.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc b/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc -index 9bcc47f685bd746d9fe06c84d1dd6e1987ed8e87..977fdca8b4f112643d9359743a0729c610413b0b 100644 +index cb2b900c4ff50710611b63fbb02e41289ee64204..d18226ff6b86a88a2f2c7e2fc64128a921183036 100644 --- a/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc +++ b/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc -@@ -1011,6 +1011,7 @@ String HTMLCanvasElement::ToDataURLInternal( +@@ -1027,6 +1027,7 @@ String HTMLCanvasElement::ToDataURLInternal( if (!data_buffer) return String("data:,"); diff --git a/patches/third_party-blink-renderer-core-html-canvas-html_canvas_element.h.patch b/patches/third_party-blink-renderer-core-html-canvas-html_canvas_element.h.patch index fb8336cc554b..b92c0b0fff93 100644 --- a/patches/third_party-blink-renderer-core-html-canvas-html_canvas_element.h.patch +++ b/patches/third_party-blink-renderer-core-html-canvas-html_canvas_element.h.patch @@ -1,5 +1,5 @@ diff --git a/third_party/blink/renderer/core/html/canvas/html_canvas_element.h b/third_party/blink/renderer/core/html/canvas/html_canvas_element.h -index 4e27b92d644ab77a99153ba9a442d2a3a14650e5..70453261cef08e9b7f68c23f8ca70d456aad900c 100644 +index 9ade76060002b7ee411fa887953176e2dee67b67..772db627d9dcd6eb1ea53958a2fb220e917980e1 100644 --- a/third_party/blink/renderer/core/html/canvas/html_canvas_element.h +++ b/third_party/blink/renderer/core/html/canvas/html_canvas_element.h @@ -313,6 +313,7 @@ class CORE_EXPORT HTMLCanvasElement final diff --git a/patches/third_party-blink-renderer-core-permissions_policy-permissions_policy_features.json5.patch b/patches/third_party-blink-renderer-core-permissions_policy-permissions_policy_features.json5.patch index 84663e4fcb1f..33b47d27c7f5 100644 --- a/patches/third_party-blink-renderer-core-permissions_policy-permissions_policy_features.json5.patch +++ b/patches/third_party-blink-renderer-core-permissions_policy-permissions_policy_features.json5.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/renderer/core/permissions_policy/permissions_policy_features.json5 b/third_party/blink/renderer/core/permissions_policy/permissions_policy_features.json5 -index 16ba1fe4ec2c55bd97c9862248dc15c28cb682bf..2b206834a689ecda4ab492eb96abc278d2670dfb 100644 +index 31d45afd16c3a7cb51e4edaccbd69e4f45509eee..090370f8e7dbf63c6f0360660c147d7c637ef780 100644 --- a/third_party/blink/renderer/core/permissions_policy/permissions_policy_features.json5 +++ b/third_party/blink/renderer/core/permissions_policy/permissions_policy_features.json5 -@@ -394,5 +394,13 @@ +@@ -400,5 +400,13 @@ permissions_policy_name: "local-fonts", depends_on: ["FontAccess"], }, diff --git a/patches/third_party-blink-renderer-modules-BUILD.gn.patch b/patches/third_party-blink-renderer-modules-BUILD.gn.patch index 31bae207d530..5041b7f43cf4 100644 --- a/patches/third_party-blink-renderer-modules-BUILD.gn.patch +++ b/patches/third_party-blink-renderer-modules-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/third_party/blink/renderer/modules/BUILD.gn b/third_party/blink/renderer/modules/BUILD.gn -index 4c0c050b35877cffab6e4dab2c54a4060bb518e7..b5ad2bb4db99b095632df664d777fe9677fb8bb6 100644 +index 173e3b5d0739f64cd7b31d3cd1cb7ba7deb7ce89..4770f626534fff4bc82a8c23e868282f68ce872d 100644 --- a/third_party/blink/renderer/modules/BUILD.gn +++ b/third_party/blink/renderer/modules/BUILD.gn @@ -15,6 +15,7 @@ if (is_android) { diff --git a/patches/third_party-blink-renderer-modules-canvas-canvas2d-base_rendering_context_2d.cc.patch b/patches/third_party-blink-renderer-modules-canvas-canvas2d-base_rendering_context_2d.cc.patch index ec8e2cd4a78b..cd981cfb460f 100644 --- a/patches/third_party-blink-renderer-modules-canvas-canvas2d-base_rendering_context_2d.cc.patch +++ b/patches/third_party-blink-renderer-modules-canvas-canvas2d-base_rendering_context_2d.cc.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc b/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc -index a179affbcde238675a269d4fd54e58669d82638b..5adfd4e1fa3290f91a7390bafccbe7bdc2f0583b 100644 +index af1fe3e3fe73fe828a53719e735adba7a8e4fa2c..ddad46f3127c4c357781f88cda07ffb719aebec1 100644 --- a/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc +++ b/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc -@@ -1938,6 +1938,7 @@ ImageData* BaseRenderingContext2D::getImageData( +@@ -1966,6 +1966,7 @@ ImageData* BaseRenderingContext2D::getImageData( } ImageData* BaseRenderingContext2D::getImageDataInternal( @@ -10,7 +10,7 @@ index a179affbcde238675a269d4fd54e58669d82638b..5adfd4e1fa3290f91a7390bafccbe7bd int sx, int sy, int sw, -@@ -2048,6 +2049,7 @@ ImageData* BaseRenderingContext2D::getImageDataInternal( +@@ -2095,6 +2096,7 @@ ImageData* BaseRenderingContext2D::getImageDataInternal( DCHECK(!bounds.intersect(SkIRect::MakeXYWH(sx, sy, sw, sh))); } } diff --git a/patches/third_party-blink-renderer-modules-canvas-canvas2d-canvas_rendering_context_2d.cc.patch b/patches/third_party-blink-renderer-modules-canvas-canvas2d-canvas_rendering_context_2d.cc.patch index 747433c98777..25bd0e6e6616 100644 --- a/patches/third_party-blink-renderer-modules-canvas-canvas2d-canvas_rendering_context_2d.cc.patch +++ b/patches/third_party-blink-renderer-modules-canvas-canvas2d-canvas_rendering_context_2d.cc.patch @@ -1,5 +1,5 @@ diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc -index 69d4834c61b93160529b477c923ec4360e115130..4f03bdb834b30dd612bfc28341d386adc4568fae 100644 +index 4de94bc65b960116a9d937bdf88878120cadae4c..fa3eebc8a9536cd1d37689a1b6639cb341e7174c 100644 --- a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc +++ b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc @@ -913,6 +913,7 @@ TextMetrics* CanvasRenderingContext2D::measureText(const String& text) { diff --git a/patches/third_party-blink-renderer-modules-clipboard-clipboard_promise.cc.patch b/patches/third_party-blink-renderer-modules-clipboard-clipboard_promise.cc.patch index 0050c5acae1e..83faada305c6 100644 --- a/patches/third_party-blink-renderer-modules-clipboard-clipboard_promise.cc.patch +++ b/patches/third_party-blink-renderer-modules-clipboard-clipboard_promise.cc.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/renderer/modules/clipboard/clipboard_promise.cc b/third_party/blink/renderer/modules/clipboard/clipboard_promise.cc -index 232be5f18146d7e54aa41c34fb2f1d4da97c261a..5d678d5c4d57faedf507543939b958bd5ca4c6b4 100644 +index b022b0b6a206efcd5588eb9f1c5303e3d6648bcb..b317d68d6843de555adfacdc89f105e000e6ac54 100644 --- a/third_party/blink/renderer/modules/clipboard/clipboard_promise.cc +++ b/third_party/blink/renderer/modules/clipboard/clipboard_promise.cc -@@ -550,6 +550,7 @@ void ClipboardPromise::RequestPermission( +@@ -548,6 +548,7 @@ void ClipboardPromise::RequestPermission( // Currently NTP relies on readText & writeText to be called without any user // gesture. if (allow_without_sanitization && diff --git a/patches/third_party-blink-renderer-modules-mediastream-media_devices.cc.patch b/patches/third_party-blink-renderer-modules-mediastream-media_devices.cc.patch index 5fc5726d1d7b..95d340d22570 100644 --- a/patches/third_party-blink-renderer-modules-mediastream-media_devices.cc.patch +++ b/patches/third_party-blink-renderer-modules-mediastream-media_devices.cc.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/renderer/modules/mediastream/media_devices.cc b/third_party/blink/renderer/modules/mediastream/media_devices.cc -index f3642a928e9b0429b98098e760d3259ee68bb8b3..a3b4ee285c1e7451f8f623e0883e636718da9b42 100644 +index 13d6b1b6272efc603b19dad0fa2e69499568c002..27382f7df594e5299140653ab7f01f4dcca2960a 100644 --- a/third_party/blink/renderer/modules/mediastream/media_devices.cc +++ b/third_party/blink/renderer/modules/mediastream/media_devices.cc -@@ -688,6 +688,8 @@ void MediaDevices::DevicesEnumerated( +@@ -687,6 +687,8 @@ void MediaDevices::DevicesEnumerated( } } diff --git a/patches/third_party-blink-renderer-modules-plugins-dom_plugin_array.cc.patch b/patches/third_party-blink-renderer-modules-plugins-dom_plugin_array.cc.patch index 1f788fbf509d..a6c952c59e2e 100644 --- a/patches/third_party-blink-renderer-modules-plugins-dom_plugin_array.cc.patch +++ b/patches/third_party-blink-renderer-modules-plugins-dom_plugin_array.cc.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/renderer/modules/plugins/dom_plugin_array.cc b/third_party/blink/renderer/modules/plugins/dom_plugin_array.cc -index 294f40934f1feeb774615d6de1564d7cdca60006..24f00d1a71500dbb9681880fcc3540a2055f1640 100644 +index e4d4a5e9bc9397dac00c61ff6c456d5f14973cb8..45b484a8a81653267943e747949f6a5b3d00e20c 100644 --- a/third_party/blink/renderer/modules/plugins/dom_plugin_array.cc +++ b/third_party/blink/renderer/modules/plugins/dom_plugin_array.cc -@@ -193,6 +193,7 @@ void DOMPluginArray::UpdatePluginData() { +@@ -194,6 +194,7 @@ void DOMPluginArray::UpdatePluginData() { } return; } @@ -10,7 +10,7 @@ index 294f40934f1feeb774615d6de1564d7cdca60006..24f00d1a71500dbb9681880fcc3540a2 PluginData* data = GetPluginData(); if (!data) { dom_plugins_.clear(); -@@ -214,6 +215,7 @@ void DOMPluginArray::UpdatePluginData() { +@@ -215,6 +216,7 @@ void DOMPluginArray::UpdatePluginData() { } } } diff --git a/patches/third_party-blink-renderer-modules-webgl-webgl2_rendering_context_base.cc.patch b/patches/third_party-blink-renderer-modules-webgl-webgl2_rendering_context_base.cc.patch index 0a2098a8337c..14be35553e24 100644 --- a/patches/third_party-blink-renderer-modules-webgl-webgl2_rendering_context_base.cc.patch +++ b/patches/third_party-blink-renderer-modules-webgl-webgl2_rendering_context_base.cc.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/renderer/modules/webgl/webgl2_rendering_context_base.cc b/third_party/blink/renderer/modules/webgl/webgl2_rendering_context_base.cc -index 1184d008cc029c48aeb83fdc79dd10351e20ae53..7b7e6ed4c8bf097d48abdf2cf7f71fdfc406780f 100644 +index d7edca238d7a1390526dc1f74911082ba03fbfb4..41cdf43f2e3f365b55cf6fa43b03b6b7266f3112 100644 --- a/third_party/blink/renderer/modules/webgl/webgl2_rendering_context_base.cc +++ b/third_party/blink/renderer/modules/webgl/webgl2_rendering_context_base.cc -@@ -5260,6 +5260,7 @@ ScriptValue WebGL2RenderingContextBase::getParameter(ScriptState* script_state, +@@ -5216,6 +5216,7 @@ ScriptValue WebGL2RenderingContextBase::getParameter(ScriptState* script_state, GLenum pname) { if (isContextLost()) return ScriptValue::CreateNull(script_state->GetIsolate()); @@ -10,7 +10,7 @@ index 1184d008cc029c48aeb83fdc79dd10351e20ae53..7b7e6ed4c8bf097d48abdf2cf7f71fdf switch (pname) { case GL_SHADING_LANGUAGE_VERSION: { return WebGLAny( -@@ -5803,6 +5804,7 @@ ScriptValue WebGL2RenderingContextBase::getFramebufferAttachmentParameter( +@@ -5759,6 +5760,7 @@ ScriptValue WebGL2RenderingContextBase::getFramebufferAttachmentParameter( if (isContextLost() || !ValidateGetFramebufferAttachmentParameterFunc( kFunctionName, target, attachment)) return ScriptValue::CreateNull(script_state->GetIsolate()); @@ -18,7 +18,7 @@ index 1184d008cc029c48aeb83fdc79dd10351e20ae53..7b7e6ed4c8bf097d48abdf2cf7f71fdf WebGLFramebuffer* framebuffer_binding = GetFramebufferBinding(target); DCHECK(!framebuffer_binding || framebuffer_binding->Object()); -@@ -6021,6 +6023,7 @@ ScriptValue WebGL2RenderingContextBase::getTexParameter( +@@ -5977,6 +5979,7 @@ ScriptValue WebGL2RenderingContextBase::getTexParameter( GLenum pname) { if (isContextLost() || !ValidateTextureBinding("getTexParameter", target)) return ScriptValue::CreateNull(script_state->GetIsolate()); diff --git a/patches/third_party-blink-renderer-modules-webgl-webgl_rendering_context_base.cc.patch b/patches/third_party-blink-renderer-modules-webgl-webgl_rendering_context_base.cc.patch index dffcc6db728a..097ae2c4e8a4 100644 --- a/patches/third_party-blink-renderer-modules-webgl-webgl_rendering_context_base.cc.patch +++ b/patches/third_party-blink-renderer-modules-webgl-webgl_rendering_context_base.cc.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc -index 94d2dfc96fa599e7b2ae2993d1cd0ccbd38acb5f..2077cb74b44957551293aa2ae4325b62f5b1bd5d 100644 +index 2e28b987acf80f6d2352a0e9f8774e6911b4f9d1..f8a927632ffe97ed89cff4a4724f6e17953ec41f 100644 --- a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc +++ b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc -@@ -3012,6 +3012,7 @@ WebGLActiveInfo* WebGLRenderingContextBase::getActiveAttrib( +@@ -3039,6 +3039,7 @@ WebGLActiveInfo* WebGLRenderingContextBase::getActiveAttrib( GLuint index) { if (!ValidateWebGLProgramOrShader("getActiveAttrib", program)) return nullptr; @@ -10,7 +10,7 @@ index 94d2dfc96fa599e7b2ae2993d1cd0ccbd38acb5f..2077cb74b44957551293aa2ae4325b62 GLuint program_id = ObjectNonZero(program); GLint max_name_length = -1; ContextGL()->GetProgramiv(program_id, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, -@@ -3043,6 +3044,7 @@ WebGLActiveInfo* WebGLRenderingContextBase::getActiveUniform( +@@ -3070,6 +3071,7 @@ WebGLActiveInfo* WebGLRenderingContextBase::getActiveUniform( GLuint index) { if (!ValidateWebGLProgramOrShader("getActiveUniform", program)) return nullptr; @@ -18,7 +18,7 @@ index 94d2dfc96fa599e7b2ae2993d1cd0ccbd38acb5f..2077cb74b44957551293aa2ae4325b62 GLuint program_id = ObjectNonZero(program); GLint max_name_length = -1; ContextGL()->GetProgramiv(program_id, GL_ACTIVE_UNIFORM_MAX_LENGTH, -@@ -3073,6 +3075,7 @@ absl::optional>> +@@ -3100,6 +3102,7 @@ absl::optional>> WebGLRenderingContextBase::getAttachedShaders(WebGLProgram* program) { if (!ValidateWebGLProgramOrShader("getAttachedShaders", program)) return absl::nullopt; @@ -26,7 +26,7 @@ index 94d2dfc96fa599e7b2ae2993d1cd0ccbd38acb5f..2077cb74b44957551293aa2ae4325b62 HeapVector> shader_objects; for (GLenum shaderType : {GL_VERTEX_SHADER, GL_FRAGMENT_SHADER}) { -@@ -3087,6 +3090,7 @@ GLint WebGLRenderingContextBase::getAttribLocation(WebGLProgram* program, +@@ -3114,6 +3117,7 @@ GLint WebGLRenderingContextBase::getAttribLocation(WebGLProgram* program, const String& name) { if (!ValidateWebGLProgramOrShader("getAttribLocation", program)) return -1; @@ -34,7 +34,7 @@ index 94d2dfc96fa599e7b2ae2993d1cd0ccbd38acb5f..2077cb74b44957551293aa2ae4325b62 if (!ValidateLocationLength("getAttribLocation", name)) return -1; if (!ValidateString("getAttribLocation", name)) -@@ -3120,6 +3124,7 @@ ScriptValue WebGLRenderingContextBase::getBufferParameter( +@@ -3147,6 +3151,7 @@ ScriptValue WebGLRenderingContextBase::getBufferParameter( GLenum pname) { if (isContextLost() || !ValidateBufferTarget("getBufferParameter", target)) return ScriptValue::CreateNull(script_state->GetIsolate()); @@ -42,7 +42,7 @@ index 94d2dfc96fa599e7b2ae2993d1cd0ccbd38acb5f..2077cb74b44957551293aa2ae4325b62 switch (pname) { case GL_BUFFER_USAGE: { -@@ -3260,6 +3265,7 @@ ScriptValue WebGLRenderingContextBase::getFramebufferAttachmentParameter( +@@ -3287,6 +3292,7 @@ ScriptValue WebGLRenderingContextBase::getFramebufferAttachmentParameter( target, attachment)) return ScriptValue::CreateNull(script_state->GetIsolate()); @@ -50,7 +50,7 @@ index 94d2dfc96fa599e7b2ae2993d1cd0ccbd38acb5f..2077cb74b44957551293aa2ae4325b62 if (!framebuffer_binding_ || !framebuffer_binding_->Object()) { SynthesizeGLError(GL_INVALID_OPERATION, "getFramebufferAttachmentParameter", "no framebuffer bound"); -@@ -3660,6 +3666,7 @@ ScriptValue WebGLRenderingContextBase::getParameter(ScriptState* script_state, +@@ -3687,6 +3693,7 @@ ScriptValue WebGLRenderingContextBase::getParameter(ScriptState* script_state, "invalid parameter name, OES_standard_derivatives not enabled"); return ScriptValue::CreateNull(script_state->GetIsolate()); case WebGLDebugRendererInfo::kUnmaskedRendererWebgl: @@ -58,7 +58,7 @@ index 94d2dfc96fa599e7b2ae2993d1cd0ccbd38acb5f..2077cb74b44957551293aa2ae4325b62 if (ExtensionEnabled(kWebGLDebugRendererInfoName)) { if (IdentifiabilityStudySettings::Get()->ShouldSampleType( blink::IdentifiableSurface::Type::kWebGLParameter)) { -@@ -3675,6 +3682,7 @@ ScriptValue WebGLRenderingContextBase::getParameter(ScriptState* script_state, +@@ -3702,6 +3709,7 @@ ScriptValue WebGLRenderingContextBase::getParameter(ScriptState* script_state, "invalid parameter name, WEBGL_debug_renderer_info not enabled"); return ScriptValue::CreateNull(script_state->GetIsolate()); case WebGLDebugRendererInfo::kUnmaskedVendorWebgl: @@ -66,7 +66,7 @@ index 94d2dfc96fa599e7b2ae2993d1cd0ccbd38acb5f..2077cb74b44957551293aa2ae4325b62 if (ExtensionEnabled(kWebGLDebugRendererInfoName)) { if (IdentifiabilityStudySettings::Get()->ShouldSampleType( blink::IdentifiableSurface::Type::kWebGLParameter)) { -@@ -3767,6 +3775,7 @@ ScriptValue WebGLRenderingContextBase::getProgramParameter( +@@ -3794,6 +3802,7 @@ ScriptValue WebGLRenderingContextBase::getProgramParameter( // intended to prevent applications from entering an infinite polling loop. if (isContextLost() && pname == GL_COMPLETION_STATUS_KHR) return WebGLAny(script_state, true); @@ -74,7 +74,7 @@ index 94d2dfc96fa599e7b2ae2993d1cd0ccbd38acb5f..2077cb74b44957551293aa2ae4325b62 if (!ValidateWebGLProgramOrShader("getProgramParamter", program)) { return ScriptValue::CreateNull(script_state->GetIsolate()); } -@@ -3822,6 +3831,7 @@ ScriptValue WebGLRenderingContextBase::getProgramParameter( +@@ -3849,6 +3858,7 @@ ScriptValue WebGLRenderingContextBase::getProgramParameter( String WebGLRenderingContextBase::getProgramInfoLog(WebGLProgram* program) { if (!ValidateWebGLProgramOrShader("getProgramInfoLog", program)) return String(); @@ -82,7 +82,7 @@ index 94d2dfc96fa599e7b2ae2993d1cd0ccbd38acb5f..2077cb74b44957551293aa2ae4325b62 GLStringQuery query(ContextGL()); return query.Run(ObjectNonZero(program)); } -@@ -3832,6 +3842,7 @@ ScriptValue WebGLRenderingContextBase::getRenderbufferParameter( +@@ -3859,6 +3869,7 @@ ScriptValue WebGLRenderingContextBase::getRenderbufferParameter( GLenum pname) { if (isContextLost()) return ScriptValue::CreateNull(script_state->GetIsolate()); @@ -90,7 +90,7 @@ index 94d2dfc96fa599e7b2ae2993d1cd0ccbd38acb5f..2077cb74b44957551293aa2ae4325b62 if (target != GL_RENDERBUFFER) { SynthesizeGLError(GL_INVALID_ENUM, "getRenderbufferParameter", "invalid target"); -@@ -3883,6 +3894,7 @@ ScriptValue WebGLRenderingContextBase::getShaderParameter( +@@ -3910,6 +3921,7 @@ ScriptValue WebGLRenderingContextBase::getShaderParameter( // intended to prevent applications from entering an infinite polling loop. if (isContextLost() && pname == GL_COMPLETION_STATUS_KHR) return WebGLAny(script_state, true); @@ -98,7 +98,7 @@ index 94d2dfc96fa599e7b2ae2993d1cd0ccbd38acb5f..2077cb74b44957551293aa2ae4325b62 if (!ValidateWebGLProgramOrShader("getShaderParameter", shader)) { return ScriptValue::CreateNull(script_state->GetIsolate()); } -@@ -3914,6 +3926,7 @@ ScriptValue WebGLRenderingContextBase::getShaderParameter( +@@ -3941,6 +3953,7 @@ ScriptValue WebGLRenderingContextBase::getShaderParameter( String WebGLRenderingContextBase::getShaderInfoLog(WebGLShader* shader) { if (!ValidateWebGLProgramOrShader("getShaderInfoLog", shader)) return String(); @@ -106,7 +106,7 @@ index 94d2dfc96fa599e7b2ae2993d1cd0ccbd38acb5f..2077cb74b44957551293aa2ae4325b62 GLStringQuery query(ContextGL()); return query.Run(ObjectNonZero(shader)); } -@@ -3944,6 +3957,7 @@ WebGLShaderPrecisionFormat* WebGLRenderingContextBase::getShaderPrecisionFormat( +@@ -3971,6 +3984,7 @@ WebGLShaderPrecisionFormat* WebGLRenderingContextBase::getShaderPrecisionFormat( GLint precision = 0; ContextGL()->GetShaderPrecisionFormat(shader_type, precision_type, range, &precision); @@ -114,7 +114,7 @@ index 94d2dfc96fa599e7b2ae2993d1cd0ccbd38acb5f..2077cb74b44957551293aa2ae4325b62 auto* result = MakeGarbageCollected( range[0], range[1], precision); if (IdentifiabilityStudySettings::Get()->ShouldSampleType( -@@ -3956,6 +3970,7 @@ WebGLShaderPrecisionFormat* WebGLRenderingContextBase::getShaderPrecisionFormat( +@@ -3983,6 +3997,7 @@ WebGLShaderPrecisionFormat* WebGLRenderingContextBase::getShaderPrecisionFormat( String WebGLRenderingContextBase::getShaderSource(WebGLShader* shader) { if (!ValidateWebGLProgramOrShader("getShaderSource", shader)) return String(); @@ -122,7 +122,7 @@ index 94d2dfc96fa599e7b2ae2993d1cd0ccbd38acb5f..2077cb74b44957551293aa2ae4325b62 return EnsureNotNull(shader->Source()); } -@@ -3981,6 +3996,7 @@ ScriptValue WebGLRenderingContextBase::getTexParameter( +@@ -4008,6 +4023,7 @@ ScriptValue WebGLRenderingContextBase::getTexParameter( GLenum pname) { if (isContextLost()) return ScriptValue::CreateNull(script_state->GetIsolate()); @@ -130,7 +130,7 @@ index 94d2dfc96fa599e7b2ae2993d1cd0ccbd38acb5f..2077cb74b44957551293aa2ae4325b62 if (!ValidateTextureBinding("getTexParameter", target)) return ScriptValue::CreateNull(script_state->GetIsolate()); switch (pname) { -@@ -4015,6 +4031,7 @@ ScriptValue WebGLRenderingContextBase::getUniform( +@@ -4042,6 +4058,7 @@ ScriptValue WebGLRenderingContextBase::getUniform( const WebGLUniformLocation* uniform_location) { if (!ValidateWebGLProgramOrShader("getUniform", program)) return ScriptValue::CreateNull(script_state->GetIsolate()); @@ -138,7 +138,7 @@ index 94d2dfc96fa599e7b2ae2993d1cd0ccbd38acb5f..2077cb74b44957551293aa2ae4325b62 DCHECK(uniform_location); if (uniform_location->Program() != program) { SynthesizeGLError(GL_INVALID_OPERATION, "getUniform", -@@ -4274,6 +4291,7 @@ WebGLUniformLocation* WebGLRenderingContextBase::getUniformLocation( +@@ -4301,6 +4318,7 @@ WebGLUniformLocation* WebGLRenderingContextBase::getUniformLocation( const String& name) { if (!ValidateWebGLProgramOrShader("getUniformLocation", program)) return nullptr; @@ -146,7 +146,7 @@ index 94d2dfc96fa599e7b2ae2993d1cd0ccbd38acb5f..2077cb74b44957551293aa2ae4325b62 if (!ValidateLocationLength("getUniformLocation", name)) return nullptr; if (!ValidateString("getUniformLocation", name)) -@@ -4298,6 +4316,7 @@ ScriptValue WebGLRenderingContextBase::getVertexAttrib( +@@ -4325,6 +4343,7 @@ ScriptValue WebGLRenderingContextBase::getVertexAttrib( GLenum pname) { if (isContextLost()) return ScriptValue::CreateNull(script_state->GetIsolate()); @@ -154,7 +154,7 @@ index 94d2dfc96fa599e7b2ae2993d1cd0ccbd38acb5f..2077cb74b44957551293aa2ae4325b62 if (index >= max_vertex_attribs_) { SynthesizeGLError(GL_INVALID_VALUE, "getVertexAttrib", "index out of range"); -@@ -4375,6 +4394,7 @@ int64_t WebGLRenderingContextBase::getVertexAttribOffset(GLuint index, +@@ -4402,6 +4421,7 @@ int64_t WebGLRenderingContextBase::getVertexAttribOffset(GLuint index, GLenum pname) { if (isContextLost()) return 0; @@ -162,7 +162,7 @@ index 94d2dfc96fa599e7b2ae2993d1cd0ccbd38acb5f..2077cb74b44957551293aa2ae4325b62 GLvoid* result = nullptr; // NOTE: If pname is ever a value that returns more than 1 element // this will corrupt memory. -@@ -4722,6 +4742,7 @@ void WebGLRenderingContextBase::ReadPixelsHelper(GLint x, +@@ -4757,6 +4777,7 @@ void WebGLRenderingContextBase::ReadPixelsHelper(GLint x, int64_t offset) { if (isContextLost()) return; diff --git a/patches/tools-gritsettings-resource_ids.spec.patch b/patches/tools-gritsettings-resource_ids.spec.patch index 6e968ee8f915..b437a8baf613 100644 --- a/patches/tools-gritsettings-resource_ids.spec.patch +++ b/patches/tools-gritsettings-resource_ids.spec.patch @@ -1,5 +1,5 @@ diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec -index 70c5134c185bf725783d19a6cb37881515f9003a..1d39b491ee82067448d208fa04df653c3f79f568 100644 +index d9ae17943b8fcfaa6026869328e60c8cc4057425..64fb50696693046d6c98a642cee13f24aa7e3264 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec @@ -41,6 +41,9 @@ @@ -12,7 +12,7 @@ index 70c5134c185bf725783d19a6cb37881515f9003a..1d39b491ee82067448d208fa04df653c "chrome/app/google_chrome_strings.grd": { "messages": [400], }, -@@ -193,7 +196,7 @@ +@@ -197,7 +200,7 @@ "includes": [1600], }, "<(SHARED_INTERMEDIATE_DIR)/chrome/browser/resources/history/resources.grd": { @@ -21,7 +21,7 @@ index 70c5134c185bf725783d19a6cb37881515f9003a..1d39b491ee82067448d208fa04df653c "includes": [1620], }, "<(SHARED_INTERMEDIATE_DIR)/chrome/browser/resources/identity_internals/resources.grd": { -@@ -645,6 +648,9 @@ +@@ -661,6 +664,9 @@ "components/components_chromium_strings.grd": { "messages": [3520], }, diff --git a/patches/tools-metrics-histograms-metadata-histogram_suffixes_list.xml.patch b/patches/tools-metrics-histograms-metadata-histogram_suffixes_list.xml.patch index 83a90a6ae446..f9c149c20f02 100644 --- a/patches/tools-metrics-histograms-metadata-histogram_suffixes_list.xml.patch +++ b/patches/tools-metrics-histograms-metadata-histogram_suffixes_list.xml.patch @@ -1,8 +1,8 @@ diff --git a/tools/metrics/histograms/metadata/histogram_suffixes_list.xml b/tools/metrics/histograms/metadata/histogram_suffixes_list.xml -index 35758acdf659783e9b7d84acc3b26744d34be18f..1d69fc57b851d36f49ec7934523447d02e401c9d 100644 +index 7bc729f928dc2e0b2ebeacc8818e7e6ed11f5e89..3c4eedb9278deb9a2a3946b0a83d9c6d84f285ce 100644 --- a/tools/metrics/histograms/metadata/histogram_suffixes_list.xml +++ b/tools/metrics/histograms/metadata/histogram_suffixes_list.xml -@@ -7292,6 +7292,7 @@ chromium-metrics-reviews@google.com. +@@ -7268,6 +7268,7 @@ chromium-metrics-reviews@google.com. diff --git a/patches/ui-accessibility-platform-ax_platform_node_cocoa.mm.patch b/patches/ui-accessibility-platform-ax_platform_node_cocoa.mm.patch index 824201c63a1d..6798d5868af8 100644 --- a/patches/ui-accessibility-platform-ax_platform_node_cocoa.mm.patch +++ b/patches/ui-accessibility-platform-ax_platform_node_cocoa.mm.patch @@ -1,8 +1,8 @@ diff --git a/ui/accessibility/platform/ax_platform_node_cocoa.mm b/ui/accessibility/platform/ax_platform_node_cocoa.mm -index 426b6ce73e2e3b68251803769b6f2f2fcfc8f7b3..987ec3cc30d58cebafc03c69e09aa818f90ef4a2 100644 +index 3abaab364acaa76ece4c737a389dbbd3f4691a8c..cde7074118bbf01bba4284b8423c254d85a4e899 100644 --- a/ui/accessibility/platform/ax_platform_node_cocoa.mm +++ b/ui/accessibility/platform/ax_platform_node_cocoa.mm -@@ -2083,6 +2083,7 @@ bool IsAXSetter(SEL selector) { +@@ -2089,6 +2089,7 @@ bool IsAXSetter(SEL selector) { if (!_node) return nil; diff --git a/patches/ui-base-BUILD.gn.patch b/patches/ui-base-BUILD.gn.patch index 5594a83d7e73..375f9f492234 100644 --- a/patches/ui-base-BUILD.gn.patch +++ b/patches/ui-base-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn -index 012ab83bb9f4887646decb030b4a18f6b21e0d01..c58cde9ad185136bc6843df94dde1068a901b8c9 100644 +index 8efef6d9adbca21613be3c32fe9f43b2d50ff8c5..51b6ebe6d24e514d8c337b29e1ad76ad546c3826 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn @@ -487,6 +487,7 @@ component("base") { diff --git a/patches/ui-native_theme-native_theme_win.cc.patch b/patches/ui-native_theme-native_theme_win.cc.patch index a1f92475d6c3..002c07d29791 100644 --- a/patches/ui-native_theme-native_theme_win.cc.patch +++ b/patches/ui-native_theme-native_theme_win.cc.patch @@ -1,12 +1,12 @@ diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc -index 6b9fb74004eba57fdff396124214356f4bcf0852..2b0bfb0a816a58b936ef5b1937e5e4cffc80844e 100644 +index b4840142322aa216369985a52567727f4e6806b7..1e2532ffd7706a41e79ff89685192dec154a9cbb 100644 --- a/ui/native_theme/native_theme_win.cc +++ b/ui/native_theme/native_theme_win.cc -@@ -1580,6 +1580,7 @@ void NativeThemeWin::UpdateDarkModeStatus() { +@@ -1585,6 +1585,7 @@ void NativeThemeWin::UpdateDarkModeStatus() { &apps_use_light_theme); dark_mode_enabled = (apps_use_light_theme == 0); } + BRAVE_NATIVETHEMEWIN_UPDATEDARKMODESTATUS set_use_dark_colors(dark_mode_enabled); set_preferred_color_scheme(CalculatePreferredColorScheme()); - NotifyOnNativeThemeUpdated(); + CloseHandlesInternal(); diff --git a/patches/ui-native_theme-native_theme_win.h.patch b/patches/ui-native_theme-native_theme_win.h.patch index 3f1b558c5615..b2b952b0afc2 100644 --- a/patches/ui-native_theme-native_theme_win.h.patch +++ b/patches/ui-native_theme-native_theme_win.h.patch @@ -1,5 +1,5 @@ diff --git a/ui/native_theme/native_theme_win.h b/ui/native_theme/native_theme_win.h -index dc95e970a5ee1cf4aea458f0fc06a805f53dc903..f9f8dcc4b258cb0829e41fc35a2447f01657e8e4 100644 +index 95d409f5d019053763ff9b3673d9bcd4f3d3508f..740052f36c044374e37d999b58dc96efb5ee9323 100644 --- a/ui/native_theme/native_theme_win.h +++ b/ui/native_theme/native_theme_win.h @@ -76,6 +76,7 @@ class NATIVE_THEME_EXPORT NativeThemeWin : public NativeTheme, diff --git a/patches/ui-views-accessibility-accessibility_paint_checks.cc.patch b/patches/ui-views-accessibility-accessibility_paint_checks.cc.patch new file mode 100644 index 000000000000..885eb08752bf --- /dev/null +++ b/patches/ui-views-accessibility-accessibility_paint_checks.cc.patch @@ -0,0 +1,12 @@ +diff --git a/ui/views/accessibility/accessibility_paint_checks.cc b/ui/views/accessibility/accessibility_paint_checks.cc +index fbda0e2df78ce64d2cd8eb4467228493235837c6..fd09ff50aa7b4911068bddec70848c6e4fe295ab 100644 +--- a/ui/views/accessibility/accessibility_paint_checks.cc ++++ b/ui/views/accessibility/accessibility_paint_checks.cc +@@ -33,6 +33,7 @@ void RunAccessibilityPaintChecks(View* view) { + // some additional fields are processed and set there. + ui::AXNodeData node_data; + view->GetViewAccessibility().GetAccessibleNodeData(&node_data); ++ node_data.SetNameExplicitlyEmpty(); + + // No checks for unfocusable items yet. + if (!node_data.HasState(ax::mojom::State::kFocusable)) diff --git a/patches/ui-webui-resources-BUILD.gn.patch b/patches/ui-webui-resources-BUILD.gn.patch deleted file mode 100644 index 614be0337a98..000000000000 --- a/patches/ui-webui-resources-BUILD.gn.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/ui/webui/resources/BUILD.gn b/ui/webui/resources/BUILD.gn -index 483defefa69d971e6c8f369263c445ac248297f5..d9cd2023dfc8f468dfff82d66b4a3aa7f18c9fdb 100644 ---- a/ui/webui/resources/BUILD.gn -+++ b/ui/webui/resources/BUILD.gn -@@ -394,7 +394,7 @@ ts_library("library") { - "js/web_ui_listener_mixin.ts", - ] - -- if (is_chromeos) { -+ if (!is_android || is_chromeos) { - # cr-searchable-drop-down is only used in smb and cups dialogs, both of - # which are chromeos only. - in_files += [ diff --git a/patches/ui-webui-resources-cr_elements-BUILD.gn.patch b/patches/ui-webui-resources-cr_elements-BUILD.gn.patch deleted file mode 100644 index 300e25b62c79..000000000000 --- a/patches/ui-webui-resources-cr_elements-BUILD.gn.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/ui/webui/resources/cr_elements/BUILD.gn b/ui/webui/resources/cr_elements/BUILD.gn -index cb8f7cbc8e1e4a6bbe19c83fd59f9d252a784005..f1d38635832805a6943ddc1d0994570fd1c5d704 100644 ---- a/ui/webui/resources/cr_elements/BUILD.gn -+++ b/ui/webui/resources/cr_elements/BUILD.gn -@@ -114,7 +114,7 @@ preprocess_if_expr("preprocess_src_ts") { - "mouse_hoverable_mixin.ts", - ] - -- if (is_chromeos) { -+ if (!is_android || is_chromeos) { - in_files += [ "cr_searchable_drop_down/cr_searchable_drop_down.ts" ] - } - } -@@ -277,7 +277,7 @@ preprocess_if_expr("preprocess_generated_ts") { - "search_highlight_style.css.ts", - ] - -- if (is_chromeos) { -+ if (!is_android || is_chromeos) { - in_files += [ "cr_searchable_drop_down/cr_searchable_drop_down.html.ts" ] - } - } -@@ -503,7 +503,7 @@ if (include_polymer) { - "mwb_shared_icons.html", - ] - -- if (is_chromeos) { -+ if (!is_android || is_chromeos) { - in_files += [ "cr_searchable_drop_down/cr_searchable_drop_down.html" ] - } - } diff --git a/patches/ui-webui-resources-cr_elements-cr_elements.gni.patch b/patches/ui-webui-resources-cr_elements-cr_elements.gni.patch new file mode 100644 index 000000000000..00984adba596 --- /dev/null +++ b/patches/ui-webui-resources-cr_elements-cr_elements.gni.patch @@ -0,0 +1,12 @@ +diff --git a/ui/webui/resources/cr_elements/cr_elements.gni b/ui/webui/resources/cr_elements/cr_elements.gni +index 263e74b8727efe0e9a6589360333a300a9bcbdfc..c5b529edb80708ccf0514845151cc0cd3699ca05 100644 +--- a/ui/webui/resources/cr_elements/cr_elements.gni ++++ b/ui/webui/resources/cr_elements/cr_elements.gni +@@ -54,6 +54,7 @@ if (include_polymer) { + web_component_files_polymer_ts += + [ "cr_searchable_drop_down/cr_searchable_drop_down.ts" ] + } ++ else if (!is_android) { web_component_files_polymer_ts += [ "cr_searchable_drop_down/cr_searchable_drop_down.ts" ] } + + icons_html_files = [ + "mwb_shared_icons.html", diff --git a/renderer/brave_render_thread_observer.cc b/renderer/brave_render_thread_observer.cc index 73f193d750fb..dc1499bc8ad7 100644 --- a/renderer/brave_render_thread_observer.cc +++ b/renderer/brave_render_thread_observer.cc @@ -32,9 +32,10 @@ BraveRenderThreadObserver::GetDynamicParams() { void BraveRenderThreadObserver::RegisterMojoInterfaces( blink::AssociatedInterfaceRegistry* associated_interfaces) { - associated_interfaces->AddInterface(base::BindRepeating( - &BraveRenderThreadObserver::OnRendererConfigurationAssociatedRequest, - base::Unretained(this))); + associated_interfaces->AddInterface( + base::BindRepeating( + &BraveRenderThreadObserver::OnRendererConfigurationAssociatedRequest, + base::Unretained(this))); } void BraveRenderThreadObserver::UnregisterMojoInterfaces( diff --git a/script/repack-archive.py b/script/repack-archive.py index e00a0080d416..531a006b9b47 100644 --- a/script/repack-archive.py +++ b/script/repack-archive.py @@ -8,11 +8,14 @@ def GetLZMAExec(): + root_src_dir = os.path.abspath(os.path.join( + os.path.dirname(__file__), *[os.pardir] * 2)) if sys.platform == 'win32': - root_src_dir = os.path.abspath(os.path.join( - os.path.dirname(__file__), *[os.pardir] * 2)) lzma_exec = os.path.join(root_src_dir, "third_party", - "lzma_sdk", "bin", "7za.exe") + "lzma_sdk", "bin", "win64", "7za.exe") + elif sys.platform == 'darwin': + lzma_exec = os.path.join(root_src_dir, "..", "..", "third_party", + "lzma_sdk", "bin", "mac64", "7zz") else: lzma_exec = '7zr' # Use system 7zr. return lzma_exec diff --git a/test/BUILD.gn b/test/BUILD.gn index fadc6a8095e9..c494911dfb21 100644 --- a/test/BUILD.gn +++ b/test/BUILD.gn @@ -83,7 +83,7 @@ static_library("brave_test_support_unit") { test("brave_unit_tests") { testonly = true - configs += [ "//chrome:disable_thinlto_cache_flags" ] + configs += [ "//chrome/test:disable_thinlto_cache_flags" ] sources = [ "//brave/browser/brave_ads/search_result_ad/search_result_ad_service_unittest.cc", @@ -631,7 +631,7 @@ if (!is_android) { "//brave/vendor/bat-native-ads:internal_config", "//brave/vendor/bat-native-ledger:internal_config", "//build/config:precompiled_headers", - "//chrome:disable_thinlto_cache_flags", + "//chrome/test:disable_thinlto_cache_flags", ] sources = [ @@ -841,6 +841,7 @@ if (!is_android) { "//components/javascript_dialogs", "//components/lens", "//components/metrics_services_manager", + "//components/network_session_configurator/common:common", "//components/optimization_guide/core", "//components/permissions:permissions_common", "//components/privacy_sandbox", @@ -1053,7 +1054,7 @@ if (!is_android) { # We need to disable the ThinLTO cache or the linker will die with # a "Resource temporarily unavailable" error due to the linking # reaching the vm.max_map_count limit of 65530 memory mappings. - configs += [ "//chrome:disable_thinlto_cache_flags" ] + configs += [ "//chrome/test:disable_thinlto_cache_flags" ] sources = [ "//brave/browser/net/brave_network_audit_allowed_lists.h", diff --git a/test/filters/browser_tests-linux.filter b/test/filters/browser_tests-linux.filter index a3d09a726a60..0815928cfa72 100644 --- a/test/filters/browser_tests-linux.filter +++ b/test/filters/browser_tests-linux.filter @@ -1,3 +1,4 @@ +-AccessCodeCastHandlerBrowserTest.* -AdsPageLoadMetricsObserverBrowserTest.* -BluetoothLowEnergyApiTest.* -CaptureHandleBrowserTest.* @@ -32,7 +33,6 @@ -ProcessMemoryMetricsEmitterTest.* -PushSubscriptionWithExpirationTimeTest.* -SingleProcessBrowserTest.* --SitePerProcessWebViewTest.* -SpeculationNonPrivatePrefetchesPrefetchProxyTest.* -SpeculationPrefetchProxyTest.* -SpellingOptionsSubMenuObserverTest.* @@ -43,5 +43,4 @@ -WebAuthnCableSecondFactor.* -WebRtcBrowserTest.* -WebRtcDisableEncryptionFlagBrowserTest.* --WebViewTests/WebViewNewWindowTest.NewWindow_DifferentCoopStatesInRelatedWebviews/SiteIsolationForGuestsEnabled -ZeroCacheTimePrefetchProxyBrowserTest.* diff --git a/test/filters/browser_tests.filter b/test/filters/browser_tests.filter index f957aa3b6ba6..0c8462f336ad 100644 --- a/test/filters/browser_tests.filter +++ b/test/filters/browser_tests.filter @@ -11,6 +11,7 @@ -AdsPageLoadMetricsObserverBrowserTest.* -AdsPageLoadMetricsObserverPrerenderingBrowserTest.* -AdsPageLoadMetricsObserverResourceBrowserTest.* +-All/AmpPageLoadMetricsBrowserTest.* -All/BFCachePolicyBrowserTest.* -All/BrowsingDataRemoverBrowserTestP.* -All/ChromeBrowsingDataLifetimeManagerScheduledRemovalTest.* @@ -74,21 +75,21 @@ -All/SearchEnginePreconnectorForegroundBrowserTest.* -All/SearchPrefetchServiceEnabledBrowserTest.* -All/SearchPrefetchServiceNavigationPrefetchBrowserTest.* --All/SharedStorageChromeBrowserTest.AddModule/PrivacySandboxEnabled_3PCookiesAllowed --All/SharedStorageChromeBrowserTest.Append/PrivacySandboxEnabled_3PCookiesAllowed --All/SharedStorageChromeBrowserTest.Clear/PrivacySandboxEnabled_3PCookiesAllowed --All/SharedStorageChromeBrowserTest.Delete/PrivacySandboxEnabled_3PCookiesAllowed --All/SharedStorageChromeBrowserTest.Set/PrivacySandboxEnabled_3PCookiesAllowed --All/SharedStorageChromeBrowserTest.RunOperation/PrivacySandboxEnabled_3PCookiesAllowed --All/SharedStorageChromeBrowserTest.RunURLSelectionOperation/PrivacySandboxEnabled_3PCookiesAllowed --All/SharedStorageChromeBrowserTest.WorkletAppend/PrivacySandboxEnabled_3PCookiesAllowed --All/SharedStorageChromeBrowserTest.WorkletClear/PrivacySandboxEnabled_3PCookiesAllowed --All/SharedStorageChromeBrowserTest.WorkletDelete/PrivacySandboxEnabled_3PCookiesAllowed --All/SharedStorageChromeBrowserTest.WorkletEntries/PrivacySandboxEnabled_3PCookiesAllowed --All/SharedStorageChromeBrowserTest.WorkletGet/PrivacySandboxEnabled_3PCookiesAllowed --All/SharedStorageChromeBrowserTest.WorkletKeys/PrivacySandboxEnabled_3PCookiesAllowed --All/SharedStorageChromeBrowserTest.WorkletLength/PrivacySandboxEnabled_3PCookiesAllowed --All/SharedStorageChromeBrowserTest.WorkletSet/PrivacySandboxEnabled_3PCookiesAllowed +-All/SharedStoragePrefBrowserTest.AddModule/PrivacySandboxEnabled_3PCookiesAllowed +-All/SharedStoragePrefBrowserTest.Append/PrivacySandboxEnabled_3PCookiesAllowed +-All/SharedStoragePrefBrowserTest.Clear/PrivacySandboxEnabled_3PCookiesAllowed +-All/SharedStoragePrefBrowserTest.Delete/PrivacySandboxEnabled_3PCookiesAllowed +-All/SharedStoragePrefBrowserTest.RunOperation/PrivacySandboxEnabled_3PCookiesAllowed +-All/SharedStoragePrefBrowserTest.RunURLSelectionOperation/PrivacySandboxEnabled_3PCookiesAllowed +-All/SharedStoragePrefBrowserTest.Set/PrivacySandboxEnabled_3PCookiesAllowed +-All/SharedStoragePrefBrowserTest.WorkletAppend/PrivacySandboxEnabled_3PCookiesAllowed +-All/SharedStoragePrefBrowserTest.WorkletClear/PrivacySandboxEnabled_3PCookiesAllowed +-All/SharedStoragePrefBrowserTest.WorkletDelete/PrivacySandboxEnabled_3PCookiesAllowed +-All/SharedStoragePrefBrowserTest.WorkletEntries/PrivacySandboxEnabled_3PCookiesAllowed +-All/SharedStoragePrefBrowserTest.WorkletGet/PrivacySandboxEnabled_3PCookiesAllowed +-All/SharedStoragePrefBrowserTest.WorkletKeys/PrivacySandboxEnabled_3PCookiesAllowed +-All/SharedStoragePrefBrowserTest.WorkletLength/PrivacySandboxEnabled_3PCookiesAllowed +-All/SharedStoragePrefBrowserTest.WorkletSet/PrivacySandboxEnabled_3PCookiesAllowed -All/StartupBrowserCreatorInfobarsWithoutStartupWindowTest.* -All/StartupBrowserCreatorPickerInfobarTest.* -All/StartupBrowserCreatorPickerTest.* @@ -129,6 +130,7 @@ -BackgroundFetchBrowserTest.* -BackgroundTabLoadingBrowserTest.RestoreTab -BackgroundTabLoadingBrowserTest.RestoredTabsAreLoadedGradually +-BookmarkBrowsertest.OpenAllBookmarks -BookmarkBubbleSignInDelegateTest.* -BookmarkBubbleViewBrowserTest.* -BookmarkPrerenderBrowsertest.* @@ -169,9 +171,7 @@ -ChromeSitePerProcessTest.* -ChromeURLDataManagerTest.* -ChromeURLDataManagerWebUITrustedTypesTest.* --Chunked/ChunkedPolicyPrefsTest.PolicyToPrefsMapping/0 --Chunked/ChunkedPolicyPrefsTest.PolicyToPrefsMapping/6 --Chunked/ChunkedPolicyPrefsTest.PolicyToPrefsMapping/7 +-Chunked/ChunkedPolicyPrefsTest.PolicyToPrefsMapping/* -ClickToCallBrowserTest.* -ClientHintsAcceptCHFrameObserverBrowserTest.* -ClientHintsBrowserTest.* @@ -213,6 +213,7 @@ -CredentialManagerPrerenderBrowserTest.* -CriticalClientHintsBrowserTest.* -CrossProfileDebuggerApiTest.GetTargets +-CustomizeChromeSidePanelBrowserTest.* -DataSaverWebAPIsBrowserTest.* -DebuggerApiTest.* -DeclarativeContentApiTest.* @@ -242,6 +243,11 @@ -DIPSBounceDetectorBrowserTest.Histograms_BounceCategory_Server -DIPSTabHelperBrowserTest.Histograms_ClickThenStorage -DIPSTabHelperBrowserTest.Histograms_StorageThenClick + +# Disabled as we've already implemented similar changes to prevent language +# fingerprinting, regardless of the feature flag state +-DisableFeatureReduceAcceptLanguageBrowserTest.NoAcceptLanguageHeader + -DiskCachesizeExperiment.* -DistillablePageUtilsBrowserTestAllArticles.* -DNSErrorPageTest.* @@ -320,6 +326,7 @@ -FlocIdProviderSortingLshUninitializedBrowserTest.* -FlocOriginTrialBrowserTest.* -FontPrewarmerTabHelperTest.* +-ForegroundDurationUKMObserverBrowserTest.PrerenderSimple -FramebustBlockPrerenderTest.* -GcmApiTest.* -GeolocationBrowserTest.* @@ -390,6 +397,7 @@ -LazyBackgroundPageApiTest.* -LazyLoadPrerenderBrowserTest.* -LiveCaptionSpeechRecognitionHostTest.* +-LiveTabCountPageLoadMetricsBrowserTest.LoadSingleTabWithPrerendering -LoadAndLaunchExtensionBrowserTest.* -LoadImageBrowserTest.* -LoadingPredictorBrowserTest.* @@ -531,8 +539,12 @@ -PersistentBackground/ExtensionI18nTest.* -PersistentBackground/ExtensionManagementApiTest.* -PersistentBackground/NativeMessagingApiTest.* +-PersistentBackground/NTPInterceptionWebRequestAPITest.NTPRendererRequestsHidden/* -PersistentBackground/PageActionBrowserTest.* +-PersistentBackground/WebNavigationApiPrerenderTestWithContextType.GetFrame/* +-PersistentBackground/WebNavigationApiPrerenderTestWithContextType.Prerendering/* -PersistentBackground/WebNavigationApiTestWithContextType.* +-PersistentBackground/WebUiNtpInterceptionWebRequestAPITest.OneGoogleBarRequestsHidden/* -PersistentScriptingAPITest.* -PictureInPictureWindowControllerPrerenderBrowserTest.* -PlatformAppBrowserTest.* @@ -647,7 +659,11 @@ -SafeBrowsingPolicyTest.* -SafeBrowsingTriggeredPopupBlockerBrowserTest.* -SafeBrowsingTriggeredPopupBlockerPrerenderingBrowserTest.* --SafetyTipPageInfoBubbleViewBrowserTest.DoesntTriggerOnComboSquatting +-SafetyTipPageInfoBubbleViewBrowserTest.NotTriggerOnComboSquattingButNotLaunched +-SafetyTipPageInfoBubbleViewBrowserTest.NotTriggerOnComboSquattingSiteEngagementNotLaunched +-SafetyTipPageInfoBubbleViewBrowserTest.TriggerOnComboSquatting +-SafetyTipPageInfoBubbleViewBrowserTest.TriggerOnComboSquattingSiteEngagement +-SafetyTipPageInfoBubbleViewBrowserTest.TriggerOnlyOnComboSquatting -SafetyTipPageInfoBubbleViewPrerenderBrowserTest.* -SameOriginPartitionedCookiesOriginTrialBrowserTest.* -SameOriginUaReducedOriginTrialBrowserTest.* @@ -667,6 +683,8 @@ -SearchEnginePreconnectorKeepSocketBrowserTest.* -SearchEnginePreconnectorNoDelaysBrowserTest.* -SearchEngineTabHelperPrerenderingBrowserTest.* +-SearchNavigationPrefetchHoldbackBrowserTest.NoPrefetchInsideHoldback +-SearchPrefetchHoldbackBrowserTest.NoFetchInPrefetchHoldback -SearchPrefetchServiceBFCacheTest.* -SearchPrefetchServiceHeadStartTest.* -SearchPrefetchServiceHeadStartTooLongTest.* @@ -683,7 +701,10 @@ -ServiceWorker/ExtensionContextMenuLazyTest.* -ServiceWorker/ExtensionContextMenuSWTest.* -ServiceWorker/ExtensionPreferenceApiTest.* +-ServiceWorker/NTPInterceptionWebRequestAPITest.* +-ServiceWorker/WebNavigationApiPrerenderTestWithContextType.* -ServiceWorker/WebNavigationApiTestWithContextType.* +-ServiceWorker/WebUiNtpInterceptionWebRequestAPITest.* -ServiceWorkerBackgroundSyncTest.* -ServiceWorkerBasedBackgroundTest.* -ServiceWorkerTest.* @@ -697,6 +718,29 @@ -SharedClipboardBrowserTest.* -SharedClipboardUIFeatureDisabledBrowserTest.* -SharedHighlightingBrowserTest.* +-SharedStorageChromeBrowserTest.AddModule_EmptyResultError +-SharedStorageChromeBrowserTest.AddModule_LoadFailureError +-SharedStorageChromeBrowserTest.AddModule_MultipleAddModuleError +-SharedStorageChromeBrowserTest.AddModule_UnexpectedRedirectError +-SharedStorageChromeBrowserTest.Run_FunctionError +-SharedStorageChromeBrowserTest.Run_NotAPromiseError +-SharedStorageChromeBrowserTest.Run_NotLoadedError +-SharedStorageChromeBrowserTest.Run_NotRegisteredError +-SharedStorageChromeBrowserTest.Run_ScriptError +-SharedStorageChromeBrowserTest.Run_UnexpectedCustomDataError +-SharedStorageChromeBrowserTest.SelectUrl_FunctionError +-SharedStorageChromeBrowserTest.SelectUrl_NotAPromiseError +-SharedStorageChromeBrowserTest.SelectUrl_NotLoadedError +-SharedStorageChromeBrowserTest.SelectUrl_NotRegisteredError +-SharedStorageChromeBrowserTest.SelectUrl_OutOfRangeError +-SharedStorageChromeBrowserTest.SelectUrl_ReturnValueToIntError +-SharedStorageChromeBrowserTest.SelectUrl_ScriptError +-SharedStorageChromeBrowserTest.SelectUrl_UnexpectedCustomDataError +-SharedStorageChromeBrowserTest.WorkletKeysEntries_AllIterated +-SharedStorageChromeBrowserTest.WorkletKeysEntries_AllIteratedLessThanTenKeys +-SharedStorageChromeBrowserTest.WorkletKeysEntries_AllIteratedNoKeys +-SharedStorageChromeBrowserTest.WorkletKeysEntries_PartiallyIterated +-SharedStorageChromeBrowserTest.WorkletKeysEntries_PartiallyIteratedLessThanTenKeys -SignedExchangePolicyBrowserTest.BlockList -SignedExchangePolicyTest.* -SignedExchangeSecurityStateTest.SecurityLevelIsSecure/* @@ -706,6 +750,7 @@ -SigninReauthViewControllerFencedFrameBrowserTest.* -SiteDetailsBrowserTest.* -SiteEngagementHelperBrowserTest.* +-SitePerProcessWebViewTest.* -SmartSessionRestoreTest.CorrectLoadingOrder -SoundContentSettingObserverBrowserTest.* -SpeculationNoStatePrefetchBrowserTest.* @@ -728,6 +773,7 @@ -StartupBrowserWithWebAppTest.* -StartupHelperBrowserTest.* -StorageAccessAPIBrowserTest.* +-StorageAccessAPIStorageBrowserTest.MultiTabTest/* -StorageAccessAPIStorageBrowserTest.NestedThirdPartyIFrameStorage/* -StorageAccessAPIStorageBrowserTest.ThirdPartyIFrameStorageRequestsAccess/* -SubframeTaskBrowserTest.* @@ -810,13 +856,14 @@ -WebAppDeclarativeLinkCapturingPrerenderBrowserTest.* -WebAppFrameToolbarBrowserTest_WindowControlsOverlay.* -WebAppFrameToolbarBrowserTest.* --WebAppIntegrationBrowserTest.* --WebAppIntegrationBrowserTestMacWinLinux.* +-WebAppIntegration.* +-WebAppIntegrationTest.* -WebAppLaunchHandlerBrowserTest.* -WebAppLaunchHandlerDisabledBrowserTest.* -WebAppMoverBadPatternBrowsertest.* -WebAppNavigatePrerenderingBrowserTest.* -WebAppOfflineDarkModeTest.* +-WebAppTabStripBrowserTest.ReparentingPinsHomeTab -WebAppTabStripLinkCapturingBrowserTest.* -WebBluetoothTestWithNewPermissionsBackendEnabledInPrerendering.* -WebNavigationApiBackForwardCacheTest.* @@ -845,6 +892,7 @@ -WebViewTests/WebViewFencedFrameTest.FencedFrameInGuestHasGuestSiteInstance/SiteIsolationForGuestsEnabled -WebViewTests/WebViewHttpsFirstModeTest.GuestLoadsHttpWithoutError/SiteIsolationForGuestsEnabled -WebViewTests/WebViewHttpsFirstModeTest.GuestLoadsHttpsWithoutError/SiteIsolationForGuestsEnabled +-WebViewTests/WebViewNewWindowTest.NewWindow_DifferentCoopStatesInRelatedWebviews/SiteIsolationForGuestsEnabled -WebViewTests/WebViewPdfTest.ContextMenuNavigationInMimeHandlerView/SiteIsolationForGuestsEnabled -WebViewTests/WebViewSafeBrowsingTest.Shim_TestLoadAbortSafeBrowsing/SiteIsolationForGuestsEnabled -WebViewTests/WebViewTest.ContextMenusAPI_Basic/SiteIsolationForGuestsDisabled diff --git a/test/filters/unit_tests.filter b/test/filters/unit_tests.filter index 619b0de15287..a863cdb21a9f 100644 --- a/test/filters/unit_tests.filter +++ b/test/filters/unit_tests.filter @@ -15,6 +15,8 @@ -All/DiceWebSigninInterceptorManagedAccountTest.* -All/EnterpriseProfileWelcomeHandleProceedTest.HandleProceed/* -All/ExtensionActionAPIUnitTest.* +-All/ExtensionContextMenuModelWithUserHostControlsTest.PageAccessItemsVisibilityBasedOnSiteSettings/* +-All/ExtensionContextMenuModelWithUserHostControlsTest.TestClickingPageAccessPermissionsPage/* -All/IntentPickerBubbleViewLayoutTest.* -All/InvalidSearchProviderTest.DoesNotSendSuggestRequests/* -All/MultipleRulesetsTest_Unpacked.* @@ -63,6 +65,7 @@ -BrowserUnitTest.* -BrowserViewHostedAppTest.* -BrowserViewTest.* +-CastDialogCoordinatorTest.ShowAndHideDialog -CastDialogViewTest.AccessCodeEmptySinksSourcesAvailable -CastDialogViewTest.ShowAccessCodeCastButtonEnabled -CastHandlerTest.* @@ -84,6 +87,7 @@ -ChromeCustomizeThemesHandlerTest.* -ChromeDownloadManagerDelegateTest.* -ChromeEnterpriseRealTimeUrlLookupServiceTest.* +-ChromeFileSystemAccessPermissionContextTest.ConfirmSensitiveEntryAccess_DangerousFile -ChromeLabs*Test.* -ChromeLocationBarModelDelegateTest.* -ChromeMetricsServicesManagerClientTest.* @@ -323,6 +327,10 @@ -SendTabToSelfUtilTestWithWindow.* -SessionServiceTest.* -SessionStorageApiUnittest.* +-SettingsOverriddenDialogViewUnitTest.DialogResult_ChangeSettingsBack +-SettingsOverriddenDialogViewUnitTest.DialogResult_CloseParentWidget +-SettingsOverriddenDialogViewUnitTest.DialogResult_DismissDialog +-SettingsOverriddenDialogViewUnitTest.DialogResult_KeepNewSettings -SettingsOverriddenParamsProvidersUnitTest.* -SettingsResetPromptModel/ResetStatesTest.* -SettingsResetPromptModelTest.* @@ -334,6 +342,11 @@ -SigninErrorHandlerTest.* -SigninManagerTest.* -SigninUiUtilTest.* +-SingletonTabsTest.DoesNotFindDifferentPath +-SingletonTabsTest.DoesNotFindNonSingletonDisposition +-SingletonTabsTest.DoesNotFindViewSource +-SingletonTabsTest.FindsExactMatch +-SingletonTabsTest.FindsWithDifferentRef -SitePermissionsHelperUnitTest.* -SitePermissionsHelperWithUserHostControlsUnitTest.DowngradingFromAllSitesToOnClickAppliesUserPermittedSites -SideSearchTabContentsHelperTest.* diff --git a/vendor/bat-native-ads/src/bat/ads/internal/base/metrics/field_trial_params_util.h b/vendor/bat-native-ads/src/bat/ads/internal/base/metrics/field_trial_params_util.h index 5900ca896c0a..f4ad0990347f 100644 --- a/vendor/bat-native-ads/src/bat/ads/internal/base/metrics/field_trial_params_util.h +++ b/vendor/bat-native-ads/src/bat/ads/internal/base/metrics/field_trial_params_util.h @@ -8,9 +8,10 @@ #include +#include "base/feature_list.h" + namespace base { class TimeDelta; -struct Feature; } // namespace base namespace ads {