diff --git a/DEPS b/DEPS index 6d14b2abccf8..2ed8cb92a8c8 100644 --- a/DEPS +++ b/DEPS @@ -38,10 +38,17 @@ hooks = [ 'action': ['vpython3', 'script/download_rust_deps.py', '--platform', 'ios'], }, { - # Download rust deps if necessary for Linux, macOS, Windows + # Download rust deps if necessary for Windows 'name': 'download_rust_deps', 'pattern': '.', - 'condition': 'not checkout_android and not checkout_ios', + 'condition': 'checkout_win', + 'action': ['vpython', 'script/download_rust_deps.py'], + }, + { + # Download rust deps if necessary for Linux and macOS + 'name': 'download_rust_deps', + 'pattern': '.', + 'condition': 'not checkout_android and not checkout_ios and not checkout_win', 'action': ['vpython3', 'script/download_rust_deps.py'], }, { diff --git a/android/feed/core/java/src/org/chromium/chrome/browser/feed/BraveFeedSurfaceCoordinator.java b/android/feed/core/java/src/org/chromium/chrome/browser/feed/BraveFeedSurfaceCoordinator.java index 98dd7e5976d1..1112044b1ee5 100644 --- a/android/feed/core/java/src/org/chromium/chrome/browser/feed/BraveFeedSurfaceCoordinator.java +++ b/android/feed/core/java/src/org/chromium/chrome/browser/feed/BraveFeedSurfaceCoordinator.java @@ -17,14 +17,17 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.feed.shared.FeedSurfaceDelegate; import org.chromium.chrome.browser.native_page.NativePageNavigationDelegate; +import org.chromium.chrome.browser.ntp.ScrollableContainerDelegate; import org.chromium.chrome.browser.ntp.SnapScrollHelper; import org.chromium.chrome.browser.ntp.snippets.SectionHeaderView; import org.chromium.chrome.browser.profiles.Profile; +import org.chromium.chrome.browser.share.ShareDelegate; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tabmodel.TabModelSelector; import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager; import org.chromium.components.browser_ui.bottomsheet.BottomSheetController; import org.chromium.ui.UiUtils; +import org.chromium.ui.base.WindowAndroid; public class BraveFeedSurfaceCoordinator extends FeedSurfaceCoordinator { private Activity mActivity; @@ -33,15 +36,18 @@ public class BraveFeedSurfaceCoordinator extends FeedSurfaceCoordinator { private FrameLayout mRootView; public BraveFeedSurfaceCoordinator(Activity activity, SnackbarManager snackbarManager, - TabModelSelector tabModelSelector, Supplier tabProvider, + TabModelSelector tabModelSelector, WindowAndroid windowAndroid, @Nullable SnapScrollHelper snapScrollHelper, @Nullable View ntpHeader, @Nullable SectionHeaderView sectionHeaderView, FeedV1ActionOptions actionOptions, boolean showDarkBackground, FeedSurfaceDelegate delegate, @Nullable NativePageNavigationDelegate pageNavigationDelegate, Profile profile, - boolean isPlaceholderRequested, BottomSheetController bottomSheetController) { - super(activity, snackbarManager, tabModelSelector, tabProvider, snapScrollHelper, ntpHeader, - sectionHeaderView, actionOptions, showDarkBackground, delegate, - pageNavigationDelegate, profile, isPlaceholderRequested, bottomSheetController); + boolean isPlaceholderShownInitially, BottomSheetController bottomSheetController, + Supplier shareDelegateSupplier, + @Nullable ScrollableContainerDelegate externalScrollableContainerDelegate) { + super(activity, snackbarManager, tabModelSelector, windowAndroid, snapScrollHelper, + ntpHeader, sectionHeaderView, actionOptions, showDarkBackground, delegate, + pageNavigationDelegate, profile, isPlaceholderShownInitially, bottomSheetController, + shareDelegateSupplier, externalScrollableContainerDelegate); } @Override diff --git a/android/java/org/chromium/chrome/browser/app/BraveActivity.java b/android/java/org/chromium/chrome/browser/app/BraveActivity.java index 478958b5623c..4ef152363192 100644 --- a/android/java/org/chromium/chrome/browser/app/BraveActivity.java +++ b/android/java/org/chromium/chrome/browser/app/BraveActivity.java @@ -172,10 +172,10 @@ public void onResumeWithNative() { @Override public void onPauseWithNative() { + super.onPauseWithNative(); if (mBraveRewardsNativeWorker != null) { mBraveRewardsNativeWorker.RemoveObserver(this); } - super.onPauseWithNative(); } @Override diff --git a/android/java/org/chromium/chrome/browser/app/appmenu/BraveAppMenuPropertiesDelegateImpl.java b/android/java/org/chromium/chrome/browser/app/appmenu/BraveAppMenuPropertiesDelegateImpl.java index dad90adacaab..ffba7d070fc6 100644 --- a/android/java/org/chromium/chrome/browser/app/appmenu/BraveAppMenuPropertiesDelegateImpl.java +++ b/android/java/org/chromium/chrome/browser/app/appmenu/BraveAppMenuPropertiesDelegateImpl.java @@ -19,6 +19,7 @@ import org.chromium.chrome.browser.ActivityTabProvider; import org.chromium.chrome.browser.bookmarks.BookmarkBridge; import org.chromium.chrome.browser.compositor.layouts.OverviewModeBehavior; +import org.chromium.chrome.browser.feed.webfeed.WebFeedBridge; import org.chromium.chrome.browser.multiwindow.MultiWindowModeStateDispatcher; import org.chromium.chrome.browser.tabmodel.TabModelSelector; import org.chromium.chrome.browser.toolbar.ToolbarManager; @@ -32,10 +33,10 @@ public BraveAppMenuPropertiesDelegateImpl(Context context, TabModelSelector tabModelSelector, ToolbarManager toolbarManager, View decorView, @Nullable OneshotSupplier overviewModeBehaviorSupplier, ObservableSupplier bookmarkBridgeSupplier, - ModalDialogManager modalDialogManager) { + ModalDialogManager modalDialogManager, WebFeedBridge webFeedBridge) { super(context, activityTabProvider, multiWindowModeStateDispatcher, tabModelSelector, toolbarManager, decorView, overviewModeBehaviorSupplier, bookmarkBridgeSupplier, - modalDialogManager); + modalDialogManager, webFeedBridge); } @Override diff --git a/android/java/org/chromium/chrome/browser/appmenu/BraveTabbedAppMenuPropertiesDelegate.java b/android/java/org/chromium/chrome/browser/appmenu/BraveTabbedAppMenuPropertiesDelegate.java index 15a3b080660a..a8b5c1c9aadb 100644 --- a/android/java/org/chromium/chrome/browser/appmenu/BraveTabbedAppMenuPropertiesDelegate.java +++ b/android/java/org/chromium/chrome/browser/appmenu/BraveTabbedAppMenuPropertiesDelegate.java @@ -22,6 +22,7 @@ import org.chromium.chrome.browser.app.appmenu.AppMenuIconRowFooter; import org.chromium.chrome.browser.bookmarks.BookmarkBridge; import org.chromium.chrome.browser.compositor.layouts.OverviewModeBehavior; +import org.chromium.chrome.browser.feed.webfeed.WebFeedBridge; import org.chromium.chrome.browser.flags.ChromeFeatureList; import org.chromium.chrome.browser.multiwindow.MultiWindowModeStateDispatcher; import org.chromium.chrome.browser.notifications.BraveSetDefaultBrowserNotificationService; @@ -47,10 +48,10 @@ public BraveTabbedAppMenuPropertiesDelegate(Context context, AppMenuDelegate appMenuDelegate, OneshotSupplier overviewModeBehaviorSupplier, ObservableSupplier bookmarkBridgeSupplier, - ModalDialogManager modalDialogManager) { + ModalDialogManager modalDialogManager, WebFeedBridge webFeedBridge) { super(context, activityTabProvider, multiWindowModeStateDispatcher, tabModelSelector, toolbarManager, decorView, appMenuDelegate, overviewModeBehaviorSupplier, - bookmarkBridgeSupplier, modalDialogManager); + bookmarkBridgeSupplier, modalDialogManager, webFeedBridge); mAppMenuDelegate = appMenuDelegate; } diff --git a/android/java/org/chromium/chrome/browser/notifications/BraveOnboardingNotification.java b/android/java/org/chromium/chrome/browser/notifications/BraveOnboardingNotification.java index 9ea209931ece..3b93ebe901d0 100644 --- a/android/java/org/chromium/chrome/browser/notifications/BraveOnboardingNotification.java +++ b/android/java/org/chromium/chrome/browser/notifications/BraveOnboardingNotification.java @@ -84,8 +84,8 @@ public static PendingIntentProvider getDeepLinkIntent(Context context) { Intent intent = new Intent(context, BraveOnboardingNotification.class); intent.setAction(DEEP_LINK); return new PendingIntentProvider( - PendingIntent.getBroadcast(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT), - 0); + PendingIntent.getBroadcast(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT), + 0, 0); } @Override diff --git a/android/java/org/chromium/chrome/browser/ntp/BraveNewTabPage.java b/android/java/org/chromium/chrome/browser/ntp/BraveNewTabPage.java index bd866411ae05..006856476e5a 100644 --- a/android/java/org/chromium/chrome/browser/ntp/BraveNewTabPage.java +++ b/android/java/org/chromium/chrome/browser/ntp/BraveNewTabPage.java @@ -9,6 +9,7 @@ import androidx.annotation.Nullable; +import org.chromium.base.supplier.ObservableSupplier; import org.chromium.base.supplier.Supplier; import org.chromium.chrome.browser.browser_controls.BrowserControlsStateProvider; import org.chromium.chrome.browser.compositor.layouts.OverviewModeBehavior; @@ -17,11 +18,13 @@ import org.chromium.chrome.browser.feed.shared.FeedSurfaceProvider; import org.chromium.chrome.browser.lifecycle.ActivityLifecycleDispatcher; import org.chromium.chrome.browser.profiles.Profile; +import org.chromium.chrome.browser.share.ShareDelegate; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tabmodel.TabModelSelector; import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager; import org.chromium.chrome.browser.ui.native_page.NativePageHost; import org.chromium.components.browser_ui.bottomsheet.BottomSheetController; +import org.chromium.ui.base.WindowAndroid; public class BraveNewTabPage extends NewTabPage { private NewTabPageLayout mNewTabPageLayout; @@ -32,10 +35,11 @@ public BraveNewTabPage(Activity activity, Supplier activityTabProvider, SnackbarManager snackbarManager, ActivityLifecycleDispatcher lifecycleDispatcher, TabModelSelector tabModelSelector, boolean isTablet, NewTabPageUma uma, boolean isInNightMode, - NativePageHost nativePageHost, Tab tab, BottomSheetController bottomSheetController) { + NativePageHost nativePageHost, Tab tab, BottomSheetController bottomSheetController, + ObservableSupplier shareDelegateSupplier, WindowAndroid windowAndroid) { super(activity, browserControlsStateProvider, activityTabProvider, snackbarManager, lifecycleDispatcher, tabModelSelector, isTablet, uma, isInNightMode, nativePageHost, - tab, bottomSheetController); + tab, bottomSheetController, shareDelegateSupplier, windowAndroid); assert mNewTabPageLayout instanceof BraveNewTabPageLayout; if (mNewTabPageLayout instanceof BraveNewTabPageLayout) { @@ -44,19 +48,20 @@ public BraveNewTabPage(Activity activity, } @Override - protected void initializeMainView(Activity activity, Supplier tabProvider, + protected void initializeMainView(Activity activity, WindowAndroid windowAndroid, SnackbarManager snackbarManager, TabModelSelector tabModelSelector, NewTabPageUma uma, - boolean isInNightMode, BottomSheetController bottomSheetController) { - super.initializeMainView(activity, tabProvider, snackbarManager, tabModelSelector, uma, - isInNightMode, bottomSheetController); + boolean isInNightMode, BottomSheetController bottomSheetController, + ObservableSupplier shareDelegateSupplier) { + super.initializeMainView(activity, windowAndroid, snackbarManager, tabModelSelector, uma, + isInNightMode, bottomSheetController, shareDelegateSupplier); // Override surface provider Profile profile = Profile.fromWebContents(mTab.getWebContents()); assert !FeedFeatures.isFeedEnabled(); mFeedSurfaceProvider = new BraveFeedSurfaceCoordinator(activity, snackbarManager, - tabModelSelector, tabProvider, + tabModelSelector, windowAndroid, new SnapScrollHelper(mNewTabPageManager, mNewTabPageLayout), mNewTabPageLayout, null, null, isInNightMode, this, mNewTabPageManager.getNavigationDelegate(), - profile, false, bottomSheetController); + profile, false, bottomSheetController, shareDelegateSupplier, null); } } diff --git a/android/java/org/chromium/chrome/browser/ntp/BraveNewTabPageLayout.java b/android/java/org/chromium/chrome/browser/ntp/BraveNewTabPageLayout.java index 120ce3b48e3e..7d0bf6fd9d39 100644 --- a/android/java/org/chromium/chrome/browser/ntp/BraveNewTabPageLayout.java +++ b/android/java/org/chromium/chrome/browser/ntp/BraveNewTabPageLayout.java @@ -111,6 +111,7 @@ import org.chromium.chrome.browser.widget.crypto.binance.CryptoWidgetBottomSheetDialogFragment; import org.chromium.components.browser_ui.widget.displaystyle.UiConfig; import org.chromium.components.user_prefs.UserPrefs; +import org.chromium.ui.base.WindowAndroid; import org.chromium.ui.widget.Toast; import java.util.ArrayList; @@ -503,14 +504,15 @@ public void initialize(NewTabPageManager manager, Activity activity, TileGroup.Delegate tileGroupDelegate, boolean searchProviderHasLogo, boolean searchProviderIsGoogle, ScrollDelegate scrollDelegate, ContextMenuManager contextMenuManager, UiConfig uiConfig, Supplier tabProvider, - ActivityLifecycleDispatcher lifecycleDispatcher, NewTabPageUma uma) { + ActivityLifecycleDispatcher lifecycleDispatcher, NewTabPageUma uma, boolean isIncognito, + WindowAndroid windowAndroid) { super.initialize(manager, activity, tileGroupDelegate, searchProviderHasLogo, searchProviderIsGoogle, scrollDelegate, contextMenuManager, uiConfig, tabProvider, - lifecycleDispatcher, uma); + lifecycleDispatcher, uma, isIncognito, windowAndroid); assert (activity instanceof BraveActivity); mActivity = activity; - ((BraveActivity)mActivity).dismissShieldsTooltip(); + ((BraveActivity) mActivity).dismissShieldsTooltip(); } private void showNTPImage(NTPImage ntpImage) { diff --git a/android/java/org/chromium/chrome/browser/settings/BraveMainPreferencesBase.java b/android/java/org/chromium/chrome/browser/settings/BraveMainPreferencesBase.java index 684e17ddd570..8083efe937f9 100644 --- a/android/java/org/chromium/chrome/browser/settings/BraveMainPreferencesBase.java +++ b/android/java/org/chromium/chrome/browser/settings/BraveMainPreferencesBase.java @@ -95,6 +95,7 @@ private void updateBravePreferences() { removePreferenceIfPresent(MainSettings.PREF_SEARCH_ENGINE); removePreferenceIfPresent(MainSettings.PREF_UI_THEME); removePreferenceIfPresent(MainSettings.PREF_DOWNLOADS); + removePreferenceIfPresent(MainSettings.PREF_SAFETY_CHECK); removePreferenceIfPresent(PREF_LANGUAGES); updateSearchEnginePreference(); diff --git a/android/java/org/chromium/chrome/browser/settings/SearchEngineTabModelSelectorObserver.java b/android/java/org/chromium/chrome/browser/settings/SearchEngineTabModelSelectorObserver.java index f0505d7b7083..8e70c36322d3 100644 --- a/android/java/org/chromium/chrome/browser/settings/SearchEngineTabModelSelectorObserver.java +++ b/android/java/org/chromium/chrome/browser/settings/SearchEngineTabModelSelectorObserver.java @@ -36,4 +36,7 @@ public void onTabModelSelected(TabModel newModel, TabModel oldModel) { @Override public void onTabStateInitialized() {} + + @Override + public void onTabHidden(Tab tab) {} } diff --git a/android/java/org/chromium/chrome/browser/suggestions/tile/BraveTileView.java b/android/java/org/chromium/chrome/browser/suggestions/tile/BraveTileView.java index 5f5c9c8b4eb5..334c0c32f718 100644 --- a/android/java/org/chromium/chrome/browser/suggestions/tile/BraveTileView.java +++ b/android/java/org/chromium/chrome/browser/suggestions/tile/BraveTileView.java @@ -18,8 +18,8 @@ import org.chromium.chrome.browser.ntp_background_images.util.SponsoredImageUtil; import org.chromium.chrome.browser.preferences.BravePref; import org.chromium.chrome.browser.profiles.Profile; -import org.chromium.chrome.browser.suggestions.tile.TileView; import org.chromium.chrome.browser.tabmodel.TabModel; +import org.chromium.components.browser_ui.widget.tile.TileView; import org.chromium.components.user_prefs.UserPrefs; public class BraveTileView extends TileView { diff --git a/android/java/org/chromium/chrome/browser/toolbar/BraveToolbarManager.java b/android/java/org/chromium/chrome/browser/toolbar/BraveToolbarManager.java index eb4e61b1a6e9..709efb6915b4 100644 --- a/android/java/org/chromium/chrome/browser/toolbar/BraveToolbarManager.java +++ b/android/java/org/chromium/chrome/browser/toolbar/BraveToolbarManager.java @@ -34,7 +34,6 @@ import org.chromium.chrome.browser.fullscreen.FullscreenManager; import org.chromium.chrome.browser.homepage.HomepageManager; import org.chromium.chrome.browser.identity_disc.IdentityDiscController; -import org.chromium.chrome.browser.intent.IntentMetadata; import org.chromium.chrome.browser.layouts.LayoutStateProvider; import org.chromium.chrome.browser.lifecycle.ActivityLifecycleDispatcher; import org.chromium.chrome.browser.night_mode.NightModeStateProvider; @@ -129,7 +128,7 @@ public BraveToolbarManager(AppCompatActivity activity, BrowserControlsSizer cont ObservableSupplier tabModelSelectorSupplier, OneshotSupplier startSurfaceSupplier, ObservableSupplier omniboxFocusStateSupplier, - OneshotSupplier intentMetadataOneshotSupplier, + OneshotSupplier intentMetadataOneshotSupplier, OneshotSupplier promoShownOneshotSupplier, WindowAndroid windowAndroid, Supplier isInOverviewModeSupplier, boolean isCustomTab, Supplier modalDialogManagerSupplier, diff --git a/android/java/org/chromium/chrome/browser/toolbar/bottom/BottomToolbarNewTabButton.java b/android/java/org/chromium/chrome/browser/toolbar/bottom/BottomToolbarNewTabButton.java index 1cdd0d97ae8f..1b8f8e66a809 100644 --- a/android/java/org/chromium/chrome/browser/toolbar/bottom/BottomToolbarNewTabButton.java +++ b/android/java/org/chromium/chrome/browser/toolbar/bottom/BottomToolbarNewTabButton.java @@ -21,6 +21,7 @@ import org.chromium.chrome.browser.theme.ThemeColorProvider; import org.chromium.chrome.browser.theme.ThemeColorProvider.ThemeColorObserver; import org.chromium.chrome.browser.theme.ThemeColorProvider.TintObserver; +import org.chromium.chrome.browser.theme.ThemeUtils; import org.chromium.chrome.browser.toolbar.ToolbarColors; import org.chromium.ui.widget.ChromeImageButton; @@ -104,7 +105,7 @@ private void updateBackground() { return; } mBackground.setColorFilter( - ToolbarColors.getTextBoxColorForToolbarBackgroundInNonNativePage(mResources, + ThemeUtils.getTextBoxColorForToolbarBackgroundInNonNativePage(mResources, mThemeColorProvider.getThemeColor(), mThemeColorProvider.useLight() && mIncognitoStateProvider.isIncognitoSelected()), diff --git a/android/java/org/chromium/chrome/browser/toolbar/bottom/BrowsingModeBottomToolbarMediator.java b/android/java/org/chromium/chrome/browser/toolbar/bottom/BrowsingModeBottomToolbarMediator.java index f921544aa631..a8e9fb745e93 100644 --- a/android/java/org/chromium/chrome/browser/toolbar/bottom/BrowsingModeBottomToolbarMediator.java +++ b/android/java/org/chromium/chrome/browser/toolbar/bottom/BrowsingModeBottomToolbarMediator.java @@ -20,7 +20,6 @@ import org.chromium.chrome.browser.flags.ChromeFeatureList; import org.chromium.chrome.browser.theme.ThemeColorProvider; import org.chromium.chrome.browser.theme.ThemeColorProvider.ThemeColorObserver; -import org.chromium.components.browser_ui.widget.FeatureHighlightProvider; import org.chromium.components.feature_engagement.FeatureConstants; import org.chromium.components.feature_engagement.Tracker; @@ -48,8 +47,6 @@ class BrowsingModeBottomToolbarMediator implements ThemeColorObserver { /** A provider that notifies components when the theme color changes.*/ private ThemeColorProvider mThemeColorProvider; - private FeatureHighlightProvider mFeatureHighlightProvider; - /** * Build a new mediator that handles events from outside the bottom toolbar. * @param model The {@link BrowsingModeBottomToolbarModel} that holds all the state for the @@ -57,7 +54,6 @@ class BrowsingModeBottomToolbarMediator implements ThemeColorObserver { */ BrowsingModeBottomToolbarMediator(BrowsingModeBottomToolbarModel model) { mModel = model; - mFeatureHighlightProvider = AppHooks.get().createFeatureHighlightProvider(); } void setThemeColorProvider(ThemeColorProvider themeColorProvider) { diff --git a/android/java/org/chromium/chrome/browser/toolbar/bottom/SearchAccelerator.java b/android/java/org/chromium/chrome/browser/toolbar/bottom/SearchAccelerator.java index a2a2ff74eeed..e0b614b47b33 100644 --- a/android/java/org/chromium/chrome/browser/toolbar/bottom/SearchAccelerator.java +++ b/android/java/org/chromium/chrome/browser/toolbar/bottom/SearchAccelerator.java @@ -20,6 +20,7 @@ import org.chromium.chrome.browser.theme.ThemeColorProvider; import org.chromium.chrome.browser.theme.ThemeColorProvider.ThemeColorObserver; import org.chromium.chrome.browser.theme.ThemeColorProvider.TintObserver; +import org.chromium.chrome.browser.theme.ThemeUtils; import org.chromium.chrome.browser.toolbar.ToolbarColors; import org.chromium.ui.widget.ChromeImageButton; @@ -95,7 +96,7 @@ public void onIncognitoStateChanged(boolean isIncognito) { private void updateBackground() { if (mThemeColorProvider == null || mIncognitoStateProvider == null) return; - mBackground.setColorFilter(ToolbarColors.getTextBoxColorForToolbarBackgroundInNonNativePage( + mBackground.setColorFilter(ThemeUtils.getTextBoxColorForToolbarBackgroundInNonNativePage( mResources, mThemeColorProvider.getThemeColor(), mIncognitoStateProvider.isIncognitoSelected() && mThemeColorProvider.useLight()), diff --git a/android/java/org/chromium/chrome/browser/toolbar/top/BraveTabSwitcherModeTTCoordinatorPhone.java b/android/java/org/chromium/chrome/browser/toolbar/top/BraveTabSwitcherModeTTCoordinatorPhone.java index 0bc93b3b443b..bc8555ace87a 100644 --- a/android/java/org/chromium/chrome/browser/toolbar/top/BraveTabSwitcherModeTTCoordinatorPhone.java +++ b/android/java/org/chromium/chrome/browser/toolbar/top/BraveTabSwitcherModeTTCoordinatorPhone.java @@ -15,9 +15,11 @@ class BraveTabSwitcherModeTTCoordinatorPhone extends TabSwitcherModeTTCoordinato private boolean mIsBottomToolbarVisible; private MenuButtonCoordinator mBraveMenuButtonCoordinator; - BraveTabSwitcherModeTTCoordinatorPhone( - ViewStub tabSwitcherToolbarStub, MenuButtonCoordinator menuButtonCoordinator) { - super(tabSwitcherToolbarStub, menuButtonCoordinator); + BraveTabSwitcherModeTTCoordinatorPhone(ViewStub tabSwitcherToolbarStub, + MenuButtonCoordinator menuButtonCoordinator, boolean isGridTabSwitcherEnabled, + boolean isTabToGtsAnimationEnabled, boolean isStartSurfaceEnabled) { + super(tabSwitcherToolbarStub, menuButtonCoordinator, isGridTabSwitcherEnabled, + isTabToGtsAnimationEnabled, isStartSurfaceEnabled); mBraveMenuButtonCoordinator = menuButtonCoordinator; } diff --git a/android/java/org/chromium/chrome/browser/toolbar/top/BraveToolbarLayout.java b/android/java/org/chromium/chrome/browser/toolbar/top/BraveToolbarLayout.java index 2e5dba1169a2..663b86d99b66 100644 --- a/android/java/org/chromium/chrome/browser/toolbar/top/BraveToolbarLayout.java +++ b/android/java/org/chromium/chrome/browser/toolbar/top/BraveToolbarLayout.java @@ -51,6 +51,7 @@ import org.chromium.base.Log; import org.chromium.base.MathUtils; import org.chromium.base.ThreadUtils; +import org.chromium.base.supplier.BooleanSupplier; import org.chromium.base.task.AsyncTask; import org.chromium.chrome.R; import org.chromium.chrome.browser.BraveAdsNativeHelper; @@ -94,6 +95,7 @@ import org.chromium.chrome.browser.tabmodel.TabModelSelector; import org.chromium.chrome.browser.tabmodel.TabModelSelectorTabModelObserver; import org.chromium.chrome.browser.tabmodel.TabModelSelectorTabObserver; +import org.chromium.chrome.browser.theme.ThemeUtils; import org.chromium.chrome.browser.toolbar.HomeButton; import org.chromium.chrome.browser.toolbar.ToolbarColors; import org.chromium.chrome.browser.toolbar.ToolbarDataProvider; @@ -858,11 +860,12 @@ public void onUrlFocusChange(boolean hasFocus) { super.onUrlFocusChange(hasFocus); } - public void populateUrlAnimatorSet(boolean hasFocus, int urlFocusToolbarButtonsDuration, - int urlClearFocusTabStackDelayMs, List animators) { + public void populateUrlAnimatorSet(boolean showExpandedState, + int urlFocusToolbarButtonsDuration, int urlClearFocusTabStackDelayMs, + List animators) { if (mBraveShieldsButton != null) { Animator animator; - if (hasFocus) { + if (showExpandedState) { float density = getContext().getResources().getDisplayMetrics().density; boolean isRtl = getLayoutDirection() == LAYOUT_DIRECTION_RTL; float toolbarButtonTranslationX = @@ -1104,7 +1107,7 @@ private void updateNotificationBadgeForNewInstall() { @Override public void onThemeColorChanged(int color, boolean shouldAnimate) { - final int textBoxColor = ToolbarColors.getTextBoxColorForToolbarBackgroundInNonNativePage( + final int textBoxColor = ThemeUtils.getTextBoxColorForToolbarBackgroundInNonNativePage( getContext().getResources(), color, isIncognito()); updateModernLocationBarColor(textBoxColor); } @@ -1177,8 +1180,9 @@ private boolean isMenuButtonOnBottom() { @Override protected void initialize(ToolbarDataProvider toolbarDataProvider, - ToolbarTabController tabController, MenuButtonCoordinator menuButtonCoordinator) { - super.initialize(toolbarDataProvider, tabController, menuButtonCoordinator); + ToolbarTabController tabController, MenuButtonCoordinator menuButtonCoordinator, + BooleanSupplier isInVrSupplier) { + super.initialize(toolbarDataProvider, tabController, menuButtonCoordinator, isInVrSupplier); BraveMenuButtonCoordinator.setMenuFromBottom(isMenuButtonOnBottom()); } 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 ca7b8b95ef11..d56b7b20b0ac 100644 --- a/android/java/org/chromium/chrome/browser/toolbar/top/BraveTopToolbarCoordinator.java +++ b/android/java/org/chromium/chrome/browser/toolbar/top/BraveTopToolbarCoordinator.java @@ -8,6 +8,7 @@ import android.content.Context; import org.chromium.base.Callback; +import org.chromium.base.supplier.BooleanSupplier; import org.chromium.base.supplier.ObservableSupplier; import org.chromium.base.supplier.OneshotSupplier; import org.chromium.base.supplier.Supplier; @@ -46,17 +47,22 @@ public BraveTopToolbarCoordinator(ToolbarControlContainer controlContainer, ObservableSupplier appMenuButtonHelperSupplier, ObservableSupplier tabModelSelectorSupplier, ObservableSupplier homeButtonVisibilitySupplier, + ObservableSupplier homepageManagedByPolicySupplier, ObservableSupplier identityDiscStateSupplier, Callback invalidatorCallback, Supplier identityDiscButtonSupplier, OneshotSupplier startSurfaceSupplier, - Supplier resourceManagerSupplier) { + Supplier resourceManagerSupplier, BooleanSupplier isInVrSupplier, + boolean isGridTabSwitcherEnabled, boolean isTabToGtsAnimationEnabled, + boolean isStartSurfaceEnabled) { super(controlContainer, toolbarLayout, toolbarDataProvider, tabController, userEducationHelper, buttonDataProviders, layoutStateProviderSupplier, normalThemeColorProvider, overviewThemeColorProvider, browsingModeMenuButtonCoordinator, overviewModeMenuButtonCoordinator, appMenuButtonHelperSupplier, tabModelSelectorSupplier, homeButtonVisibilitySupplier, - identityDiscStateSupplier, invalidatorCallback, identityDiscButtonSupplier, - startSurfaceSupplier, resourceManagerSupplier); + homepageManagedByPolicySupplier, identityDiscStateSupplier, invalidatorCallback, + identityDiscButtonSupplier, startSurfaceSupplier, resourceManagerSupplier, + isInVrSupplier, isGridTabSwitcherEnabled, isTabToGtsAnimationEnabled, + isStartSurfaceEnabled); mBraveToolbarLayout = toolbarLayout; @@ -64,7 +70,8 @@ public BraveTopToolbarCoordinator(ToolbarControlContainer controlContainer, if (!StartSurfaceConfiguration.isStartSurfaceEnabled()) { mTabSwitcherModeCoordinatorPhone = new BraveTabSwitcherModeTTCoordinatorPhone( controlContainer.getRootView().findViewById(R.id.tab_switcher_toolbar_stub), - overviewModeMenuButtonCoordinator); + overviewModeMenuButtonCoordinator, isGridTabSwitcherEnabled, + isTabToGtsAnimationEnabled, isStartSurfaceEnabled); } } } diff --git a/android/javatests/org/chromium/chrome/browser/BytecodeTest.java b/android/javatests/org/chromium/chrome/browser/BytecodeTest.java index fa8af09f3685..de567ea994fc 100644 --- a/android/javatests/org/chromium/chrome/browser/BytecodeTest.java +++ b/android/javatests/org/chromium/chrome/browser/BytecodeTest.java @@ -24,6 +24,7 @@ import org.chromium.chrome.browser.app.ChromeActivity; import org.chromium.chrome.browser.browser_controls.BrowserControlsSizer; import org.chromium.chrome.browser.compositor.CompositorViewHolder; +import org.chromium.chrome.browser.feed.webfeed.WebFeedBridge; import org.chromium.chrome.browser.findinpage.FindToolbarManager; import org.chromium.chrome.browser.fullscreen.FullscreenManager; import org.chromium.chrome.browser.identity_disc.IdentityDiscController; @@ -229,7 +230,8 @@ public void testConstructorsExistAndMatch() throws Exception { "org/chromium/chrome/browser/appmenu/BraveTabbedAppMenuPropertiesDelegate", Context.class, ActivityTabProvider.class, MultiWindowModeStateDispatcher.class, TabModelSelector.class, ToolbarManager.class, View.class, AppMenuDelegate.class, - OneshotSupplier.class, ObservableSupplier.class, ModalDialogManager.class)); + OneshotSupplier.class, ObservableSupplier.class, ModalDialogManager.class, + WebFeedBridge.class)); Assert.assertTrue(constructorsMatch("org/chromium/chrome/browser/tabmodel/ChromeTabCreator", "org/chromium/chrome/browser/tabmodel/BraveTabCreator", ChromeActivity.class, WindowAndroid.class, StartupTabPreloader.class, Supplier.class, boolean.class, @@ -257,7 +259,7 @@ public void testConstructorsExistAndMatch() throws Exception { "org/chromium/chrome/browser/app/appmenu/BraveAppMenuPropertiesDelegateImpl", Context.class, ActivityTabProvider.class, MultiWindowModeStateDispatcher.class, TabModelSelector.class, ToolbarManager.class, View.class, OneshotSupplier.class, - ObservableSupplier.class, ModalDialogManager.class)); + ObservableSupplier.class, ModalDialogManager.class, WebFeedBridge.class)); Assert.assertTrue( constructorsMatch("org/chromium/chrome/browser/settings/SettingsLauncherImpl", "org/chromium/chrome/browser/settings/BraveSettingsLauncherImpl")); diff --git a/android/javatests/org/chromium/chrome/browser/safety_check/BraveSafetyCheckSettingsFragmentTest.java b/android/javatests/org/chromium/chrome/browser/safety_check/BraveSafetyCheckSettingsFragmentTest.java new file mode 100644 index 000000000000..1362beb4c38b --- /dev/null +++ b/android/javatests/org/chromium/chrome/browser/safety_check/BraveSafetyCheckSettingsFragmentTest.java @@ -0,0 +1,59 @@ +/* Copyright (c) 2021 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.safety_check; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotEquals; + +import android.support.test.filters.SmallTest; + +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; + +import org.chromium.chrome.browser.flags.ChromeFeatureList; +import org.chromium.chrome.browser.settings.SettingsActivityTestRule; +import org.chromium.chrome.test.ChromeJUnit4ClassRunner; +import org.chromium.chrome.test.util.browser.Features; + +// Currently safety check setion is not used in Brave. +// Main purpose of these tests id to detect that something new, that we may consider valuable, is +// appeared in this section . +@RunWith(ChromeJUnit4ClassRunner.class) +@Features.EnableFeatures(ChromeFeatureList.SAFETY_CHECK_ANDROID) +public class BraveSafetyCheckSettingsFragmentTest { + private static final String PASSWORDS = "passwords"; + private static final String SAFE_BROWSING = "safe_browsing"; + private static final String UPDATES = "updates"; + // Text description plus 3 items above. + private static final int NUMBER_OF_ITEMS = 4; + + @Rule + public SettingsActivityTestRule mSettingsActivityTestRule = + new SettingsActivityTestRule<>(SafetyCheckSettingsFragment.class); + private SafetyCheckSettingsFragment mFragment; + + @Before + public void setUp() { + mSettingsActivityTestRule.startSettingsActivity(); + mFragment = (SafetyCheckSettingsFragment) mSettingsActivityTestRule.getFragment(); + } + + @Test + @SmallTest + public void testNumberOfItemsNotChanged() { + assertEquals(NUMBER_OF_ITEMS, mFragment.getPreferenceScreen().getPreferenceCount()); + } + + @Test + @SmallTest + public void testExactSameItemsAreThere() { + assertNotEquals(null, mFragment.findPreference(PASSWORDS)); + assertNotEquals(null, mFragment.findPreference(SAFE_BROWSING)); + assertNotEquals(null, mFragment.findPreference(UPDATES)); + } +} diff --git a/app/brave_generated_resources.grd b/app/brave_generated_resources.grd index 95e48007e789..61b2435f0494 100644 --- a/app/brave_generated_resources.grd +++ b/app/brave_generated_resources.grd @@ -57,7 +57,6 @@ - @@ -98,6 +97,10 @@ + + + + diff --git a/app/brave_main_delegate.cc b/app/brave_main_delegate.cc index c003c9f9c2d5..e3c5fef0b40d 100644 --- a/app/brave_main_delegate.cc +++ b/app/brave_main_delegate.cc @@ -220,7 +220,6 @@ bool BraveMainDelegate::BasicStartupComplete(int* exit_code) { features::kIdleDetection.name, features::kLangClientHintHeader.name, features::kNotificationTriggers.name, - features::kPrivacySettingsRedesign.name, features::kSignedExchangePrefetchCacheForNavigations.name, features::kSignedExchangeSubresourcePrefetch.name, features::kSubresourceWebBundles.name, @@ -232,6 +231,7 @@ bool BraveMainDelegate::BasicStartupComplete(int* exit_code) { #if defined(OS_ANDROID) features::kWebNfc.name, feed::kInterestFeedContentSuggestions.name, + feed::kInterestFeedV2.name, offline_pages::kPrefetchingOfflinePagesFeature.name, translate::kTranslate.name, #endif diff --git a/app/brave_main_delegate_browsertest.cc b/app/brave_main_delegate_browsertest.cc index 50a660167c6e..251bb850b3d5 100644 --- a/app/brave_main_delegate_browsertest.cc +++ b/app/brave_main_delegate_browsertest.cc @@ -70,7 +70,6 @@ IN_PROC_BROWSER_TEST_F(BraveMainDelegateBrowserTest, DisabledFeatures) { &features::kIdleDetection, &features::kLangClientHintHeader, &features::kNotificationTriggers, - &features::kPrivacySettingsRedesign, &features::kSignedExchangePrefetchCacheForNavigations, &features::kSignedExchangeSubresourcePrefetch, &features::kSubresourceWebBundles, diff --git a/app/brave_strings.grd b/app/brave_strings.grd index 075522be7f7c..34bef7f5ffa0 100644 --- a/app/brave_strings.grd +++ b/app/brave_strings.grd @@ -37,6 +37,9 @@ If you update this file, be sure also to update google_chrome_strings.grd. --> + + + @@ -52,7 +55,6 @@ If you update this file, be sure also to update google_chrome_strings.grd. --> - @@ -92,6 +94,10 @@ If you update this file, be sure also to update google_chrome_strings.grd. --> + + + + @@ -176,7 +182,7 @@ If you update this file, be sure also to update google_chrome_strings.grd. --> - + @@ -742,6 +748,12 @@ Brave is unable to recover your settings. $1Elisa is already signed in to this Brave profile. To keep your browsing separate, Brave can create your own profile for you. + + $1Elisa is already signed in to this Brave profile. This will create a new Brave profile for $2foo@gmail.com + + + This will create a new Brave profile for $1foo@gmail.com + - - - Restart Brave to enable $1Flash - - - @@ -1091,14 +1096,6 @@ Brave is unable to recover your settings. - - - - You can manage this and other Brave sync chains you've added for $1John from one place in <a id="osSettingsLink" href="$2https://google.com/">Settings</a>. - Permissions you have granted to websites in the Brave browser and apps from Google Play may apply to all accounts. - - - @@ -1186,6 +1183,9 @@ Brave is unable to recover your settings. Welcome to Brave profiles + + Who's using Brave? + With Brave profiles you can separate all your Brave stuff. Create profiles for friends and family, or split between work and fun. @@ -1198,9 +1198,6 @@ Brave is unable to recover your settings. To access your Brave stuff across all your devices, sign in so that you can turn on sync. - - Use Brave without an account - Customize your Brave profile @@ -1210,6 +1207,12 @@ Brave is unable to recover your settings. If you share a device, friends and family can browse separately and set up Brave just the way they want + + Switch to existing Brave profile? + + + A Brave profile with this account already exists on this device + @@ -1242,6 +1245,12 @@ Brave is unable to recover your settings. Your changes will take effect the next time you relaunch Brave. + + + + Brave needs Bluetooth access to continue + pairing. $1Open Preferences + diff --git a/app/brave_strings_override.grd b/app/brave_strings_override.grd index ab17af769e22..5c146cf8f641 100644 --- a/app/brave_strings_override.grd +++ b/app/brave_strings_override.grd @@ -84,7 +84,7 @@ If you update this file, be sure also to update google_chrome_strings.grd. --> - + @@ -259,9 +259,6 @@ If you update this file, be sure also to update google_chrome_strings.grd. --> - - - @@ -274,9 +271,6 @@ If you update this file, be sure also to update google_chrome_strings.grd. --> - - - diff --git a/app/generated_resources.grd b/app/generated_resources.grd index 3caae95ab588..3bce8a32e5bb 100644 --- a/app/generated_resources.grd +++ b/app/generated_resources.grd @@ -41,6 +41,9 @@ are declared in tools/grit/grit_rule.gni. + + + @@ -56,7 +59,6 @@ are declared in tools/grit/grit_rule.gni. - @@ -183,6 +185,10 @@ are declared in tools/grit/grit_rule.gni. + + + + @@ -267,7 +273,7 @@ are declared in tools/grit/grit_rule.gni. - + @@ -365,6 +371,21 @@ are declared in tools/grit/grit_rule.gni. + + + Permission requested, press Ctrl + Forward to respond + + + + + Permission requested, press ⌘ + Option + Down arrow to respond + + + + + Permission requested, press F6 to respond + + $1google.com wants to @@ -581,8 +602,8 @@ are declared in tools/grit/grit_rule.gni. Copy link te&xt - - Copy link to text + + Copy link to highlight @@ -703,6 +724,9 @@ are declared in tools/grit/grit_rule.gni. &Search $1Brave for image + + Search image with Brave Lens + &Go to $1http://www.google.com/ @@ -803,8 +827,8 @@ are declared in tools/grit/grit_rule.gni. Copy Link Te&xt - - Copy Link to Text + + Copy Link to Highlight @@ -937,6 +961,9 @@ are declared in tools/grit/grit_rule.gni. &Search $1Brave for Image + + Search Image with Brave Lens + &Go to $1http://www.google.com/ @@ -1285,6 +1312,9 @@ are declared in tools/grit/grit_rule.gni. Managed by $1example.com + + Tips for Brave + Import bookmarks and settings... @@ -2558,6 +2588,9 @@ are declared in tools/grit/grit_rule.gni. This site may be trying to trick you into allowing intrusive notifications + + Notifications were automatically blocked because you usually don't allow them + @@ -2566,6 +2599,12 @@ are declared in tools/grit/grit_rule.gni. =1 {1 third-party cookie is blocked} other {# third-party cookies are blocked}} + + {COUNT, plural, + =0 {No cookies} + =1 {1 cookie is blocked} + other {# cookies are blocked}} + Third-party cookies are allowed on this site @@ -3991,9 +4030,6 @@ are declared in tools/grit/grit_rule.gni. Read and change allowlisted users - - Send audio and video to displays on the local network - Replace the page you see when opening a new tab @@ -4966,43 +5002,6 @@ Keep your key file in a safe place. You will need it to create new versions of y You are using an unsupported environment variable: $1SSLKEYLOGFILE. Stability and security will suffer. - - - - $1Flash on $2example.com wants to access your computer - - - Allow - - - Deny - - - Unsandboxed plugin blocked - - - Unsandboxed plugin allowed - - - An unsandboxed plugin was prevented from running on this page. - - - An unsandboxed plugin was allowed to run on this page. - - - Always allow unsandboxed plugins on $1example.com - - - Continue blocking unsandboxed plugins - - - Continue allowing unsandboxed plugins - - - Always block unsandboxed plugins on $1example.com - - - Insecure content blocked @@ -5370,8 +5369,11 @@ Keep your key file in a safe place. You will need it to create new versions of y Shortcuts are curated by you - - Show cards + + Hide all cards + + + Customize cards Current theme you have installed @@ -5383,7 +5385,7 @@ Keep your key file in a safe place. You will need it to create new versions of y Custom color - Default + Default color Warm grey @@ -5451,22 +5453,66 @@ Keep your key file in a safe place. You will need it to create new versions of y Dark purple + + Why am I seeing this? - - Remove - - Removed $1Office and Desk Chairs + $1Office Chairs hidden + + + You won't see $1shopping suggestions again on this page + + + Hide $1Office Chairs + + + Don't show $1shopping suggestions + + + Customize cards + + + Shopping suggestions + + + shopping suggestions + + + Recipe ideas + + + recipe ideas + + + these recipe ideas + + + Your carts + + + carts + + + these carts + + + your carts + + + Drive files + + + this module - + Super Duper Module - + Even Better Module - + Recently from Google Drive @@ -5487,24 +5533,12 @@ Keep your key file in a safe place. You will need it to create new versions of y New - - Your carts - Find what you added to shopping carts and check out when you're ready - - Hide these carts - Carts hidden. They’ll reappear when you make changes. - - Never show carts - - - You won’t see your carts again on this page - Hide $1Amazon @@ -5601,6 +5635,9 @@ Keep your key file in a safe place. You will need it to create new versions of y Press to go back, context menu to see history + + Experiments + Click to go forward, hold to see history @@ -5820,6 +5857,9 @@ Keep your key file in a safe place. You will need it to create new versions of y Open a new tab to browse two sites at once + + When you're ready, find your reading list here + Reopen a tab if you accidentally closed it @@ -8396,9 +8436,6 @@ Please help our engineers fix this problem. Tell us what happened right before y Page Language to Translate - - Unknown - Reset @@ -9499,7 +9536,7 @@ Please help our engineers fix this problem. Tell us what happened right before y - Share your screen + Choose what to share Share your entire screen @@ -9508,26 +9545,34 @@ Please help our engineers fix this problem. Tell us what happened right before y Share an application window - $1Brave Hangouts wants to share the contents of your screen. Choose what you'd like to share. + $1Brave Hangouts wants to share the contents of your screen. - $1Brave Hangouts wants to share the contents of your screen with $2https://google.com. Choose what you'd like to share. + $1Brave Hangouts wants to share the contents of your screen with $2https://google.com. Share audio - - Your Entire Screen + + Entire Screen - Application Window + Window - + Entire screen {SCREEN_INDEX, plural, =1{Screen #} other{Screen #}} + + + This Tab + + + Other Tab + + @@ -9660,6 +9705,21 @@ Please help our engineers fix this problem. Tell us what happened right before y $1Brave Search - Part of group $2 + + + $1Brave Search - Permission requested, press Ctrl + Forward to respond + + + + + $1Brave Search - Permission requested, press ⌘ + Option + Up arrow to respond + + + + + $1Brave Search - Permission requested, press F6 to respond + + Unnamed group - $2Brave Search and 3 other tabs - $1 @@ -9889,6 +9949,9 @@ Please help our engineers fix this problem. Tell us what happened right before y Turn on Bluetooth + + Open System Preferences + Re-scan @@ -10193,130 +10256,130 @@ Please help our engineers fix this problem. Tell us what happened right before y Upload - - + + Save changes to $1README.md? - + Save changes - + $1example.com will be able to edit $2README.md until you close all tabs for this site - + $1example.com will be able to edit files in $2My Project until you close all tabs for this site - + $1example.com will be able to view $2README.md until you close all tabs for this site - + $1example.com will be able to view files in $2My Project until you close all tabs for this site - + Let site edit $1README.md? - + Let site edit files? - + Let site view $1README.md? - + Let site view files? - + Edit file - + Edit files - + View file - + View files - - + + This page is allowed to edit files - + This page is allowed to view files - + $1example.com can edit $2README.md - + $1example.com can edit the following files - + $1example.com can edit files in $2My Project - + $1example.com can edit files in the following folders - + $1example.com can edit the following files and folders - + $1example.com can view $2README.md - + $1example.com can view the following files - + $1example.com can view files in $2My Project - + $1example.com can view files in the following folders - + $1example.com can view the following files and folders - + $1example.com can view and edit the following files and folders - + Save changes - + View changes - + {0, plural, offset:2 =1 {{1}README.md} =2 {{1}README.md, {2}Brave.png} other {{1}README.md, {2}Brave.png, and # more} } - + Expand... - + Collapse... - + Remove access - - + + Can't open this folder - + $1example.com can’t open this folder because it contains system files - + Choose a different folder - + Can't open this file - + $1example.com can’t open files in this folder because it contains system files - + Choose a different file @@ -10342,7 +10405,7 @@ Please help our engineers fix this problem. Tell us what happened right before y Use your security key with $1google.com - + Continue @@ -10358,7 +10421,7 @@ Please help our engineers fix this problem. Tell us what happened right before y NFC security key - Built-in sensor + This device Your phone @@ -10427,7 +10490,7 @@ Please help our engineers fix this problem. Tell us what happened right before y Verify via NFC - Verify via built-in sensor + Use this device Verify via your phone @@ -10438,6 +10501,23 @@ Please help our engineers fix this problem. Tell us what happened right before y A notification was sent to your phone to confirm it's you. + + + accounts.google.com$1 sent a notification to your phone. Tap Yes to confirm it's you. Didn't get it?$2 + + + Didn't get it? + + + Connect your phone with a cable + + + Use a USB cable to connect your phone to your computer. If your phone is already connected, unplug it and plug it back in. + + + Security key request + + Unlock your phone and confirm it's you @@ -10543,6 +10623,9 @@ Please help our engineers fix this problem. Tell us what happened right before y A record of your visit to this site will be kept on your security key. + + A record of your visit to this site may be kept on your security key. + Your security key can't be used with this site @@ -10558,23 +10641,30 @@ Please help our engineers fix this problem. Tell us what happened right before y accounts.google.com$1 wants to see the make and model of your security key + + Allow this site to identify your security key? + + + accounts.google.com$1 issued your security key and wants to learn its ID number. The site will know exactly which security key you're using. + Allow + + Skip + Try again - - - - Do you want to use Touch ID with $1example.com in Private mode? - - - Sign-in data will be stored in Brave after you exit Private mode. This will let you use Touch ID with this website again later. - - - Continue - + + Use your device to sign in to $1example.com? + + + Sign-in data will be stored on this device after you exit Private mode. You'll be able to sign in to this website with your device again later. + + + No thanks + @@ -10684,6 +10774,12 @@ Please help our engineers fix this problem. Tell us what happened right before y =1 {This file is encrypted. Ask its owner to decrypt.} other {Some of these files are encrypted. Ask their owner to decrypt.}} + + Your administrator says "$1Please don't upload this type of data.". + + + Learn more + @@ -10812,27 +10908,6 @@ Please help our engineers fix this problem. Tell us what happened right before y - - - Brave can’t play premium videos or music on this device yet. Brave will update automatically when this issue is fixed. - - - This is an x86-64 Brave on Arm64, so things might not work quite right yet! - - - Learn more - - - https://support.google.com/chrome/?p=mac_ARM - - - Learn more - - - https://support.google.com/chrome/?p=mac_ARM - - To play protected media on this page, you need to install Rosetta. @@ -10852,10 +10927,7 @@ Please help our engineers fix this problem. Tell us what happened right before y - Set Window Name - - - Window name + Name this window Commander diff --git a/app/generated_resources_override.grd b/app/generated_resources_override.grd index 21068325addd..97f26c2d7df2 100644 --- a/app/generated_resources_override.grd +++ b/app/generated_resources_override.grd @@ -88,7 +88,7 @@ are declared in tools/grit/grit_rule.gni. - + @@ -136,6 +136,12 @@ are declared in tools/grit/grit_rule.gni. + + + + + + @@ -438,9 +444,6 @@ are declared in tools/grit/grit_rule.gni. - - - @@ -826,9 +829,18 @@ are declared in tools/grit/grit_rule.gni. + + + + + + + + + @@ -875,15 +887,10 @@ are declared in tools/grit/grit_rule.gni. + + Sign-in data will be stored on this device after you exit Private mode. You'll be able to sign in to this website with your device again later. + - - - Do you want to use Touch ID with $1example.com in Private mode? - - - Sign-in data will be stored in Brave after you exit Private mode. This will let you use Touch ID with this website again later. - - Private diff --git a/app/media_router_strings.grdp b/app/media_router_strings.grdp index 552af1312416..8362b7938128 100644 --- a/app/media_router_strings.grdp +++ b/app/media_router_strings.grdp @@ -145,7 +145,7 @@ Soon this option will no longer be supported. To present a tab, use $1Brave Meet. - This option is no longer to supported. To present a tab, use $1Brave Meet. + This option is no longer supported. To present a tab, use $1Brave Meet. diff --git a/app/nearby_share_strings.grdp b/app/nearby_share_strings.grdp index c641c54bd9e8..7a71b5443ef2 100644 --- a/app/nearby_share_strings.grdp +++ b/app/nearby_share_strings.grdp @@ -36,16 +36,13 @@ Your contacts can share with you when they are nearby. Transfers won't start until you accept. - No one can share with you until you make yourself visible.<br><br>To make yourself visible temporarily, open the status area by selecting the time, then turn on Nearby visibility. + No one can share with you until you make yourself visible.<br><br>To make yourself visible temporarily, open the status area, then turn on Nearby visibility. Selected contacts can share with you when nearby. Transfers won't start until you accept. - - Learn more - - Your device visibility controls who can share with you while your screen is unlocked + Your device visibility controls who can share with you while your screen is unlocked. <a>Learn more</a> @@ -61,7 +58,7 @@ - Make sure both devices are unlocked, close together, and have Bluetooth turned on. If you’re sharing with a Bravebook not in your contacts, make sure it has Nearby visibility turned on (open the status area by selecting the time, then select Nearby visibility). <a>Learn more</a> + Make sure both devices are unlocked, close together, and have Bluetooth turned on. If you’re sharing with a Bravebook not in your contacts, make sure it has Nearby visibility turned on (open the status area, then turn on Nearby visibility). <a>Learn more</a> Select the device you’d like to share files with @@ -81,7 +78,7 @@ How your device appears to others - Share files with profiles around you + Share files with Bravebooks and Android devices around you Set up Nearby Share @@ -156,35 +153,62 @@ Unsupported file type - - {COUNT, plural, =1 {1 app} other {# apps}} + + {COUNT, plural, =1 {App} other {# apps}} + + + {COUNT, plural, =1 {app} other {# apps}} + + + {COUNT, plural, =1 {Image} other {# images}} + + + {COUNT, plural, =1 {image} other {# images}} + + + {COUNT, plural, =1 {File} other {# files}} - - {COUNT, plural, =1 {1 image} other {# images}} + + {COUNT, plural, =1 {file} other {# files}} - - {COUNT, plural, =1 {1 file} other {# files}} + + {COUNT, plural, =1 {Video} other {# videos}} - - {COUNT, plural, =1 {1 video} other {# videos}} + + {COUNT, plural, =1 {video} other {# videos}} Secure connection ID: $11234 - - {COUNT, plural, =1 {1 address} other {# addresses}} + + {COUNT, plural, =1 {Address} other {# addresses}} + + + {COUNT, plural, =1 {address} other {# addresses}} + + + {COUNT, plural, =1 {Link} other {# links}} + + + {COUNT, plural, =1 {link} other {# links}} + + + {COUNT, plural, =1 {Phone number} other {# phone numbers}} + + + {COUNT, plural, =1 {phone number} other {# phone numbers}} - - {COUNT, plural, =1 {1 link} other {# links}} + + {COUNT, plural, =1 {Text} other {# texts}} - - {COUNT, plural, =1 {1 phone number} other {# phone numbers}} + + {COUNT, plural, =1 {text} other {# texts}} - - {COUNT, plural, =1 {1 text} other {# texts}} + + {COUNT, plural, =1 {Item} other {# items}} - - {COUNT, plural, =1 {1 item} other {# items}} + + {COUNT, plural, =1 {item} other {# items}} diff --git a/app/os_settings_search_tag_strings.grdp b/app/os_settings_search_tag_strings.grdp index dcd86ece48b9..16c4ca342f4b 100644 --- a/app/os_settings_search_tag_strings.grdp +++ b/app/os_settings_search_tag_strings.grdp @@ -310,6 +310,9 @@ Security and sign-in + + Lock screen and sign-in + Lock screen @@ -911,6 +914,24 @@ Feedback reports + + Data access protection for peripherals + + + PCIe + + + Thunderbolt + + + USB + + + USB4 + + + USB-C + @@ -1175,12 +1196,21 @@ Terms of Service - + Diagnostics - + Troubleshooting + + Battery Health + + + CPU Usage + + + Memory Usage + diff --git a/app/os_settings_strings.grdp b/app/os_settings_strings.grdp index c87303ffd5bc..461c8b3ad00d 100644 --- a/app/os_settings_strings.grdp +++ b/app/os_settings_strings.grdp @@ -203,7 +203,7 @@ {COUNT, plural, - =1 {1 Brave sync chain} + =1 {1 Brave sync chain added} other {$22 Brave sync chains}} @@ -817,6 +817,15 @@ Enable fullscreen magnifier + + Move screen continuously as mouse moves + + + Move screen keeping mouse at center of screen + + + Move screen when mouse touches edges of screen + Zoomed in screen follows keyboard focus @@ -961,6 +970,9 @@ Switch Access settings + + Open setup guide + Switch action assignment @@ -1064,9 +1076,24 @@ Press an assigned switch to remove assignment. No switch has been assigned yet - + Exit + + Switch Access setup guide + + + To get started, please make sure your USB or Bluetooth switch is connected to your Bravebook. You can also use keyboard keys. + + + Pair Bluetooth switch + + + Next + + + Previous + Assigned @@ -1198,32 +1225,29 @@ Press an assigned switch to remove assignment. Manage your accounts here. <a>Learn more</a> + + This page allows you to manage your signed-in Brave accounts. <a>Learn more</a> + Bookmarks, passwords, and other browser data are synced with the primary account. Adding a school account enables easy sign-in to websites, extensions, and apps as a student while still operating under parental controls. - - Your apps and OS settings will sync across Bravebooks where you're signed in with this account. <a href="#">Sync Settings</a> - - - When you add a secondary account here, you may browse the web, download apps, check your Gmail and other Brave services using that account. - Accounts - - Secondary accounts + + Additional accounts - + School accounts - - Apps and OS settings are not synced to secondary accounts. + + You can add your additional accounts to access websites and apps. - - When you add a secondary account here, you may browse the web, download apps, check your Gmail and other Brave services using that account. + + $1user@example.com is supervised by Family Link. You can add school accounts to access school resources with parental supervision. To sign out of the primary account on this device, click the time on your screen. In the menu that appears, click "Sign out". @@ -1252,6 +1276,9 @@ Press an assigned switch to remove assignment. Your administrator has disabled the addition of more Brave sync chains + + Your administrator doesn’t allow additional Brave sync chains + Addition of more Brave sync chains is disabled @@ -1283,7 +1310,7 @@ Press an assigned switch to remove assignment. This account is managed by <a target="_blank" rel="noopener noreferrer">$1google.com</a> - This user is managed by Family Link + Managed by Family Link Primary Account @@ -1295,6 +1322,44 @@ Press an assigned switch to remove assignment. Primary account + + + Manage shared folders + + + Shared folders + + + Removing folders will stop sharing but will not delete files. + + + Stop sharing + + + Unshare failed + + + Try again + + + Shared folders will appear here + + + Manage USB devices + + + Only supported devices are shown. + + + Available USB devices will appear here. + + + Device in use + + + "$1Nexus 5" is in use. Reassigning the device while it's in use could cause errors. Are you sure you want to continue? + + Developers @@ -1302,36 +1367,15 @@ Press an assigned switch to remove assignment. Linux development environment (Beta) - - Manage shared folders - - - Shared folders - Shared folders are available in Linux at $1/mnt/chromeos. To share, right-click on a folder in Files app, then select "Share with Linux". - - Removing folders from here will stop sharing but will not delete files. - - - Remove sharing - Couldn't unshare because an application is using this folder. The folder will be unshared when Linux is next shut down. - - Unshare failed - - - Try again - - - Shared folders will appear here - Backup & restore @@ -1356,24 +1400,9 @@ Press an assigned switch to remove assignment. Remove - - Manage USB devices - Give Linux apps permission to access USB devices. Linux won't remember a USB device after it's removed. - - Only supported devices are shown. - - - Available USB devices will appear here. - - - Device in use - - - "$1Nexus 5" is in use. Reassigning the device while it's in use could cause errors. Are you sure you want to continue? - Develop Android apps @@ -1823,6 +1852,9 @@ Press an assigned switch to remove assignment. + + Print and scan + Print server @@ -1944,10 +1976,10 @@ Press an assigned switch to remove assignment. Internet Printing Protocol (IPPS) - Internet Printing Protocol (HTTP) + Hypertext Transport Protocol (HTTP) - Internet Printing Protocol (HTTPS) + Hypertext Transport Protocol (HTTPS) AppSocket (TCP/IP) @@ -2224,6 +2256,15 @@ Press an assigned switch to remove assignment. Rename + + Set up new network + + + Please enter your confirmation code. + + + Unable to connect to this profile. For technical support, please contact your carrier. + Rename Profile @@ -2248,6 +2289,9 @@ Press an assigned switch to remove assignment. Okay + + This may cause a brief cellular network disconnection. + Profile could not be removed. Please try again or contact your carrier for technical support. @@ -2689,6 +2733,9 @@ Press an assigned switch to remove assignment. Security and sign-in + + Lock screen and sign-in + Screen lock and sign-in @@ -3369,54 +3416,18 @@ Press an assigned switch to remove assignment. - - Manage shared folders - - - Shared folders - Shared folders are available in Windows at $1Network › BraveOS. To share, right-click on a folder in Files app, then select "Share with Parallels Desktop". - - Removing folders will stop sharing but will not delete files. - - - Stop sharing - Couldn't unshare because an application is using this folder. The folder will be unshared when Parallels Desktop is next shut down. - - Unshare failed - - - Try again - - - Shared folders will appear here - - - Manage USB devices - Give Parallels Desktop permission to access USB devices. Parallels Desktop won't remember a USB device after it's removed. - - Only supported devices are shown. - - - Available USB devices will appear here. - - - Device in use - - - "$1Nexus 5" is in use. Reassigning the device while it's in use could cause errors. Are you sure you want to continue? - @@ -3502,6 +3513,27 @@ Press an assigned switch to remove assignment. Enable Verified Access + + Data access protection for peripherals + + + Some devices require you to disable data access protection to work properly or at full performance. + + + Disable data access protection for peripherals + + + Disabling can make your peripherals perform better, but may expose your personal data through unauthorized usage. + + + Your displays and peripherals may reset briefly. This may take a few seconds to take effect. + + + Cancel + + + Disable + diff --git a/app/profiles_strings.grdp b/app/profiles_strings.grdp index 931a85255f46..98c3a11da73c 100644 --- a/app/profiles_strings.grdp +++ b/app/profiles_strings.grdp @@ -3,18 +3,12 @@ - - Usage and history can be reviewed by the manager ($1Jane.Doe@gmail.com) on chrome.com. - This is an account for kids managed by $1Jane.Doe@gmail.com. This is an account for kids managed by $1John.Doe@gmail.com and $2Jane.Doe@gmail.com. - - Supervised user - Current user @@ -24,6 +18,9 @@ other {Guest (#)} } + + To clear Guest mode history, close all Guest windows. + {0, plural, =1 {Guest} @@ -42,7 +39,7 @@ other {Private (#)} } - + This is a private window @@ -60,9 +57,6 @@ $1User: Sync paused - - $1Markus (Supervised) - $1Markus (Account for kids) @@ -96,9 +90,6 @@ Accounts and sync - - Exit and childlock - Exit $1User @@ -487,104 +478,35 @@ - - - - Add profile - - - Name - - - The new user couldn't be created. Please check your hard drive space and permissions and try again. - - - Create a desktop shortcut for this user - - - Creating your supervised user. This may take a few moments. - - - - - Import an existing supervised user - - - Choose a supervised user to add to this device. - - - Create a new supervised user - - - Import supervised user - - - - - Add Profile - - - - Remove This Profile - - - Add Supervised Profile - - Remove This User - - Add Supervised User - Sign out - - Add profile - - - - Remove this profile - - - Add supervised profile - - Remove this user - - Add supervised user - Sign out + + Currently signed in + Launch app - - - Browse as Guest - - - More Options - - - Currently signed in - - PIN @@ -609,89 +531,31 @@ Sorry, your fingerprint is still not recognized. Please enter your password. - - - Sorry, your password could not be verified. Please try again. - - - Sorry, your password could not be verified because you are offline. - - - Password - - - Signing in - - - Password for $1john.doe@example.com - - - Submit - - - Options menu for $1john.doe@example.com - - - Remove this user - - - All files and local data associated with the supervised user will be permanently deleted once this supervised user is removed. Visited websites and settings for this supervised user may still be visible by the manager at $1www.example.com. - - - All files and local data associated with this user will be permanently deleted once this user is removed. $1john.doe@example.com can still sign in later. - - - - Please unlock your profile before browsing as a guest. - - - Please unlock your profile before removing a profile. + + Sorry, your password could not be verified. Please try again. - - Please unlock your profile before adding a profile. + + Password - - To use Brave, please sign in + + Signing in - - This will permanently delete your browsing data from this device. + + Password for $1john.doe@example.com - - Browsing history + + Submit - - Passwords + + Options menu for $1john.doe@example.com - - Bookmarks + + Remove this user - - Autofill form data - - - ... + + All files and local data associated with this user will be permanently deleted once this user is removed. $1john.doe@example.com can still sign in later. - - - - Next - - - OK, got it - - - Share with guests - - - Add family and friends - - - You're almost done! - - - Don't see your name? - @@ -706,6 +570,26 @@ Rename your profile + + + Welcome to your new profile + + + This account is managed by $1example.com + + + Your device is managed by $1example.com + + + Your device is managed by your organization + + + You’re adding a managed profile to this browser. Your administrator has control over the profile and can access its data. Bookmarks, history, passwords, and other settings can be synced to your account and managed by your administrator. + + + You’re adding a managed profile to this browser. Your administrator has control over the profile and can access its data. + + Add @@ -770,6 +654,15 @@ Sign in + + Continue without an account + + + Your device is managed by $1example.com. Administrators can access the data in any profile on this device. + + + Your device is managed by your organization. Administrators can access the data in any profile on this device. + Customize avatar @@ -812,5 +705,8 @@ Choose a name and color theme to differentiate between profiles + + Switch + diff --git a/app/profiles_strings_override.grdp b/app/profiles_strings_override.grdp index 09f33ceb1b71..684432c304fb 100644 --- a/app/profiles_strings_override.grdp +++ b/app/profiles_strings_override.grdp @@ -13,7 +13,7 @@ other {Private (#)} } - + This is a private window @@ -59,57 +59,18 @@ - - - Add profile - - - - - Add Profile - - - - Remove This Profile - - - Add Supervised Profile - - - - Add profile - - - - Remove this profile - - - Add supervised profile - - - - - - - Please unlock your profile before removing a profile. - - - Please unlock your profile before adding a profile. - - - - + diff --git a/app/settings_brave_strings.grdp b/app/settings_brave_strings.grdp index a85b94b963dc..8e1d837bb045 100644 --- a/app/settings_brave_strings.grdp +++ b/app/settings_brave_strings.grdp @@ -97,7 +97,7 @@ - + If a setting doesn't show on this page, look in your <a href="$1https://google.com/"> @@ -153,19 +153,19 @@ This will delete your browsing data from this device. To retrieve your data later, sign in to Brave as $1foo@example.com. - - Brave name and picture - Customize your Brave profile + + Name your Brave profile + Sync and personalize Brave across your devices - If you have multiple Brave sync chains, you can add them to your $1Bravebook. Your accounts will be available in Brave browser and Play Store, as well as services like Gmail, Drive, and YouTube. <a>Learn more</a> + This page allows you to manage your signed-in Brave accounts. These accounts will be available in Brave browser and Play Store apps, as well as services like Gmail, Drive, and YouTube. <a>Learn more</a> diff --git a/app/settings_brave_strings_override.grdp b/app/settings_brave_strings_override.grdp index 0670f42af89a..e0b4ba2691a9 100644 --- a/app/settings_brave_strings_override.grdp +++ b/app/settings_brave_strings_override.grdp @@ -12,7 +12,7 @@ - + diff --git a/app/settings_strings.grdp b/app/settings_strings.grdp index dce3d402d22e..2c62b3527d01 100644 --- a/app/settings_strings.grdp +++ b/app/settings_strings.grdp @@ -59,7 +59,7 @@ - Automatically creates captions for English audio and video (currently available in Brave browser only). Audio and captions never leave your device. + Automatically creates captions for media in Brave browser (currently available in English). Audio and captions are processed locally and never leave the device. @@ -261,6 +261,9 @@ Email + + Title + Type @@ -677,7 +680,7 @@ - + Default browser @@ -993,11 +996,6 @@ Notifications will be disabled - - - Printing - - Downloads @@ -1175,16 +1173,58 @@ Privacy and security + + Security and Privacy + More - + Privacy Sandbox - - The Privacy Sandbox + + About Privacy Sandbox + + + Privacy Sandbox is an ongoing initiative to preserve the open web that will help safeguard you from tracking mechanisms. + + + Today, websites rely on many technologies, like third-party cookies, for important services like showing relevant ads and measuring a site’s performance. + + + Privacy Sandbox preserves the vitality of the open web by creating better ways to perform these services—without breaking sites, and while preventing you from being surreptitiously tracked across the web. + + + Privacy Sandbox is still in active development and is available in selected regions. For now, sites may try out Privacy Sandbox while continuing to use current web technologies like third-party cookies. <a href="$1" target="_blank" rel="noopener noreferrer">Learn more</a> + + + Privacy Sandbox trials + + + When enabled, sites may use the privacy-preserving techniques shown here to provide their content and services. These include alternatives to cross-site tracking. More trials may be added over time. + + + Advertisers can learn when thousands of users share a similar interest—like a crowd at a concert—and select ads for the crowd, rather than an individual profile. + + + Advertisers can study the effectiveness of ads in a way that does not track you across sites. + + + Details + + + Trial features are on + + + Trial features are off + + + Learn about and control new technologies that aim to replace third-party cookies + + + More @@ -1236,6 +1276,9 @@ Run safety check now + + Run safety check again + Running @@ -1392,6 +1435,9 @@ Faster, proactive protection against dangerous websites, downloads, and extensions. Warns you about password breaches. Requires browsing data to be sent to Brave. + + Show enhanced protection details + Predicts and warns you about dangerous events before they happen @@ -1413,6 +1459,9 @@ Standard protection against websites, downloads, and extensions that are known to be dangerous. + + Show standard protection details + Detects and warns you about dangerous events when they happen @@ -1542,44 +1591,32 @@ No recently changed permissions - - Automatically blocked $1Notifications - - - Blocked $1Location - - - Allowed $1Camera - - - automatically blocked $1Notifications + + Allowed $1location - - blocked $1Location + + Allowed $1location, $2notifications - - allowed $1Camera + + Allowed $1location and $22 more - - $1Automatically blocked Notifications, $2blocked Location + + Automatically blocked $1location - - $1Automatically blocked Notifications, $2blocked Location, $3allowed Camera + + Automatically blocked $1location, $2notifications - - $1Automatically blocked Notifications, $2blocked Location, $3allowed Camera, and more + + Automatically blocked $1location and $22 more - - Current private session: $1automatically blocked Notifications + + Blocked $1location - - Current private session: $1automatically blocked Notifications, $2blocked Location + + Blocked $1location, $2notifications - - Current private session: $1automatically blocked Notifications, $2blocked Location, $3allowed Camera - - - Current private session: $1automatically blocked Notifications, $2blocked Location, $3allowed Camera, and more + + Blocked $1location and $22 more @@ -2049,9 +2086,15 @@ Ads + + ads + Augmented reality + + augmented reality + Ask when a site wants to create a 3D map of your surroundings or track camera position @@ -2064,18 +2107,30 @@ Automatic downloads + + automatic downloads + Background sync + + background sync + Camera + + camera + Camera Clipboard + + clipboard + Ask when a site wants to see text and images copied to the clipboard @@ -2148,24 +2203,42 @@ Cookies and site data + + cookies and site data + Handlers + + handlers + Location + + location + Microphone + + microphone + Microphone Notifications + + notifications + HID devices + + HID devices + Ask when a site wants to access HID devices @@ -2178,18 +2251,30 @@ Images + + images + Insecure content + + insecure content + Insecure content is blocked by default on secure sites JavaScript + + Javascript + Payment Handlers + + payment handlers + Allow sites to install payment handlers @@ -2208,9 +2293,15 @@ Pop-ups and redirects + + pop-ups and redirects + Protected content + + protected content + Protected content identifiers @@ -2220,6 +2311,9 @@ Virtual reality + + virtual reality + Ask when a site wants to use your virtual reality devices and data @@ -2243,6 +2337,9 @@ MIDI devices + + MIDI devices + Ask when a site wants to use system exclusive messages to access MIDI devices @@ -2255,15 +2352,27 @@ Sound + + sound + Motion or light sensors + + motion or light sensors + Motion sensors + + motion sensors + Bluetooth devices + + Bluetooth devices + Ask when a site wants to access Bluetooth devices @@ -2276,6 +2385,9 @@ USB devices + + USB devices + Ask when a site wants to access USB devices @@ -2288,6 +2400,9 @@ Serial ports + + serial ports + Ask when a site wants to access serial ports @@ -2300,6 +2415,9 @@ File editing + + file editing + Ask when a site wants to edit files or folders on your device @@ -2315,6 +2433,9 @@ Zoom levels + + zoom levels + Sites can save and read cookie data @@ -2444,6 +2565,9 @@ Window placement + + window placement + Ask when a site wants to open and place windows on your screens @@ -2453,6 +2577,9 @@ Block sites from opening and placing windows on your screens + + fonts + Ask when a site wants to use fonts installed on your device @@ -2460,13 +2587,16 @@ Block sites from using fonts installed on your device - Your presence + Your device use + + + your device use - Ask when a site wants to know when you're present + Ask when a site wants to know when you're actively using this device - Block sites from knowing when you're present + Block sites from knowing when you're actively using this device Allowed @@ -2719,7 +2849,7 @@ Current private session only - This exception will be automatically removed after you exit the current Private session + This custom setting will be removed when you close all your Private windows No sites have been zoomed in or out @@ -2739,6 +2869,9 @@ Bluetooth scanning + + Bluetooth scanning + Ask when a site wants to discover nearby Bluetooth devices @@ -2896,9 +3029,6 @@ Customize profile - - Name your profile - Pick a theme color @@ -3058,7 +3188,7 @@ - + System @@ -3084,12 +3214,6 @@ Items not listed here will also be removed, if needed. Learn more about <a href="$1https://www.google.com/chrome/browser/privacy/whitepaper.html#unwantedsoftware">unwanted software protection</a> in the Brave privacy white paper. - - Extensions to be removed: - - - Unknown extension with ID $1exampleextensionababababcdcdcdcd - Files and programs to be quarantined: @@ -3300,6 +3424,9 @@ Incorrect PIN. You have $18 attempts remaining. + + Create a new PIN that's different from your current PIN + {MIN_PIN_LENGTH, plural, =1 {Enter your new PIN. A PIN must be at least one character long and can contain letters, numbers, and other characters.} diff --git a/app/settings_strings_override.grdp b/app/settings_strings_override.grdp index 88a9c0de0a94..3a2dc584f361 100644 --- a/app/settings_strings_override.grdp +++ b/app/settings_strings_override.grdp @@ -42,7 +42,7 @@ - + @@ -59,22 +59,12 @@ + + Advertisers can learn when thousands of users share a similar interest—like a crowd at a concert—and select ads for the crowd, rather than an individual profile. + - - Current private session: $1automatically blocked Notifications - - - Current private session: $1automatically blocked Notifications, $2blocked Location - - - Current private session: $1automatically blocked Notifications, $2blocked Location, $3allowed Camera - - - Current private session: $1automatically blocked Notifications, $2blocked Location, $3allowed Camera, and more - - @@ -93,7 +83,7 @@ Current private session only - This exception will be automatically removed after you exit the current Private session + This custom setting will be removed when you close all your Private windows @@ -107,7 +97,7 @@ - + diff --git a/app/shared_settings_strings.grdp b/app/shared_settings_strings.grdp index 1a2d3679757b..a46a03de10bd 100644 --- a/app/shared_settings_strings.grdp +++ b/app/shared_settings_strings.grdp @@ -125,7 +125,7 @@ Edit - Update + Done Data usage @@ -142,6 +142,9 @@ May incur mobile data charges + + This option applies to Bravebooks with a data plan or mobile network dongle, or when tethering to a portable hotspot + Without internet @@ -173,13 +176,10 @@ Visible to everyone - On, $15 min + Visibility is on for $15 minutes - Off. <a>Learn more</a> - - - Your Bravebook will be visible to everyone nearby for 5 min + You will be visible to everyone for $15 minutes. <a>Learn more</a> diff --git a/browser/BUILD.gn b/browser/BUILD.gn index 3cf081cd193b..d06b7f45f7a6 100644 --- a/browser/BUILD.gn +++ b/browser/BUILD.gn @@ -130,6 +130,7 @@ source_set("browser_process") { "//brave/common", "//brave/common:pref_names", "//brave/components/binance/browser/buildflags", + "//brave/components/brave_ads/browser/buildflags", "//brave/components/brave_component_updater/browser", "//brave/components/brave_drm", "//brave/components/brave_referrals/buildflags", diff --git a/browser/DEPS b/browser/DEPS index 36cff698ce4c..d69656801354 100644 --- a/browser/DEPS +++ b/browser/DEPS @@ -12,6 +12,7 @@ include_rules = [ "+chrome/common", "+chrome/grit", "+chrome/installer/util", + "+chrome/services/mac_notifications/public/cpp", "+chrome/test", "+content/public/browser", "+content/public/common", diff --git a/browser/android/BUILD.gn b/browser/android/BUILD.gn index 9f0a15cfa684..d71669d98f6d 100644 --- a/browser/android/BUILD.gn +++ b/browser/android/BUILD.gn @@ -24,6 +24,7 @@ source_set("android_browser_process") { "//components/flags_ui", "//components/ntp_tiles", "//components/translate/core/browser", + "//url", ] if (brave_ads_enabled) { diff --git a/browser/android/brave_shields_content_settings.cc b/browser/android/brave_shields_content_settings.cc index a9902720ecf6..88e98ad66353 100644 --- a/browser/android/brave_shields_content_settings.cc +++ b/browser/android/brave_shields_content_settings.cc @@ -18,6 +18,7 @@ #include "chrome/browser/profiles/profile_manager.h" #include "components/content_settings/core/browser/content_settings_utils.h" #include "components/content_settings/core/browser/host_content_settings_map.h" +#include "url/gurl.h" namespace chrome { namespace android { diff --git a/browser/android/preferences/brave_pref_service_bridge.cc b/browser/android/preferences/brave_pref_service_bridge.cc index 757773b13494..9fe660fb25e6 100644 --- a/browser/android/preferences/brave_pref_service_bridge.cc +++ b/browser/android/preferences/brave_pref_service_bridge.cc @@ -22,6 +22,7 @@ #include "chrome/browser/profiles/profile_manager.h" #include "components/content_settings/core/browser/host_content_settings_map.h" #include "components/prefs/pref_service.h" +#include "url/gurl.h" #if BUILDFLAG(ENABLE_BRAVE_PERF_PREDICTOR) #include "brave/components/brave_perf_predictor/common/pref_names.h" diff --git a/browser/brave_browser_main_parts.cc b/browser/brave_browser_main_parts.cc index b541f20556dd..d24b594e4178 100644 --- a/browser/brave_browser_main_parts.cc +++ b/browser/brave_browser_main_parts.cc @@ -34,9 +34,9 @@ #if !defined(OS_ANDROID) #include "brave/browser/infobars/brave_confirm_p3a_infobar_delegate.h" #include "brave/browser/infobars/crypto_wallets_infobar_delegate.h" +#include "chrome/browser/infobars/infobar_service.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_finder.h" -#include "chrome/browser/infobars/infobar_service.h" #include "content/public/browser/web_contents.h" #endif @@ -46,9 +46,9 @@ #if BUILDFLAG(ENABLE_BRAVE_SYNC) && !defined(OS_ANDROID) #include "brave/browser/infobars/sync_v2_migrate_infobar_delegate.h" +#include "chrome/browser/sync/profile_sync_service_factory.h" #include "components/sync/driver/sync_service.h" #include "components/sync/driver/sync_user_settings.h" -#include "chrome/browser/sync/profile_sync_service_factory.h" #endif #if BUILDFLAG(BRAVE_WALLET_ENABLED) && BUILDFLAG(ENABLE_EXTENSIONS) @@ -71,10 +71,11 @@ void BraveBrowserMainParts::PostBrowserStart() { // because we will hit DCHECK(!GetProfileAttributesWithPath(...)) in // ProfileInfoCache::DeleteProfileFromCache when we trying to delete it // without this being added into the storage first. - ProfileAttributesEntry* entry = nullptr; ProfileAttributesStorage& storage = profile_manager->GetProfileAttributesStorage(); - if (!storage.GetProfileAttributesWithPath(tor_legacy_path, &entry)) { + ProfileAttributesEntry* entry = + storage.GetProfileAttributesWithPath(tor_legacy_path); + if (!entry) { storage.AddProfile(tor_legacy_path, base::string16(), std::string(), base::string16(), /* is_consented_primary_account*/ false, 0, @@ -113,13 +114,15 @@ void BraveBrowserMainParts::PostBrowserStart() { BraveConfirmP3AInfoBarDelegate::Create( infobar_service, g_browser_process->local_state()); #if BUILDFLAG(ENABLE_BRAVE_SYNC) - auto* sync_service = ProfileSyncServiceFactory::IsSyncAllowed(profile()) - ? ProfileSyncServiceFactory::GetForProfile(profile()) - : nullptr; - const bool is_v2_user = sync_service && - sync_service->GetUserSettings()->IsFirstSetupComplete(); - SyncV2MigrateInfoBarDelegate::Create(infobar_service, is_v2_user, - profile(), browser); + auto* sync_service = + ProfileSyncServiceFactory::IsSyncAllowed(profile()) + ? ProfileSyncServiceFactory::GetForProfile(profile()) + : nullptr; + const bool is_v2_user = + sync_service && + sync_service->GetUserSettings()->IsFirstSetupComplete(); + SyncV2MigrateInfoBarDelegate::Create(infobar_service, is_v2_user, + profile(), browser); #endif // BUILDFLAG(ENABLE_BRAVE_SYNC) } } @@ -138,7 +141,7 @@ void BraveBrowserMainParts::PreProfileInit() { if (!base::FeatureList::IsEnabled(brave_sync::features::kBraveSync)) { // Disable sync temporarily if (!command_line->HasSwitch(switches::kDisableSync)) - command_line->AppendSwitch(switches::kDisableSync); + command_line->AppendSwitch(switches::kDisableSync); } else { // Relaunch after flag changes will still have the switch // when switching from disabled to enabled diff --git a/browser/brave_browser_process_impl.cc b/browser/brave_browser_process_impl.cc index 8f99964fd164..332aa2222430 100644 --- a/browser/brave_browser_process_impl.cc +++ b/browser/brave_browser_process_impl.cc @@ -18,6 +18,7 @@ #include "brave/browser/themes/brave_dark_mode_utils.h" #include "brave/browser/ui/brave_browser_command_controller.h" #include "brave/common/pref_names.h" +#include "brave/components/brave_ads/browser/buildflags/buildflags.h" #include "brave/components/brave_component_updater/browser/brave_on_demand_updater.h" #include "brave/components/brave_component_updater/browser/local_data_files_service.h" #include "brave/components/brave_referrals/buildflags/buildflags.h" @@ -45,7 +46,7 @@ #include "services/network/public/cpp/resource_request.h" #include "services/network/public/cpp/shared_url_loader_factory.h" -#if BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS) +#if BUILDFLAG(ENABLE_SYSTEM_NOTIFICATIONS) #include "chrome/browser/notifications/notification_platform_bridge.h" #include "brave/browser/notifications/brave_notification_platform_bridge.h" #endif @@ -79,7 +80,6 @@ #if defined(OS_ANDROID) #include "chrome/browser/flags/android/chrome_feature_list.h" -#include "chrome/browser/android/component_updater/background_task_update_scheduler.h" #else #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_list.h" @@ -359,7 +359,7 @@ BraveBrowserProcessImpl::notification_platform_bridge() { #if !defined(OS_MAC) return BrowserProcessImpl::notification_platform_bridge(); #else -#if BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS) +#if BUILDFLAG(ENABLE_SYSTEM_NOTIFICATIONS) if (!created_notification_bridge_) CreateNotificationPlatformBridge(); return notification_bridge_.get(); @@ -371,7 +371,7 @@ BraveBrowserProcessImpl::notification_platform_bridge() { void BraveBrowserProcessImpl::CreateNotificationPlatformBridge() { #if defined(OS_MAC) -#if BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS) +#if BUILDFLAG(ENABLE_SYSTEM_NOTIFICATIONS) DCHECK(!notification_bridge_); notification_bridge_ = BraveNotificationPlatformBridge::Create(); created_notification_bridge_ = true; diff --git a/browser/brave_rewards/rewards_service_factory.cc b/browser/brave_rewards/rewards_service_factory.cc index f692df7848ca..95bc67a36a90 100644 --- a/browser/brave_rewards/rewards_service_factory.cc +++ b/browser/brave_rewards/rewards_service_factory.cc @@ -11,20 +11,22 @@ #include "brave/browser/profiles/brave_profile_manager.h" #include "brave/browser/profiles/profile_util.h" #include "brave/components/brave_rewards/browser/buildflags/buildflags.h" +#include "brave/components/brave_rewards/browser/rewards_notification_service_observer.h" #include "brave/components/brave_rewards/browser/rewards_service.h" +#include "brave/components/brave_rewards/browser/rewards_service_observer.h" +#include "brave/components/brave_rewards/browser/rewards_service_private_observer.h" #include "brave/components/brave_rewards/common/pref_names.h" #include "brave/components/greaselion/browser/buildflags/buildflags.h" +#include "chrome/browser/browser_process.h" #include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/profiles/incognito_helpers.h" #include "chrome/browser/profiles/profile.h" +#include "chrome/browser/profiles/profile_manager.h" #include "components/keyed_service/content/browser_context_dependency_manager.h" #include "components/prefs/pref_service.h" #include "content/public/browser/notification_service.h" #include "content/public/browser/notification_types.h" #include "extensions/buildflags/buildflags.h" -#include "brave/components/brave_rewards/browser/rewards_notification_service_observer.h" -#include "brave/components/brave_rewards/browser/rewards_service_observer.h" -#include "brave/components/brave_rewards/browser/rewards_service_private_observer.h" #if BUILDFLAG(ENABLE_EXTENSIONS) #include "extensions/browser/event_router_factory.h" @@ -90,12 +92,16 @@ RewardsServiceFactory::RewardsServiceFactory() #endif #if BUILDFLAG(BRAVE_REWARDS_ENABLED) && !defined(OS_ANDROID) - registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CREATED, - content::NotificationService::AllSources()); + if (g_browser_process && g_browser_process->profile_manager()) + g_browser_process->profile_manager()->AddObserver(this); #endif } RewardsServiceFactory::~RewardsServiceFactory() { +#if BUILDFLAG(BRAVE_REWARDS_ENABLED) && !defined(OS_ANDROID) + if (g_browser_process && g_browser_process->profile_manager()) + g_browser_process->profile_manager()->RemoveObserver(this); +#endif } KeyedService* RewardsServiceFactory::BuildServiceInstanceFor( @@ -141,20 +147,9 @@ bool RewardsServiceFactory::ServiceIsNULLWhileTesting() const { return false; } -void RewardsServiceFactory::Observe( - int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) { +void RewardsServiceFactory::OnProfileAdded(Profile* profile) { #if BUILDFLAG(BRAVE_REWARDS_ENABLED) - switch (type) { - case chrome::NOTIFICATION_PROFILE_CREATED: { - auto* profile = content::Source(source).ptr(); - OverridePrefsForPrivateProfileUserPrefs(profile); - break; - } - default: - NOTREACHED(); - } + OverridePrefsForPrivateProfileUserPrefs(profile); #endif } diff --git a/browser/brave_rewards/rewards_service_factory.h b/browser/brave_rewards/rewards_service_factory.h index 4f03a963f668..2ac311539bb9 100644 --- a/browser/brave_rewards/rewards_service_factory.h +++ b/browser/brave_rewards/rewards_service_factory.h @@ -8,9 +8,8 @@ #include "base/memory/singleton.h" #include "brave/components/brave_rewards/browser/rewards_service.h" +#include "chrome/browser/profiles/profile_manager_observer.h" #include "components/keyed_service/content/browser_context_keyed_service_factory.h" -#include "content/public/browser/notification_observer.h" -#include "content/public/browser/notification_registrar.h" class Profile; @@ -19,7 +18,7 @@ class RewardsService; // Singleton that owns all RewardsService and associates them with Profiles. class RewardsServiceFactory : public BrowserContextKeyedServiceFactory, - public content::NotificationObserver { + public ProfileManagerObserver { public: RewardsServiceFactory(const RewardsServiceFactory&) = delete; RewardsServiceFactory& operator=(const RewardsServiceFactory&) = delete; @@ -41,12 +40,8 @@ class RewardsServiceFactory : public BrowserContextKeyedServiceFactory, content::BrowserContext* context) const override; bool ServiceIsNULLWhileTesting() const override; - // content::NotificationObserver: - void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; - - content::NotificationRegistrar registrar_; + // ProfileManagerObserver: + void OnProfileAdded(Profile* profile) override; }; } // namespace brave_rewards diff --git a/browser/brave_scheme_load_browsertest.cc b/browser/brave_scheme_load_browsertest.cc index 0c92fc5f2360..bf1ef3f169cf 100644 --- a/browser/brave_scheme_load_browsertest.cc +++ b/browser/brave_scheme_load_browsertest.cc @@ -203,15 +203,15 @@ IN_PROC_BROWSER_TEST_F(BraveSchemeLoadBrowserTest, // Check renderer crash happened by observing related notification. IN_PROC_BROWSER_TEST_F(BraveSchemeLoadBrowserTest, CrashURLTest) { - content::WindowedNotificationObserver observer( - content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED, - content::NotificationService::AllSources()); + content::RenderProcessHostWatcher crash_observer( + browser()->tab_strip_model()->GetActiveWebContents(), + content::RenderProcessHostWatcher::WATCH_FOR_PROCESS_EXIT); content::ScopedAllowRendererCrashes allow_renderer_crashes(active_contents()); browser()->OpenURL( content::OpenURLParams(GURL("brave://crash/"), content::Referrer(), WindowOpenDisposition::CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); - observer.Wait(); + crash_observer.Wait(); } // Some webuis are not allowed to load in private window. diff --git a/browser/brave_stats/brave_stats_updater_unittest.cc b/browser/brave_stats/brave_stats_updater_unittest.cc index d5f0aa0f3ff3..99ed39372215 100644 --- a/browser/brave_stats/brave_stats_updater_unittest.cc +++ b/browser/brave_stats/brave_stats_updater_unittest.cc @@ -17,6 +17,8 @@ #include "brave/components/brave_referrals/browser/brave_referrals_service.h" #include "brave/components/brave_stats/browser/brave_stats_updater_util.h" #include "chrome/browser/profiles/profile.h" +#include "chrome/test/base/testing_browser_process.h" +#include "chrome/test/base/testing_profile_manager.h" #include "components/prefs/testing_pref_service.h" #include "content/public/test/browser_task_environment.h" #include "testing/gtest/include/gtest/gtest.h" @@ -37,11 +39,13 @@ const int kNextMonth = 7; class BraveStatsUpdaterTest : public testing::Test { public: - BraveStatsUpdaterTest() {} + BraveStatsUpdaterTest() + : profile_manager_(TestingBrowserProcess::GetGlobal()) {} ~BraveStatsUpdaterTest() override {} void SetUp() override { EXPECT_TRUE(temp_dir_.CreateUniqueTempDir()); + EXPECT_TRUE(profile_manager_.SetUp()); profile_ = brave_ads::CreateBraveAdsProfile(temp_dir_.GetPath()); EXPECT_TRUE(profile_.get() != NULL); brave_stats::RegisterLocalStatePrefs(testing_local_state_.registry()); @@ -64,6 +68,7 @@ class BraveStatsUpdaterTest : public testing::Test { private: TestingPrefServiceSimple testing_local_state_; + TestingProfileManager profile_manager_; std::unique_ptr profile_; base::ScopedTempDir temp_dir_; content::BrowserTaskEnvironment task_environment_; diff --git a/browser/browsing_data/brave_browsing_data_remover_delegate.cc b/browser/browsing_data/brave_browsing_data_remover_delegate.cc index 790aaf7a5433..bc43f30119a1 100644 --- a/browser/browsing_data/brave_browsing_data_remover_delegate.cc +++ b/browser/browsing_data/brave_browsing_data_remover_delegate.cc @@ -176,7 +176,7 @@ void BraveBrowsingDataRemoverDelegate::ClearIPFSCache() { {base::TaskPriority::USER_VISIBLE, base::MayBlock(), base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}, base::BindOnce(&BraveBrowsingDataRemoverDelegate::WaitForIPFSRepoGC, - weak_ptr_factory_.GetWeakPtr(), base::Passed(&process)), + weak_ptr_factory_.GetWeakPtr(), std::move(process)), CreateTaskCompletionClosure(TracingDataType::kIPFSCache)); } #endif // BUILDFLAG(IPFS_ENABLED) diff --git a/browser/component_updater/brave_component_installer.cc b/browser/component_updater/brave_component_installer.cc index 8d39ad1e2aec..1a669e256eb3 100644 --- a/browser/component_updater/brave_component_installer.cc +++ b/browser/component_updater/brave_component_installer.cc @@ -146,10 +146,6 @@ std::string BraveComponentInstallerPolicy::GetName() const { return name_; } -std::vector BraveComponentInstallerPolicy::GetMimeTypes() const { - return std::vector(); -} - update_client::InstallerAttributes BraveComponentInstallerPolicy::GetInstallerAttributes() const { return update_client::InstallerAttributes(); diff --git a/browser/component_updater/brave_component_installer.h b/browser/component_updater/brave_component_installer.h index fa277d11f5d5..d4ed910c2707 100644 --- a/browser/component_updater/brave_component_installer.h +++ b/browser/component_updater/brave_component_installer.h @@ -50,7 +50,6 @@ class BraveComponentInstallerPolicy : base::FilePath GetRelativeInstallDir() const override; void GetHash(std::vector* hash) const override; std::string GetName() const override; - std::vector GetMimeTypes() const override; update_client::InstallerAttributes GetInstallerAttributes() const override; std::string name_; diff --git a/browser/component_updater/brave_component_updater_configurator.cc b/browser/component_updater/brave_component_updater_configurator.cc index 19d5edcab97e..74170c5c71e6 100644 --- a/browser/component_updater/brave_component_updater_configurator.cc +++ b/browser/component_updater/brave_component_updater_configurator.cc @@ -57,7 +57,7 @@ BraveConfigurator::BraveConfigurator( BraveConfigurator::~BraveConfigurator() {} -int BraveConfigurator::InitialDelay() const { +double BraveConfigurator::InitialDelay() const { return configurator_impl_.InitialDelay(); } diff --git a/browser/component_updater/brave_component_updater_configurator.h b/browser/component_updater/brave_component_updater_configurator.h index a1bb2cc474f0..adeb3ffb51a6 100644 --- a/browser/component_updater/brave_component_updater_configurator.h +++ b/browser/component_updater/brave_component_updater_configurator.h @@ -33,7 +33,7 @@ class BraveConfigurator : public update_client::Configurator { PrefService* pref_service); // update_client::Configurator overrides. - int InitialDelay() const override; + double InitialDelay() const override; int NextCheckDelay() const override; int OnDemandDelay() const override; int UpdateDelay() const override; diff --git a/browser/ephemeral_storage/BUILD.gn b/browser/ephemeral_storage/BUILD.gn index c541ead6c818..75fb20cf37ee 100644 --- a/browser/ephemeral_storage/BUILD.gn +++ b/browser/ephemeral_storage/BUILD.gn @@ -26,6 +26,7 @@ if (!is_android) { "//brave/components/brave_shields/browser:browser", "//brave/components/brave_shields/common:common", "//chrome/browser", + "//chrome/browser/profiles:profile", "//chrome/browser/ui", "//chrome/test:test_support_ui", "//content/public/common", diff --git a/browser/farbling/BUILD.gn b/browser/farbling/BUILD.gn index 82d85d704c48..e2f8960844ab 100644 --- a/browser/farbling/BUILD.gn +++ b/browser/farbling/BUILD.gn @@ -29,6 +29,7 @@ if (!is_android) { "//chrome/browser/ui", "//chrome/test:test_support", "//chrome/test:test_support_ui", + "//components/embedder_support:browser_util", "//components/permissions:permissions", "//content/test:test_support", ] diff --git a/browser/farbling/brave_navigator_plugins_farbling_browsertest.cc b/browser/farbling/brave_navigator_plugins_farbling_browsertest.cc index a4e074476b84..9f080f148d2e 100644 --- a/browser/farbling/brave_navigator_plugins_farbling_browsertest.cc +++ b/browser/farbling/brave_navigator_plugins_farbling_browsertest.cc @@ -116,20 +116,23 @@ class BraveNavigatorPluginsFarblingBrowserTest : public InProcessBrowserTest { IN_PROC_BROWSER_TEST_F(BraveNavigatorPluginsFarblingBrowserTest, FarbleNavigatorPlugins) { // Farbling level: off - // get real length of navigator.plugins + // get real length of navigator.plugins, which should return an empty array + // from Chromium 90 on (see https://crrev.com/c/2629990 for reference). AllowFingerprinting(); NavigateToURLUntilLoadStop(farbling_url()); - int off_length = ExecScriptGetInt(kPluginsLengthScript, contents()); + int real_plugins_length = ExecScriptGetInt(kPluginsLengthScript, contents()); + EXPECT_EQ(real_plugins_length, 0); - // Farbling level: balanced (default) - // navigator.plugins should contain all real plugins + 2 fake ones + // Farbling level: balanced (default) navigator.plugins should contain 2 fake + // ones (we used to report 2 real plugins and 2 fake ones before Chromium 90, + // but there are no real ones now, see https://crrev.com/c/2629990). SetFingerprintingDefault(); NavigateToURLUntilLoadStop(farbling_url()); int balanced_length = ExecScriptGetInt(kPluginsLengthScript, contents()); - EXPECT_EQ(balanced_length, off_length + 2); + EXPECT_EQ(balanced_length, 2); // Farbling level: maximum - // navigator.plugins should contain no real plugins, only 2 fake ones + // navigator.plugins should contain no real plugins either, only 2 fake ones. BlockFingerprinting(); NavigateToURLUntilLoadStop(farbling_url()); int maximum_length = ExecScriptGetInt(kPluginsLengthScript, contents()); @@ -188,65 +191,48 @@ IN_PROC_BROWSER_TEST_F(BraveNavigatorPluginsFarblingBrowserTest, "qVKly58ePHDBgQoUqVKFix48.fvXLlSJ"); } -// Tests that names of built-in plugins get farbled by default -// https://github.com/brave/brave-browser/issues/10597 +// Tests that no built-in plugins returned even when fingerprinting is allowed, +// and that only fake ones are exposed when "balanced" behavior is selected. IN_PROC_BROWSER_TEST_F(BraveNavigatorPluginsFarblingBrowserTest, - FarbleNavigatorPluginsBuiltin) { + FarbleNavigatorPluginsNoBuiltinAvailable) { // Farbling level: off AllowFingerprinting(); NavigateToURLUntilLoadStop(farbling_url()); - int off_length = ExecScriptGetInt(kPluginsLengthScript, contents()); - EXPECT_EQ(off_length, 2); - EXPECT_EQ(ExecScriptGetStr( - "domAutomationController.send(navigator.plugins[0].name);", - contents()), - "Chrome PDF Plugin"); - EXPECT_EQ(ExecScriptGetStr( - "domAutomationController.send(navigator.plugins[1].name);", - contents()), - "Chrome PDF Viewer"); + int real_plugins_length = ExecScriptGetInt(kPluginsLengthScript, contents()); + EXPECT_EQ(real_plugins_length, 0); // Farbling level: balanced (default) SetFingerprintingDefault(); NavigateToURLUntilLoadStop(farbling_url()); EXPECT_EQ(ExecScriptGetStr( - "domAutomationController.send(navigator.plugins[1].name);", + "domAutomationController.send(navigator.plugins[0].name);", contents()), - "Brave PDF plug in"); + "Xr1at27"); EXPECT_EQ(ExecScriptGetStr( - "domAutomationController.send(navigator.plugins[2].name);", + "domAutomationController.send(navigator.plugins[1].name);", contents()), - "Chrome PDF and PS plug-in"); + "8.fPHDhw"); } -// Tests that names of built-in plugins that get farbled will reset to their -// original names when fingerprinting is turned off -// https://github.com/brave/brave-browser/issues/11278 +// Tests that the list of plugins returned by navigator.plugins will reset to +// being and empty one when fingerprinting is turned off. IN_PROC_BROWSER_TEST_F(BraveNavigatorPluginsFarblingBrowserTest, FarbleNavigatorPluginsReset) { // Farbling level: balanced (default) SetFingerprintingDefault(); NavigateToURLUntilLoadStop(farbling_url()); EXPECT_EQ(ExecScriptGetStr( - "domAutomationController.send(navigator.plugins[1].name);", + "domAutomationController.send(navigator.plugins[0].name);", contents()), - "Brave PDF plug in"); + "Xr1at27"); EXPECT_EQ(ExecScriptGetStr( - "domAutomationController.send(navigator.plugins[2].name);", + "domAutomationController.send(navigator.plugins[1].name);", contents()), - "Chrome PDF and PS plug-in"); + "8.fPHDhw"); // Farbling level: off AllowFingerprinting(); NavigateToURLUntilLoadStop(farbling_url()); - int off_length = ExecScriptGetInt(kPluginsLengthScript, contents()); - EXPECT_EQ(off_length, 2); - EXPECT_EQ(ExecScriptGetStr( - "domAutomationController.send(navigator.plugins[0].name);", - contents()), - "Chrome PDF Plugin"); - EXPECT_EQ(ExecScriptGetStr( - "domAutomationController.send(navigator.plugins[1].name);", - contents()), - "Chrome PDF Viewer"); + int real_plugins_length = ExecScriptGetInt(kPluginsLengthScript, contents()); + EXPECT_EQ(real_plugins_length, 0); } diff --git a/browser/farbling/brave_navigator_useragent_farbling_browsertest.cc b/browser/farbling/brave_navigator_useragent_farbling_browsertest.cc index 2858a0735d08..e1cbfb4803ce 100644 --- a/browser/farbling/brave_navigator_useragent_farbling_browsertest.cc +++ b/browser/farbling/brave_navigator_useragent_farbling_browsertest.cc @@ -22,6 +22,7 @@ #include "chrome/common/chrome_content_client.h" #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/ui_test_utils.h" +#include "components/embedder_support/user_agent_utils.h" #include "components/permissions/permission_request.h" #include "components/prefs/pref_service.h" #include "content/public/browser/render_frame_host.h" @@ -142,7 +143,7 @@ IN_PROC_BROWSER_TEST_F(BraveNavigatorUserAgentFarblingBrowserTest, GURL url_b = embedded_test_server()->GetURL(domain_b, "/simple.html"); GURL url_z = embedded_test_server()->GetURL(domain_z, "/simple.html"); // get real navigator.userAgent - std::string real_ua = ::GetUserAgent(); + std::string real_ua = embedder_support::GetUserAgent(); // Farbling level: off AllowFingerprinting(domain_b); NavigateToURLUntilLoadStop(url_b); diff --git a/browser/net/brave_proxying_url_loader_factory.cc b/browser/net/brave_proxying_url_loader_factory.cc index 427a697dd7f5..f87543aeed7b 100644 --- a/browser/net/brave_proxying_url_loader_factory.cc +++ b/browser/net/brave_proxying_url_loader_factory.cc @@ -19,7 +19,6 @@ #include "content/public/browser/browser_thread.h" #include "content/public/browser/render_frame_host.h" #include "content/public/common/url_utils.h" -#include "mojo/public/cpp/bindings/binding.h" #include "mojo/public/cpp/system/data_pipe_producer.h" #include "mojo/public/cpp/system/string_data_source.h" #include "net/base/completion_repeating_callback.h" @@ -364,7 +363,7 @@ void BraveProxyingURLLoaderFactory::InProgressRequest:: // Create a data pipe for transmitting the response. mojo::ScopedDataPipeProducerHandle producer; mojo::ScopedDataPipeConsumerHandle consumer; - if (CreateDataPipe(nullptr, &producer, &consumer) != MOJO_RESULT_OK) { + if (CreateDataPipe(nullptr, producer, consumer) != MOJO_RESULT_OK) { OnRequestError( network::URLLoaderCompletionStatus(net::ERR_INSUFFICIENT_RESOURCES)); return; diff --git a/browser/net/brave_proxying_url_loader_factory.h b/browser/net/brave_proxying_url_loader_factory.h index ca875fafddc1..b7c51517b36c 100644 --- a/browser/net/brave_proxying_url_loader_factory.h +++ b/browser/net/brave_proxying_url_loader_factory.h @@ -23,7 +23,6 @@ #include "base/time/time.h" #include "brave/browser/net/resource_context_data.h" #include "brave/browser/net/url_context.h" -#include "mojo/public/cpp/bindings/binding.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/pending_remote.h" #include "mojo/public/cpp/bindings/receiver_set.h" diff --git a/browser/net/brave_proxying_web_socket.cc b/browser/net/brave_proxying_web_socket.cc index 16d4347b01d8..14d65eaccba9 100644 --- a/browser/net/brave_proxying_web_socket.cc +++ b/browser/net/brave_proxying_web_socket.cc @@ -127,7 +127,8 @@ void BraveProxyingWebSocket::WebSocketFactoryRun( std::vector additional_headers, mojo::PendingRemote handshake_client, - mojo::PendingRemote auth_handler, + mojo::PendingRemote + auth_handler, mojo::PendingRemote trusted_header_client) { DCHECK(!forwarding_handshake_client_); diff --git a/browser/net/brave_proxying_web_socket.h b/browser/net/brave_proxying_web_socket.h index 00047e2d22cd..ed82413eea4e 100644 --- a/browser/net/brave_proxying_web_socket.h +++ b/browser/net/brave_proxying_web_socket.h @@ -18,7 +18,6 @@ #include "brave/browser/net/resource_context_data.h" #include "brave/browser/net/url_context.h" #include "content/public/browser/content_browser_client.h" -#include "mojo/public/cpp/bindings/binding_set.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/receiver.h" #include "mojo/public/cpp/bindings/remote.h" @@ -37,9 +36,10 @@ class RenderFrameHost; // Ensures that all web socket requests go through Brave network request // handling framework. Cargoculted from |WebRequestProxyingWebSocket|. -class BraveProxyingWebSocket : public network::mojom::WebSocketHandshakeClient, - public network::mojom::AuthenticationHandler, - public network::mojom::TrustedHeaderClient { +class BraveProxyingWebSocket + : public network::mojom::WebSocketHandshakeClient, + public network::mojom::WebSocketAuthenticationHandler, + public network::mojom::TrustedHeaderClient { public: using WebSocketFactory = content::ContentBrowserClient::WebSocketFactory; using DisconnectCallback = @@ -86,7 +86,7 @@ class BraveProxyingWebSocket : public network::mojom::WebSocketHandshakeClient, mojo::ScopedDataPipeConsumerHandle readable, mojo::ScopedDataPipeProducerHandle writable) override; - // network::mojom::AuthenticationHandler method: + // network::mojom::WebSocketAuthenticationHandler method: void OnAuthRequired(const net::AuthChallengeInfo& auth_info, const scoped_refptr& headers, const net::IPEndPoint& remote_endpoint, @@ -105,7 +105,8 @@ class BraveProxyingWebSocket : public network::mojom::WebSocketHandshakeClient, std::vector additional_headers, mojo::PendingRemote handshake_client, - mojo::PendingRemote auth_handler, + mojo::PendingRemote + auth_handler, mojo::PendingRemote trusted_header_client); @@ -142,7 +143,7 @@ class BraveProxyingWebSocket : public network::mojom::WebSocketHandshakeClient, forwarding_handshake_client_; mojo::Receiver receiver_as_handshake_client_; - mojo::Receiver + mojo::Receiver receiver_as_auth_handler_; mojo::Receiver receiver_as_header_client_; @@ -158,7 +159,8 @@ class BraveProxyingWebSocket : public network::mojom::WebSocketHandshakeClient, // chrome websocket proxy GURL proxy_url_; - mojo::Remote proxy_auth_handler_; + mojo::Remote + proxy_auth_handler_; mojo::Remote proxy_trusted_header_client_; diff --git a/browser/notifications/BUILD.gn b/browser/notifications/BUILD.gn index 9539bd887f9e..163af4cdfa9b 100644 --- a/browser/notifications/BUILD.gn +++ b/browser/notifications/BUILD.gn @@ -1,19 +1,27 @@ +import("//chrome/common/features.gni") + source_set("notifications") { # Remove when https://github.com/brave/brave-browser/issues/10657 is resolved check_includes = false if (is_mac) { sources = [ - "brave_alert_dispatcher_mac.mm", "brave_alert_dispatcher_mac.h", - "brave_notification_platform_bridge_mac.mm", - "brave_notification_platform_bridge.h", + "brave_alert_dispatcher_mac.mm", ] + if (enable_system_notifications) { + sources += [ + "brave_notification_platform_bridge.h", + "brave_notification_platform_bridge_mac.mm", + ] + } + deps = [ "//base", "//chrome/browser/ui/cocoa/notifications:common", - "//ui/message_center/public/cpp", + "//chrome/services/mac_notifications/public/cpp", "//skia", + "//ui/message_center/public/cpp", ] frameworks = [ "Foundation.framework" ] diff --git a/browser/notifications/brave_alert_dispatcher_mac.h b/browser/notifications/brave_alert_dispatcher_mac.h index 3e8ed129a179..47613aa66e72 100644 --- a/browser/notifications/brave_alert_dispatcher_mac.h +++ b/browser/notifications/brave_alert_dispatcher_mac.h @@ -12,21 +12,29 @@ #include "chrome/browser/notifications/alert_dispatcher_mac.h" +// clang-format off @interface BraveAlertDispatcherMac : NSObject - (void)dispatchNotification:(NSDictionary *)data; // NOLINT - (void)closeNotificationWithId:(NSString *)notificationId // NOLINT - withProfileId:(NSString *)profileId; // NOLINT + profileId:(NSString *)profileId // NOLINT + incognito:(BOOL)incognito; // NOLINT + +-(void)closeNotificationsWithProfileId:(NSString*)profileId // NOLINT + incognito : (BOOL)incognito; // NOLINT - (void)closeAllNotifications; - (void) getDisplayedAlertsForProfileId:(NSString *)profileId // NOLINT incognito:(BOOL)incognito - notificationCenter:(NSUserNotificationCenter *)notificationCenter // NOLINT callback:(GetDisplayedNotificationsCallback)callback; // NOLINT +- (void)getAllDisplayedAlertsWithCallback: // NOLINT + (GetAllDisplayedNotificationsCallback)callback; // NOLINT + @end +// clang-format on #endif // BRAVE_BROWSER_NOTIFICATIONS_BRAVE_ALERT_DISPATCHER_MAC_H_ diff --git a/browser/notifications/brave_alert_dispatcher_mac.mm b/browser/notifications/brave_alert_dispatcher_mac.mm index b2f91c861d0b..d3b9db3c4eda 100644 --- a/browser/notifications/brave_alert_dispatcher_mac.mm +++ b/browser/notifications/brave_alert_dispatcher_mac.mm @@ -8,13 +8,16 @@ #include #include #include +#include #include "base/callback.h" +#include "base/containers/flat_set.h" #include "base/mac/scoped_nsobject.h" #include "base/strings/sys_string_conversions.h" -#include "chrome/browser/ui/cocoa/notifications/notification_constants_mac.h" #include "chrome/browser/ui/cocoa/notifications/notification_builder_mac.h" +#include "chrome/services/mac_notifications/public/cpp/notification_constants_mac.h" +// clang-format off @implementation BraveAlertDispatcherMac { base::scoped_nsobject alerts_; } @@ -29,7 +32,8 @@ - (void)dispatchNotification:(NSDictionary *)data { } - (void)closeNotificationWithId:(NSString *)notificationId - withProfileId:(NSString *)profileId { + profileId:(NSString *)profileId + incognito:(BOOL)incognito { NSUserNotificationCenter * notificationCenter = [NSUserNotificationCenter defaultUserNotificationCenter]; for (NSUserNotification * candidate in @@ -48,6 +52,26 @@ - (void)closeNotificationWithId:(NSString *)notificationId } } +- (void)closeNotificationsWithProfileId:(NSString*)profileId + incognito:(BOOL)incognito { + DCHECK(profileId); + NSUserNotificationCenter * notificationCenter = + [NSUserNotificationCenter defaultUserNotificationCenter]; + for (NSUserNotification * candidate in + [notificationCenter deliveredNotifications]) { + NSString* candidateProfileId = [candidate.userInfo + objectForKey: notification_constants::kNotificationProfileId]; + + bool candidateIncognito = [[candidate.userInfo + objectForKey:notification_constants::kNotificationIncognito] boolValue]; + + if ([profileId isEqualToString: candidateProfileId] && + incognito == candidateIncognito) { + [notificationCenter removeDeliveredNotification:candidate]; + } + } +} + - (void)closeAllNotifications { [[NSUserNotificationCenter defaultUserNotificationCenter] removeAllDeliveredNotifications]; @@ -56,8 +80,9 @@ - (void)closeAllNotifications { - (void) getDisplayedAlertsForProfileId:(NSString *)profileId incognito:(BOOL)incognito - notificationCenter:(NSUserNotificationCenter*)notificationCenter callback:(GetDisplayedNotificationsCallback)callback { + NSUserNotificationCenter * notificationCenter = + [NSUserNotificationCenter defaultUserNotificationCenter]; std::set displayedNotifications; for (NSUserNotification * toast in [notificationCenter deliveredNotifications]) { @@ -73,4 +98,29 @@ - (void)closeAllNotifications { true /* supports_synchronization */); } +- (void)getAllDisplayedAlertsWithCallback: + (GetAllDisplayedNotificationsCallback)callback { + NSUserNotificationCenter * notificationCenter = + [NSUserNotificationCenter defaultUserNotificationCenter]; + + std::vector alertIds; + for (NSUserNotification * toast in + [notificationCenter deliveredNotifications]) { + std::string notificationId = base::SysNSStringToUTF8( + [toast.userInfo objectForKey:notification_constants::kNotificationId]); + std::string profileId = base::SysNSStringToUTF8([toast.userInfo + objectForKey:notification_constants::kNotificationProfileId]); + bool incognito = [[toast.userInfo + objectForKey:notification_constants::kNotificationIncognito] boolValue]; + + alertIds.push_back( + {std::move(notificationId), std::move(profileId), incognito}); + } + + // Create set from std::vector to avoid N^2 insertion runtime. + base::flat_set alertSet(std::move(alertIds)); + std::move(callback).Run(std::move(alertSet)); +} + @end +// clang-format on diff --git a/browser/profiles/brave_profile_manager.cc b/browser/profiles/brave_profile_manager.cc index a104e0d8d39f..a899f7fbbe67 100644 --- a/browser/profiles/brave_profile_manager.cc +++ b/browser/profiles/brave_profile_manager.cc @@ -34,8 +34,6 @@ #include "components/prefs/pref_service.h" #include "components/signin/public/base/signin_pref_names.h" #include "content/public/browser/browser_thread.h" -#include "content/public/browser/notification_service.h" -#include "content/public/browser/notification_source.h" #include "content/public/browser/url_data_source.h" #include "ui/base/l10n/l10n_util.h" @@ -57,12 +55,21 @@ using content::BrowserThread; +namespace { + +void AddBraveSharedResourcesDataSourceToProfile(Profile* profile) { + content::URLDataSource::Add( + profile, + std::make_unique()); +} + +} // namespace + BraveProfileManager::BraveProfileManager(const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { MigrateProfileNames(); - registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CREATED, - content::NotificationService::AllSources()); + AddObserver(this); } BraveProfileManager::~BraveProfileManager() { @@ -73,6 +80,7 @@ BraveProfileManager::~BraveProfileManager() { OnProfileCreated(profile, false, false); } } + RemoveObserver(this); } void BraveProfileManager::InitProfileUserPrefs(Profile* profile) { @@ -183,21 +191,21 @@ void BraveProfileManager::MigrateProfileNames() { #endif } -void BraveProfileManager::Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) { - switch (type) { - case chrome::NOTIFICATION_PROFILE_CREATED: { - Profile* profile = content::Source(source).ptr(); - content::URLDataSource::Add( - profile, - std::make_unique()); - break; - } - default: { - ProfileManager::Observe(type, source, details); - break; - } +void BraveProfileManager::OnProfileAdded(Profile* profile) { + // Observe new profiles for creation of OTR profiles so that we can add our + // shared resources to them. + observed_profiles_.Add(profile); + AddBraveSharedResourcesDataSourceToProfile(profile); +} + +void BraveProfileManager::OnOffTheRecordProfileCreated( + Profile* off_the_record) { + AddBraveSharedResourcesDataSourceToProfile(off_the_record); +} + +void BraveProfileManager::OnProfileWillBeDestroyed(Profile* profile) { + if (!profile->IsOffTheRecord()) { + observed_profiles_.Remove(profile); } } diff --git a/browser/profiles/brave_profile_manager.h b/browser/profiles/brave_profile_manager.h index e7c744ba54a3..76cb356b738e 100644 --- a/browser/profiles/brave_profile_manager.h +++ b/browser/profiles/brave_profile_manager.h @@ -8,9 +8,14 @@ #include +#include "base/scoped_observer.h" #include "chrome/browser/profiles/profile_manager.h" +#include "chrome/browser/profiles/profile_manager_observer.h" +#include "chrome/browser/profiles/profile_observer.h" -class BraveProfileManager : public ProfileManager { +class BraveProfileManager : public ProfileManager, + public ProfileManagerObserver, + public ProfileObserver { public: explicit BraveProfileManager(const base::FilePath& user_data_dir); ~BraveProfileManager() override; @@ -23,16 +28,21 @@ class BraveProfileManager : public ProfileManager { bool incognito, ProfileLoadedCallback callback) override; - void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + // ProfileManagerObserver: + void OnProfileAdded(Profile* profile) override; + + // ProfileObserver: + void OnOffTheRecordProfileCreated(Profile* off_the_record) override; + void OnProfileWillBeDestroyed(Profile* profile) override; protected: void DoFinalInitForServices(Profile* profile, - bool go_off_the_record) override; + bool go_off_the_record) override; private: void MigrateProfileNames(); + ScopedObserver observed_profiles_{this}; + DISALLOW_COPY_AND_ASSIGN(BraveProfileManager); }; diff --git a/browser/profiles/brave_profile_manager_browsertest.cc b/browser/profiles/brave_profile_manager_browsertest.cc index b69814efe1b3..9afa857e5f8f 100644 --- a/browser/profiles/brave_profile_manager_browsertest.cc +++ b/browser/profiles/brave_profile_manager_browsertest.cc @@ -100,10 +100,9 @@ IN_PROC_BROWSER_TEST_F(BraveProfileManagerTest, // in correct order. // One profile with a custom name to check that it is not renamed. // First is the existing default profile. - ProfileAttributesEntry* entry1; - bool has_entry1 = storage.GetProfileAttributesWithPath( - profile_data[0].profile_path, &entry1); - ASSERT_EQ(has_entry1, true); + ProfileAttributesEntry* entry1 = + storage.GetProfileAttributesWithPath(profile_data[0].profile_path); + ASSERT_NE(entry1, nullptr); entry1->SetLocalProfileName(profile_data[0].profile_name, profile_data[0].force_default_name); // Rest are generated @@ -111,13 +110,12 @@ IN_PROC_BROWSER_TEST_F(BraveProfileManagerTest, base::RunLoop run_loop; profile_manager->CreateProfileAsync( profile_data[i].profile_path, - base::Bind(&OnUnblockOnProfileCreation, &run_loop), - base::string16(), std::string()); + base::Bind(&OnUnblockOnProfileCreation, &run_loop), base::string16(), + std::string()); run_loop.Run(); - ProfileAttributesEntry* entry; - bool has_entry = storage.GetProfileAttributesWithPath( - profile_data[i].profile_path, &entry); - ASSERT_EQ(has_entry, true); + ProfileAttributesEntry* entry = + storage.GetProfileAttributesWithPath(profile_data[i].profile_path); + ASSERT_NE(entry, nullptr); entry->SetLocalProfileName(profile_data[i].profile_name, profile_data[i].force_default_name); } diff --git a/browser/profiles/brave_profile_shortcut_manager_win.cc b/browser/profiles/brave_profile_shortcut_manager_win.cc index 53ea6d4a1d51..09a641bda6bc 100644 --- a/browser/profiles/brave_profile_shortcut_manager_win.cc +++ b/browser/profiles/brave_profile_shortcut_manager_win.cc @@ -30,10 +30,7 @@ void BraveProfileShortcutManagerWin::GetShortcutProperties( if (brave::IsSessionProfilePath(profile_path)) { ProfileAttributesStorage& storage = profile_manager_->GetProfileAttributesStorage(); - ProfileAttributesEntry* entry; - bool has_entry = - storage.GetProfileAttributesWithPath(profile_path, &entry); - if (!has_entry) + if (!storage.GetProfileAttributesWithPath(profile_path)) return; } diff --git a/browser/resources/signin/profile_picker/images/dark_mode_left_banner_image.svg b/browser/resources/signin/profile_picker/images/dark_mode_left_banner_image.svg new file mode 100644 index 000000000000..45653dafe9cd --- /dev/null +++ b/browser/resources/signin/profile_picker/images/dark_mode_left_banner_image.svg @@ -0,0 +1 @@ + diff --git a/browser/resources/signin/profile_picker/images/dark_mode_right_banner_image.svg b/browser/resources/signin/profile_picker/images/dark_mode_right_banner_image.svg new file mode 100644 index 000000000000..45653dafe9cd --- /dev/null +++ b/browser/resources/signin/profile_picker/images/dark_mode_right_banner_image.svg @@ -0,0 +1 @@ + diff --git a/browser/resources/signin/profile_picker/images/left_banner_image.svg b/browser/resources/signin/profile_picker/images/left_banner_image.svg new file mode 100644 index 000000000000..ad79a04b6b5a --- /dev/null +++ b/browser/resources/signin/profile_picker/images/left_banner_image.svg @@ -0,0 +1 @@ + diff --git a/browser/resources/signin/profile_picker/images/right_banner_image.svg b/browser/resources/signin/profile_picker/images/right_banner_image.svg new file mode 100644 index 000000000000..ad79a04b6b5a --- /dev/null +++ b/browser/resources/signin/profile_picker/images/right_banner_image.svg @@ -0,0 +1 @@ + diff --git a/browser/ui/android/strings/android_chrome_strings.grd b/browser/ui/android/strings/android_chrome_strings.grd index 0b1b4c1d877d..549ff3c60ffe 100644 --- a/browser/ui/android/strings/android_chrome_strings.grd +++ b/browser/ui/android/strings/android_chrome_strings.grd @@ -195,7 +195,7 @@ CHAR-LIMIT guidelines: - + @@ -277,6 +277,9 @@ CHAR-LIMIT guidelines: You are currently customizing your Sync and Brave service settings. To finish turning on sync, tap the Confirm button near the bottom of the screen. Navigate up + + You are currently customizing your Sync settings. To finish turning on sync, tap the Confirm button near the bottom of the screen. Navigate up + Not signed in @@ -454,9 +457,6 @@ CHAR-LIMIT guidelines: Add address - - Edit address - Add card @@ -565,6 +565,15 @@ CHAR-LIMIT guidelines: Make sure the password you are saving matches your password for %1$sexample.com + + Deleting this password will not delete your account on %1$sexample.com + + + Delete password? + + + Delete password + Saved password @@ -613,12 +622,21 @@ CHAR-LIMIT guidelines: To view or copy your password here, set screen lock on this device. + + To view passwords, first set a screen lock on your device + + + To copy passwords, first set a screen lock on your device + + + You already saved this username for this site + + + Enter password + Turn on screen lock in Settings to export your passwords from this device - - To view passwords, first set a screen lock on your device - Showing password generation popup @@ -657,6 +675,9 @@ CHAR-LIMIT guidelines: Unlock to view your password + + Unlock to edit your password + Unlock to export your passwords @@ -762,10 +783,13 @@ Touch & hold any word to search. To refine your search, select more or fewer No thanks - To search for a word or phrase, touch and hold it instead of tapping it + To search from this page, touch & hold words instead of tapping them - Touch & hold to search + Touch & hold for more relevant info + + + Tap to see search results “Do Not Track” @@ -779,24 +803,40 @@ For example, some websites may respond to this request by showing you ads that a Access payment methods - - - Privacy sandbox + + + Privacy Sandbox + + + Trial features are on - - Web crowd and ad measurement + + Trial features are off - - By joining a Web Crowd, you allow websites to make your web experience relevant without using personally identifiable information. Similar to a crowd in a concert, websites and advertisers can only know thousands of users share a similar interest. + + About Privacy Sandbox - - Allow websites and apps to give you a more relevant experience using a non-identifiable alias. + + Privacy Sandbox is an ongoing initiative to preserve the open web that will help safeguard you from tracking mechanisms. + +Today, websites rely on many technologies, like third-party cookies, for important services like showing relevant ads and measuring a site’s performance. + +Privacy Sandbox preserves the vitality of the open web by creating better ways to perform these services – without breaking sites, and while preventing you from being surreptitiously tracked across the web. + +Privacy Sandbox is still in active development and is available in selected regions. For now, sites may try out Privacy Sandbox while continuing to use current web technologies like third-party cookies. <link>Learn more</link> - - Allow advertisers to study ad campaigns using non-identifiable information. + + Privacy Sandbox trials + + + When enabled, sites may use the privacy-preserving techniques shown here to provide their content and services. These include alternatives to cross-site tracking. More trials may be added over time. + +<li1>Advertisers can learn when thousands of users share a similar interest – like a crowd at a concert — and select ads for the crowd, rather than an individual profile.</li1> + +<li2>Advertisers can study the effectiveness of ads in a way that does not track you across sites.</li2> - Explore the Privacy Sandbox + Learn about and control new technologies that aim to replace third-party cookies @@ -946,8 +986,8 @@ Your Brave account may have other forms of browsing history like searches and ac - - Safety check <new>New</new> + + Safety check Brave can help keep you safe from data breaches, unsafe websites, and more @@ -1218,12 +1258,21 @@ Your Brave account may have other forms of browsing history like searches and ac Automatically translate these languages - + + Automatically translate + + Don’t offer to translate these languages + + Never translate + Don’t offer to translate these sites + + Never translate sites + @@ -1785,7 +1834,7 @@ To change this setting, <resetlink>reset sync

Sync isn't working - + Error syncing passwords @@ -1797,11 +1846,8 @@ To change this setting, <resetlink>reset sync

Sign in again to start sync - - Fix now - - Error syncing passwords + Fix now Enter your passphrase to start sync @@ -1832,9 +1878,6 @@ To change this setting, <resetlink>reset sync

Sign in again - - Unlock with Screen Lock - @@ -2103,6 +2146,12 @@ To change this setting, <resetlink>reset sync

Search with Brave Lens <new>New</new> + + Search image with Brave Lens <new>New</new> + + + Translate image with Brave Lens <new>New</new> + Shop similar products <new>New</new> @@ -2145,11 +2194,6 @@ To change this setting, <resetlink>reset sync

- - - Get the app from the Google Play Store: %sInstall - - Dark @@ -2174,27 +2218,15 @@ To change this setting, <resetlink>reset sync

- - Add to Home screen - Open %1$sTelegram Could not open app - - Install app - Add - - Install - - - %1$sBrave was added to your Home screen - Still adding previous site @@ -2225,8 +2257,11 @@ To change this setting, <resetlink>reset sync

Install this app - - Categories: %1$scats, memes. + + Screenshot + + + Screenshot. Tap to close. @@ -2246,6 +2281,10 @@ To change this setting, <resetlink>reset sync

+ + Change your site settings here + + If you’re seeing this frequently, try these <link>suggestions</link>. @@ -2589,6 +2628,12 @@ Data from your Private session will only be cleared from Brave when you Choose an account + + Sign in to Brave, opened. + + + Sign in to Brave, closed. + Sign in to this site and Brave with your Brave sync chain. You can turn on sync later. @@ -2706,28 +2751,18 @@ Data from your Private session will only be cleared from Brave when you Remove all - - Available offline - <link>Learn more</link> about suggested content - - - Can’t get suggestions - - - - - No new suggestions - - Manage activity Manage interests + + Manage reactions + Turn off @@ -2935,6 +2970,12 @@ Data from your Private session will only be cleared from Brave when you Find in page + + Follow + + + Following + Show Paint Preview @@ -3101,10 +3142,7 @@ Data from your Private session will only be cleared from Brave when you - Unread - - - Ready for offline + Unread - Available offline Added to reading list @@ -3112,16 +3150,13 @@ Data from your Private session will only be cleared from Brave when you Mark as read - - Share - Catch up on your reading list {READING_LIST_REMINDER_NOTIFICATION_SUBTITLE, plural, - =1 {You have %1$d1 page} - other {You have %1$d8 pages}} + =1 {You have %1$d1 unread page} + other {You have %1$d8 unread pages}} {READING_LIST_UNREAD_PAGE_COUNT, plural, @@ -3143,12 +3178,6 @@ Data from your Private session will only be cleared from Brave when you You’ll find your reading list here - - You can save pages to your reading list to find them again - - - You can save pages to your reading list to find them again or read offline - @@ -3256,6 +3285,9 @@ Data from your Private session will only be cleared from Brave when you Start voice search + + Search with your camera using Brave Lens + New tab @@ -3610,7 +3642,7 @@ Data from your Private session will only be cleared from Brave when you - Keep data + Keep Data Linked sites @@ -4078,6 +4110,46 @@ Data from your Private session will only be cleared from Brave when you + + Registration succeeded + + + + Registration failed + + + + Sign-in succeeded + + + + Sign-in failed + + + + Connected with USB cable + + + + Disconnect when you’re done + + + + Connecting to your device… + + + + This may take a minute + + + + Connected to device + + + + Processing request + + QR Code @@ -4137,7 +4209,7 @@ Data from your Private session will only be cleared from Brave when you - Link to text + Link to highlight @@ -4197,7 +4269,19 @@ Data from your Private session will only be cleared from Brave when you - Can't create link to text. Share link to page. + Can’t create link to highlight. Share link to page. + + + + Can’t create link to highlight + + + + Include link to highlight + + + + Share text only diff --git a/browser/ui/android/strings/android_chrome_strings_override.grd b/browser/ui/android/strings/android_chrome_strings_override.grd index 5a40df877922..856498a4601c 100644 --- a/browser/ui/android/strings/android_chrome_strings_override.grd +++ b/browser/ui/android/strings/android_chrome_strings_override.grd @@ -111,7 +111,7 @@ CHAR-LIMIT guidelines: - + Private @@ -119,6 +119,13 @@ CHAR-LIMIT guidelines: Automatically sends crash reports to Brave + + When enabled, sites may use the privacy-preserving techniques shown here to provide their content and services. These include alternatives to cross-site tracking. More trials may be added over time. + +<li1>Advertisers can learn when thousands of users share a similar interest – like a crowd at a concert — and select ads for the crowd, rather than an individual profile.</li1> + +<li2>Advertisers can study the effectiveness of ads in a way that does not track you across sites.</li2> + When Lite mode is on, Brave uses Brave servers to make pages load faster. Lite mode rewrites very slow pages to load only essential content. Lite mode does not apply to Private tabs. @@ -155,10 +162,6 @@ In Private, your activity <b1>might still be v Data from your Private session will only be cleared from Brave when you <b2>close all Private tabs</b2>. - - - - New private tab diff --git a/android/java/res/layout/tab_switcher_toolbar.xml b/browser/ui/android/toolbar/java/res/layout/tab_switcher_toolbar.xml similarity index 98% rename from android/java/res/layout/tab_switcher_toolbar.xml rename to browser/ui/android/toolbar/java/res/layout/tab_switcher_toolbar.xml index 5c2516c0aedd..f49824ac3c17 100644 --- a/android/java/res/layout/tab_switcher_toolbar.xml +++ b/browser/ui/android/toolbar/java/res/layout/tab_switcher_toolbar.xml @@ -25,7 +25,7 @@ android:scaleType="center" android:paddingStart="16dp" android:paddingEnd="16dp" - android:tint="@color/default_icon_color" + app:tint="@color/default_icon_color" app:srcCompat="@drawable/new_tab_icon" android:contentDescription="@string/accessibility_toolbar_btn_new_tab"/> SetBounds(0, OffsetY(sub_views_), EndX(), sub_views_->height()); + sub_views_->SetBounds(0, OffsetY(sub_views_), GetEndX(), + sub_views_->height()); } diff --git a/browser/ui/views/profiles/brave_profile_menu_view.cc b/browser/ui/views/profiles/brave_profile_menu_view.cc index 6751350994a2..6f5c74ccb4cd 100644 --- a/browser/ui/views/profiles/brave_profile_menu_view.cc +++ b/browser/ui/views/profiles/brave_profile_menu_view.cc @@ -25,10 +25,10 @@ void BraveProfileMenuView::BuildIdentity() { ProfileMenuView::BuildIdentity(); Profile* profile = browser()->profile(); - ProfileAttributesEntry* profile_attributes; - g_browser_process->profile_manager() - ->GetProfileAttributesStorage() - .GetProfileAttributesWithPath(profile->GetPath(), &profile_attributes); + ProfileAttributesEntry* profile_attributes = + g_browser_process->profile_manager() + ->GetProfileAttributesStorage() + .GetProfileAttributesWithPath(profile->GetPath()); // Reset IdentityInfo to get rid of the subtitle string // IDS_PROFILES_LOCAL_PROFILE_STATE("Not signed in"). SetProfileIdentityInfo( @@ -69,7 +69,6 @@ gfx::ImageSkia BraveProfileMenuView::GetSyncIcon() const { void BraveProfileMenuView::OnExitProfileButtonClicked() { if (browser()->profile()->IsGuestSession()) { RecordClick(ActionableItem::kExitProfileButton); - profiles::CloseGuestProfileWindows(); } else { ProfileMenuView::OnExitProfileButtonClicked(); } diff --git a/browser/ui/views/translate/brave_translate_bubble_view_unittest.cc b/browser/ui/views/translate/brave_translate_bubble_view_unittest.cc index 297a78c0ba4e..4bacbb57788e 100644 --- a/browser/ui/views/translate/brave_translate_bubble_view_unittest.cc +++ b/browser/ui/views/translate/brave_translate_bubble_view_unittest.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/. */ +#include + #include "brave/browser/ui/views/translate/brave_translate_bubble_view.h" #include "base/test/scoped_feature_list.h" #include "chrome/test/views/chrome_views_test_base.h" @@ -47,12 +49,22 @@ class MockTranslateBubbleModel : public TranslateBubbleModel { view_state_transition_.GoBackFromAdvanced(); } - int GetNumberOfLanguages() const override { return 1000; } + int GetNumberOfSourceLanguages() const override { return 1000; } + + int GetNumberOfTargetLanguages() const override { return 1000; } - base::string16 GetLanguageNameAt(int index) const override { + base::string16 GetSourceLanguageNameAt(int index) const override { return base::ASCIIToUTF16("English"); } + base::string16 GetTargetLanguageNameAt(int index) const override { + return base::ASCIIToUTF16("Spanish"); + } + + std::string GetOriginalLanguageCode() const override { + return std::string("en-US"); + } + int GetOriginalLanguageIndex() const override { return original_language_index_; } diff --git a/browser/ui/webui/brave_settings_ui.cc b/browser/ui/webui/brave_settings_ui.cc index 9878929b5486..58ff299ea965 100644 --- a/browser/ui/webui/brave_settings_ui.cc +++ b/browser/ui/webui/brave_settings_ui.cc @@ -63,17 +63,9 @@ BraveSettingsUI::~BraveSettingsUI() { // static void BraveSettingsUI::AddResources(content::WebUIDataSource* html_source, Profile* profile) { - constexpr char generated_prefix[] = - "@out_folder@/gen/brave/browser/resources/settings/preprocessed"; - const auto generated_prefix_len = strlen(generated_prefix); for (size_t i = 0; i < kBraveSettingsResourcesSize; ++i) { - // Rewrite path for any generated entries - std::string path(kBraveSettingsResources[i].name); - size_t pos = path.find(generated_prefix); - if (pos != std::string::npos) { - path.erase(pos, generated_prefix_len); - } - html_source->AddResourcePath(path, kBraveSettingsResources[i].value); + html_source->AddResourcePath(kBraveSettingsResources[i].path, + kBraveSettingsResources[i].id); } #if BUILDFLAG(ENABLE_BRAVE_SYNC) diff --git a/browser/ui/webui/brave_webui_source.cc b/browser/ui/webui/brave_webui_source.cc index a231c6707cca..680d7eb1afed 100644 --- a/browser/ui/webui/brave_webui_source.cc +++ b/browser/ui/webui/brave_webui_source.cc @@ -20,7 +20,7 @@ #include "content/public/browser/web_ui_data_source.h" #include "services/network/public/mojom/content_security_policy.mojom.h" #include "ui/base/l10n/l10n_util.h" -#include "ui/resources/grit/webui_resources_map.h" +#include "ui/base/webui/resource_path.h" #if !defined(OS_ANDROID) #include "brave/browser/ui/webui/navigation_bar_data_provider.h" @@ -1103,7 +1103,7 @@ void CustomizeWebUIHTMLSource(const std::string &name, content::WebUIDataSource* CreateWebUIDataSource( const std::string& name, - const GritResourceMap* resource_map, + const webui::ResourcePath* resource_map, size_t resource_map_size, int html_resource_id, bool disable_trusted_types_csp) { @@ -1128,7 +1128,7 @@ content::WebUIDataSource* CreateWebUIDataSource( source->SetDefaultResource(html_resource_id); // Add generated resource paths for (size_t i = 0; i < resource_map_size; ++i) { - source->AddResourcePath(resource_map[i].name, resource_map[i].value); + source->AddResourcePath(resource_map[i].path, resource_map[i].id); } CustomizeWebUIHTMLSource(name, source); return source; @@ -1139,7 +1139,7 @@ content::WebUIDataSource* CreateWebUIDataSource( content::WebUIDataSource* CreateAndAddWebUIDataSource( content::WebUI* web_ui, const std::string& name, - const GritResourceMap* resource_map, + const webui::ResourcePath* resource_map, size_t resource_map_size, int html_resource_id, bool disable_trusted_types_csp) { diff --git a/browser/ui/webui/brave_webui_source.h b/browser/ui/webui/brave_webui_source.h index e8d0719d633c..903cd27eb850 100644 --- a/browser/ui/webui/brave_webui_source.h +++ b/browser/ui/webui/brave_webui_source.h @@ -8,18 +8,20 @@ #include -struct GritResourceMap; - namespace content { class WebUI; class WebUIDataSource; } // namespace content +namespace webui { +struct ResourcePath; +} // namespace webui + // Add brave resource path mapping and localized strings to new data source. content::WebUIDataSource* CreateAndAddWebUIDataSource( content::WebUI* web_ui, const std::string& name, - const GritResourceMap* resource_map, + const webui::ResourcePath* resource_map, size_t resouece_map_size, int html_resource_id, bool disable_trusted_types_csp = false); diff --git a/browser/ui/webui/settings/default_brave_shields_handler.cc b/browser/ui/webui/settings/default_brave_shields_handler.cc index 47bb9918bf92..f3bc34a1a582 100644 --- a/browser/ui/webui/settings/default_brave_shields_handler.cc +++ b/browser/ui/webui/settings/default_brave_shields_handler.cc @@ -14,6 +14,7 @@ #include "chrome/browser/content_settings/host_content_settings_map_factory.h" #include "chrome/browser/profiles/profile.h" #include "content/public/browser/web_ui.h" +#include "url/gurl.h" using brave_shields::ControlType; using brave_shields::ControlTypeFromString; diff --git a/browser/widevine/BUILD.gn b/browser/widevine/BUILD.gn index 61a795e2ccf5..53ab62fd9e58 100644 --- a/browser/widevine/BUILD.gn +++ b/browser/widevine/BUILD.gn @@ -61,6 +61,7 @@ source_set("browser_tests") { "//brave/common:pref_names", "//chrome/browser", "//chrome/browser:browser_process", + "//chrome/browser/profiles:profile", "//chrome/browser/ui", "//chrome/common", "//chrome/test:test_support_ui", diff --git a/build/commands/lib/config.js b/build/commands/lib/config.js index 8cc241208462..8dd28aab755b 100755 --- a/build/commands/lib/config.js +++ b/build/commands/lib/config.js @@ -317,10 +317,6 @@ Config.prototype.buildArgs = function () { if (this.buildConfig !== 'Release') { // treat non-release builds like Debug builds args.treat_warnings_as_errors = false - // TODO(samartnik): component builds crash at the moment on Android. - // We will need to revert this change once this fix is landed in upstream - // https://bugs.chromium.org/p/chromium/issues/detail?id=1166748#c14 - args.is_component_build = false } else { // otherwise there is build error // ld.lld: error: output file too large: 5861255936 bytes @@ -328,7 +324,6 @@ Config.prototype.buildArgs = function () { } // Feed is not used in Brave - args.enable_feed_v1 = false args.enable_feed_v2 = false // TODO(fixme) @@ -396,7 +391,7 @@ Config.prototype.buildArgs = function () { } if (process.platform === 'win32') { - args.cc_wrapper = path.join(this.srcDir, 'brave', 'script', 'redirect-cc.cmd') + args.cc_wrapper = path.join(this.srcDir, 'brave', 'buildtools', 'win', 'redirect-cc', 'bin', 'redirect-cc.exe') } else { args.cc_wrapper = path.join(this.srcDir, 'brave', 'script', 'redirect-cc.py') } diff --git a/build/commands/lib/util.js b/build/commands/lib/util.js index 857c6a64f732..4eab27ae2f76 100755 --- a/build/commands/lib/util.js +++ b/build/commands/lib/util.js @@ -255,9 +255,13 @@ const util = { fileMap.add([path.join(braveBrowserResourcesDir, 'chrome-logo-faded.png'), path.join(chromeBrowserResourcesDir, 'chrome-logo-faded.png')]) fileMap.add([path.join(braveBrowserResourcesDir, 'downloads', 'images', 'incognito_marker.svg'), path.join(chromeBrowserResourcesDir, 'downloads', 'images', 'incognito_marker.svg')]) fileMap.add([path.join(braveBrowserResourcesDir, 'settings', 'images'), path.join(chromeBrowserResourcesDir, 'settings', 'images')]) + fileMap.add([path.join(braveBrowserResourcesDir, 'signin', 'profile_picker', 'images'), path.join(chromeBrowserResourcesDir, 'signin', 'profile_picker', 'images')]) // Copy to make our ${branding_path_component}_behaviors.cc fileMap.add([path.join(config.braveCoreDir, 'chromium_src', 'chrome', 'installer', 'setup', 'brave_behaviors.cc'), path.join(config.srcDir, 'chrome', 'installer', 'setup', 'brave_behaviors.cc')]) + // Replace webui CSS to use our fonts. + fileMap.add([path.join(config.braveCoreDir, 'ui', 'webui', 'resources', 'css', 'text_defaults_md.css'), + path.join(config.srcDir, 'ui', 'webui', 'resources', 'css', 'text_defaults_md.css')]) for (const [source, output] of fileMap) { if (!fs.existsSync(source)) { @@ -345,6 +349,10 @@ const util = { const androidContentPublicResDest = path.join(config.srcDir, 'content', 'public', 'android', 'java', 'res') const androidTouchtoFillResSource = path.join(config.braveCoreDir, 'browser', 'touch_to_fill', 'android', 'internal', 'java', 'res') const androidTouchtoFillResDest = path.join(config.srcDir, 'chrome', 'browser', 'touch_to_fill', 'android', 'internal', 'java', 'res') + const androidToolbarResSource = path.join(config.braveCoreDir, 'browser', 'ui', 'android', 'toolbar', 'java', 'res') + const androidToolbarResDest = path.join(config.srcDir, 'chrome', 'browser', 'ui', 'android', 'toolbar', 'java', 'res') + const androidComponentsResSource = path.join(config.braveCoreDir, 'components', 'browser_ui', 'widget', 'android', 'java', 'res') + const androidComponentsResDest = path.join(config.srcDir, 'components', 'browser_ui', 'widget', 'android', 'java', 'res') // Mapping for copying Brave's Android resource into chromium folder. const copyAndroidResourceMapping = { @@ -353,7 +361,9 @@ const util = { [androidResSource]: [androidResDest], [androidResTemplateSource]: [androidResTemplateDest], [androidContentPublicResSource]: [androidContentPublicResDest], - [androidTouchtoFillResSource]: [androidTouchtoFillResDest] + [androidTouchtoFillResSource]: [androidTouchtoFillResDest], + [androidToolbarResSource]: [androidToolbarResDest], + [androidComponentsResSource]: [androidComponentsResDest] } console.log('copy Android app icons and app resources') @@ -433,24 +443,49 @@ const util = { '--private_key_passphrase=' + passwd]) }, - copyRedirectCC: () => { - // On Windows copy redirect-cc.py to the output dir so we can execute it - // from there to shorten the command line in brave/script/redirect-cc.cmd - console.log('Copying redirect-cc.py...') - const src = path.join(config.braveCoreDir, 'script', 'redirect-cc.py') - const dst = path.join(config.outputDir, 'redirect.py') - if (!fs.existsSync(config.outputDir)) { - fs.mkdirSync(config.outputDir); + buildRedirectCCTool: () => { + // Expected path to redirect-cc.exe + const redirectCCExe = path.join(config.braveCoreDir, 'buildtools', 'win', 'redirect-cc', 'bin', 'redirect-cc.exe') + // Only build if missing + if (fs.existsSync(redirectCCExe)) { + return + } + + console.log('building redirect-cc.exe...') + // Determine Visual Studio path and version + const vsToolchainPath = path.join(config.srcDir, 'build', 'vs_toolchain.py') + // Don't update depot_tools while checking + const depotToolsWinToolchain = process.env.DEPOT_TOOLS_WIN_TOOLCHAIN + process.env.DEPOT_TOOLS_WIN_TOOLCHAIN = '0' + const vsInfo = util.run('python', [vsToolchainPath, 'get_toolchain_dir']).stdout.toString() + if (depotToolsWinToolchain) { + process.env.DEPOT_TOOLS_WIN_TOOLCHAIN = depotToolsWinToolchain + } else { + delete process.env.DEPOT_TOOLS_WIN_TOOLCHAIN + } + const vsPath = vsInfo.split('\n', 1)[0].split('=', 2)[1].trim().replace(/"/g, '') + const vsVersion = vsInfo.split('\n', 3)[2].split('=', 2)[1].trim().replace(/"/g, '') + // Path to MSBuild.exe + let msBuild = '' + if (vsVersion === '2017') { + msBuild = path.join(vsPath, 'MSBuild', '15.0', 'Bin', 'MSBuild.exe') + } else if (vsVersion === '2019') { + msBuild = path.join(vsPath, 'MSBuild', 'Current', 'Bin', 'MSBuild.exe') + } else { + throw 'Error: unexpected version of Visual Studio: ' + vsVersion } - fs.copyFileSync(src, dst) + // Build redirect-cc.sln + const redirectCCSln = path.join(config.braveCoreDir, 'buildtools', 'win', 'redirect-cc', 'redirect-cc.sln') + const arch = process.arch === 'x32' ? 'x86' : process.arch + util.run(msBuild, [redirectCCSln, '/p:Configuration=Release', '/p:Platform=' + arch, '/verbosity:quiet']) }, buildTarget: (options = config.defaultOptions) => { console.log('building ' + config.buildTarget + '...') if (process.platform === 'win32') { - util.copyRedirectCC() util.updateOmahaMidlFiles() + util.buildRedirectCCTool() } let num_compile_failure = 1 diff --git a/build/commands/scripts/updatePatches.js b/build/commands/scripts/updatePatches.js index aebe90d371bc..71f71989b142 100644 --- a/build/commands/scripts/updatePatches.js +++ b/build/commands/scripts/updatePatches.js @@ -11,7 +11,8 @@ const chromiumPathFilter = (s) => s.length > 0 && !s.endsWith('.svg') && !s.endsWith('new_tab_page_view.xml') && !s.endsWith('channel_constants.xml') && - !s.includes('google_update_idl') + !s.includes('google_update_idl') && + s !== 'ui/webui/resources/css/text_defaults_md.css' module.exports = function RunCommand (options) { config.update(options) diff --git a/build/config/brave_build.gni b/build/config/brave_build.gni index b2814a0e27a9..dc96a5948550 100644 --- a/build/config/brave_build.gni +++ b/build/config/brave_build.gni @@ -12,7 +12,6 @@ import("//brave/build/mac/config.gni") import("//brave/components/omnibox/browser/sources.gni") import("//brave/components/search_engines/sources.gni") import("//brave/components/sync/driver/sources.gni") -import("//brave/components/sync/sources.gni") import("//brave/components/sync_device_info/sources.gni") import("//brave/installer/linux/sources.gni") import("//brave/net/dns/sources.gni") diff --git a/buildtools/win/redirect-cc/.gitignore b/buildtools/win/redirect-cc/.gitignore new file mode 100644 index 000000000000..1675048de470 --- /dev/null +++ b/buildtools/win/redirect-cc/.gitignore @@ -0,0 +1,4 @@ +.vs/ +bin/ +Release/ +*.vcxproj.user \ No newline at end of file diff --git a/buildtools/win/redirect-cc/redirect-cc.cc b/buildtools/win/redirect-cc/redirect-cc.cc new file mode 100644 index 000000000000..851c888ef9d1 --- /dev/null +++ b/buildtools/win/redirect-cc/redirect-cc.cc @@ -0,0 +1,125 @@ +/* Copyright (c) 2021 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/. */ + +// clang-format off +#define WIN32_LEAN_AND_MEAN +#include +#include +#include + +#include +#include +// clang-format on + +// Determines verbosity of output based on the value of the environmental +// variable BRAVE_BUILD_SHOW_REDIRECT_CC_CMD (set to 1 for verbose). +BOOL IsVerbose() { + wchar_t buffer[2]; + DWORD dwRet = + GetEnvironmentVariableW(L"BRAVE_BUILD_SHOW_REDIRECT_CC_CMD", buffer, 2); + if (dwRet > 2) { + wprintf( + L"REDIRECT-CC: BRAVE_BUILD_SHOW_REDIRECT_CC_CMD env. var. is expected " + L"to be either 0 or 1.\n"); + return FALSE; + } else if (dwRet == 0) { + dwRet = GetLastError(); + if (dwRet != ERROR_ENVVAR_NOT_FOUND) { + wprintf( + L"REDIRECT-CC: Error getting env. var. " + L"BRAVE_BUILD_SHOW_REDIRECT_CC_CMD (%d).\n", + dwRet); + } + return FALSE; + } else if (wcsncmp(buffer, L"0", 1) != 0) { + return TRUE; + } + return FALSE; +} + +// Escapes double quotes in the arg and wraps the entire arg in double quotes. +const std::wstring EscapeArg(const wchar_t* arg) { + std::wstring str(L"\""); + str.append(arg); + size_t pos = 1; + while ((pos = str.find(L"\"", pos)) != std::string::npos) { + str.replace(pos, 1, L"\\\""); + pos += 2; + } + str.append(L"\""); + return str; +} + +// Calls python executable from search path and passes it redirect-cc.py script +// and all args passed to this exe. +int wmain(int argc, wchar_t* argv[]) { + if (argc < 2) { + wprintf(L"Usage: %s [cmdline_for_redirect_cc]\n", argv[0]); + return 1; + } + + // Build the new command line that calls python with our script. + std::wstring cmd_line_builder = + L"python ..\\..\\brave\\script\\redirect-cc.py"; + for (int i = 1; i < argc; i++) { + cmd_line_builder.append(_T(" ")); + // Double-quote escape args as they may have spaces. + cmd_line_builder.append(EscapeArg(argv[i])); + } + + // CreateProcess requires a mutable command line string. + const auto len = cmd_line_builder.length() + 1; + auto cmd_line = std::make_unique(len); + wcscpy_s(cmd_line.get(), len, cmd_line_builder.c_str()); + + if (IsVerbose()) { + wprintf( + L"----------------------------------------------\n" + L"%s\n" + L"----------------------------------------------\n", + cmd_line.get()); + } + + DWORD err = 0; + STARTUPINFO si; + PROCESS_INFORMATION pi; + ZeroMemory(&si, sizeof(si)); + si.cb = sizeof(si); + ZeroMemory(&pi, sizeof(pi)); + if (!CreateProcessW(NULL, // No module name (use command line) + cmd_line.get(), // Command line + NULL, // Process handle not inheritable + NULL, // Thread handle not inheritable + TRUE, // Set handle inheritance to TRUE + 0, // No creation flags + NULL, // Use parent's environment block + NULL, // Use parent's starting directory + &si, // Pointer to STARTUPINFO structure + &pi) // Pointer to PROCESS_INFORMATION structure + ) { + err = GetLastError(); + wprintf(L"REDIRECT-CC: CreateProcess failed (%d).\n", err); + return err; + } + + // Wait until child process exits. + err = WaitForSingleObject(pi.hProcess, INFINITE); + if (err != WAIT_OBJECT_0) { + if (err == WAIT_FAILED) { + err = GetLastError(); + } + wprintf(L"REDIRECT-CC: Waiting for process to exit failed (%d).\n", err); + } else { + if (!GetExitCodeProcess(pi.hProcess, &err)) { + err = GetLastError(); + wprintf(L"REDIRECT-CC: Failed to get process exit code (%d).\n", err); + } + } + + // Close process and thread handles. + CloseHandle(pi.hProcess); + CloseHandle(pi.hThread); + return err; +} diff --git a/buildtools/win/redirect-cc/redirect-cc.sln b/buildtools/win/redirect-cc/redirect-cc.sln new file mode 100644 index 000000000000..afd9e252dc79 --- /dev/null +++ b/buildtools/win/redirect-cc/redirect-cc.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.1321 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "redirect-cc", "redirect-cc.vcxproj", "{905012DB-FD96-4C2A-A3C4-33E73EE9B1D8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {905012DB-FD96-4C2A-A3C4-33E73EE9B1D8}.Release|x64.ActiveCfg = Release|x64 + {905012DB-FD96-4C2A-A3C4-33E73EE9B1D8}.Release|x64.Build.0 = Release|x64 + {905012DB-FD96-4C2A-A3C4-33E73EE9B1D8}.Release|x86.ActiveCfg = Release|Win32 + {905012DB-FD96-4C2A-A3C4-33E73EE9B1D8}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {325AB052-4175-4853-8004-B612F57CED0D} + EndGlobalSection +EndGlobal diff --git a/buildtools/win/redirect-cc/redirect-cc.vcxproj b/buildtools/win/redirect-cc/redirect-cc.vcxproj new file mode 100644 index 000000000000..df0244a161eb --- /dev/null +++ b/buildtools/win/redirect-cc/redirect-cc.vcxproj @@ -0,0 +1,98 @@ + + + + + Release + Win32 + + + Release + x64 + + + + 16.0 + Win32Proj + {905012db-fd96-4c2a-a3c4-33e73ee9b1d8} + ccwrapper + 10.0.19041.0 + redirect-cc + + + + Application + false + v141 + true + Unicode + + + Application + false + v141 + true + Unicode + + + + + + + + + + + + + + + false + $(SolutionDir)bin\ + $(Configuration)\$(Platform)\ + + + false + $(SolutionDir)bin\ + $(Configuration)\$(Platform)\ + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + + + Console + true + true + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/buildtools/win/redirect-cc/redirect-cc.vcxproj.filters b/buildtools/win/redirect-cc/redirect-cc.vcxproj.filters new file mode 100644 index 000000000000..e846e3b38629 --- /dev/null +++ b/buildtools/win/redirect-cc/redirect-cc.vcxproj.filters @@ -0,0 +1,14 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;def;odl;idl;hpj;bat;asm;asmx + + + + + Source Files + + + \ No newline at end of file diff --git a/chromium_src/chrome/browser/DEPS b/chromium_src/chrome/browser/DEPS index 459d92a07de3..f19bf69cbe7d 100644 --- a/chromium_src/chrome/browser/DEPS +++ b/chromium_src/chrome/browser/DEPS @@ -70,6 +70,7 @@ include_rules = [ "+../../../../../../../chrome/browser/ui/webui/extensions", "+../../../../../../../chrome/browser/ui/webui/history", "+../../../../../../../chrome/browser/ui/webui/settings", + "+../../../../../../../chrome/browser/ui/webui/signin", "+../../../../../../../chrome/browser/ui/webui/version", "+../../../../../../chrome/browser/web_applications/components", "+../../../../../chrome/browser/webauthn", diff --git a/chromium_src/chrome/browser/component_updater/tls_deprecation_config_component_installer.cc b/chromium_src/chrome/browser/component_updater/tls_deprecation_config_component_installer.cc deleted file mode 100644 index cb9bb83b2517..000000000000 --- a/chromium_src/chrome/browser/component_updater/tls_deprecation_config_component_installer.cc +++ /dev/null @@ -1,42 +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 "chrome/browser/component_updater/tls_deprecation_config_component_installer.h" - -#define ReconfigureAfterNetworkRestart \ - ReconfigureAfterNetworkRestart_ChromiumImpl -#include "../../../../../chrome/browser/component_updater/tls_deprecation_config_component_installer.cc" // NOLINT -#undef ReconfigureAfterNetworkRestart - -#include "base/bind.h" -#include "chrome/browser/browser_process.h" -#include "content/public/browser/browser_thread.h" -#include "services/network/public/proto/tls_deprecation_config.pb.h" - -namespace component_updater { - -namespace { - -std::string LoadEmptyConfig() { - base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, - base::BlockingType::WILL_BLOCK); - auto config = - std::make_unique(); - config->set_version_id(1); - return config->SerializeAsString(); -} - -} // namespace - -// static -void TLSDeprecationConfigComponentInstallerPolicy:: - ReconfigureAfterNetworkRestart() { - base::ThreadPool::PostTaskAndReplyWithResult( - FROM_HERE, {base::TaskPriority::USER_VISIBLE, base::MayBlock()}, - base::BindOnce(&LoadEmptyConfig), - base::BindOnce(&UpdateLegacyTLSConfigOnUI)); -} - -} // namespace component_updater diff --git a/chromium_src/chrome/browser/component_updater/tls_deprecation_config_component_installer.h b/chromium_src/chrome/browser/component_updater/tls_deprecation_config_component_installer.h deleted file mode 100644 index 12496d744341..000000000000 --- a/chromium_src/chrome/browser/component_updater/tls_deprecation_config_component_installer.h +++ /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/. */ - -#ifndef BRAVE_CHROMIUM_SRC_CHROME_BROWSER_COMPONENT_UPDATER_TLS_DEPRECATION_CONFIG_COMPONENT_INSTALLER_H_ -#define BRAVE_CHROMIUM_SRC_CHROME_BROWSER_COMPONENT_UPDATER_TLS_DEPRECATION_CONFIG_COMPONENT_INSTALLER_H_ - -#define ReconfigureAfterNetworkRestart \ - ReconfigureAfterNetworkRestart_ChromiumImpl(); \ - static void ReconfigureAfterNetworkRestart -#include "../../../../../chrome/browser/component_updater/tls_deprecation_config_component_installer.h" -#undef ReconfigureAfterNetworkRestart - -#endif // BRAVE_CHROMIUM_SRC_CHROME_BROWSER_COMPONENT_UPDATER_TLS_DEPRECATION_CONFIG_COMPONENT_INSTALLER_H_ diff --git a/chromium_src/chrome/browser/notifications/notification_platform_bridge_mac.mm b/chromium_src/chrome/browser/notifications/notification_platform_bridge_mac.mm index c651ef718c07..3298eb568ef2 100644 --- a/chromium_src/chrome/browser/notifications/notification_platform_bridge_mac.mm +++ b/chromium_src/chrome/browser/notifications/notification_platform_bridge_mac.mm @@ -76,9 +76,5 @@ - (void)timerFired:(NSTimer *)timer { #define BRAVE_DISPLAY_ \ [g_notification_platform_bridge_notification_timeout startTimer:toast]; -#define BRAVE_SUPPORTSALERTSIMPL_ \ - return true; - #include "../../../../../chrome/browser/notifications/notification_platform_bridge_mac.mm" // NOLINT -#undef BRAVE_SUPPORTSALERTSIMPL_ #undef BRAVE_DISPLAY_ diff --git a/chromium_src/chrome/browser/notifications/notification_platform_bridge_mac_utils.mm b/chromium_src/chrome/browser/notifications/notification_platform_bridge_mac_utils.mm new file mode 100644 index 000000000000..cab285d60f70 --- /dev/null +++ b/chromium_src/chrome/browser/notifications/notification_platform_bridge_mac_utils.mm @@ -0,0 +1,9 @@ +/* Copyright 2021 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 BRAVE_SUPPORTSALERTSIMPL_ return true; + +#include "../../../../../chrome/browser/notifications/notification_platform_bridge_mac_utils.mm" // NOLINT +#undef BRAVE_SUPPORTSALERTSIMPL_ diff --git a/chromium_src/chrome/browser/profiles/profile_avatar_icon_util.cc b/chromium_src/chrome/browser/profiles/profile_avatar_icon_util.cc index f2e67fe000c8..1836887524b0 100644 --- a/chromium_src/chrome/browser/profiles/profile_avatar_icon_util.cc +++ b/chromium_src/chrome/browser/profiles/profile_avatar_icon_util.cc @@ -3,11 +3,13 @@ // 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_avatar_icon_util.h" + #include "base/values.h" -#include "brave/grit/brave_theme_resources.h" #include "brave/grit/brave_generated_resources.h" -#include "chrome/browser/profiles/profile_avatar_icon_util.h" +#include "brave/grit/brave_theme_resources.h" #include "chrome/grit/theme_resources.h" +#include "ui/base/resource/resource_bundle.h" #include "ui/native_theme/native_theme.h" // First, define anything that patches will rely on. @@ -43,17 +45,20 @@ size_t GetBraveAvatarIconStartIndex(); } // namespace profiles // Override some functions (see implementations for details). -#define GetCustomProfileAvatarIconsAndLabels \ - GetCustomProfileAvatarIconsAndLabels_ChromiumImpl #define IsDefaultAvatarIconUrl IsDefaultAvatarIconUrl_ChromiumImpl #define GetGuestAvatar GetGuestAvatar_ChromiumImpl +#define GetPlaceholderAvatarIconWithColors \ + GetPlaceholderAvatarIconWithColors_ChromiumImpl +#define GetDefaultProfileAvatarIconAndLabel \ + GetDefaultProfileAvatarIconAndLabel_ChromiumImpl #include "../../../../../chrome/browser/profiles/profile_avatar_icon_util.cc" #undef BRAVE_GET_DEFAULT_AVATAR_ICON_RESOURCE_INFO #undef BRAVE_GET_MODERN_AVATAR_ICON_START_INDEX -#undef GetCustomProfileAvatarIconsAndLabels #undef IsDefaultAvatarIconUrl #undef GetGuestAvatar +#undef GetPlaceholderAvatarIconWithColors +#undef GetDefaultProfileAvatarIconAndLabel namespace profiles { @@ -155,23 +160,6 @@ const IconResourceInfo* GetBraveDefaultAvatarIconResourceInfo( #endif } -std::unique_ptr GetCustomProfileAvatarIconsAndLabels( - size_t selected_avatar_idx) { - auto avatars = - GetCustomProfileAvatarIconsAndLabels_ChromiumImpl(selected_avatar_idx); -#if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) - // Insert the 'placeholder' item, so it is still selectable - // in the Settings and Profile Manager WebUI. - avatars->Insert( - 0, GetAvatarIconAndLabelDict( - profiles::GetPlaceholderAvatarIconUrl(), - l10n_util::GetStringUTF16(IDS_BRAVE_AVATAR_LABEL_PLACEHOLDER), - GetPlaceholderAvatarIndex(), - selected_avatar_idx == GetPlaceholderAvatarIndex(), false)); -#endif - return avatars; -} - bool IsDefaultAvatarIconUrl(const std::string& url, size_t* icon_index) { // Brave supports user choosing the placeholder avatar, Chromium does not. if (url.compare(GetPlaceholderAvatarIconUrl()) == 0) { @@ -189,4 +177,30 @@ ui::ImageModel GetGuestAvatar(int size) { size); } +gfx::Image GetPlaceholderAvatarIconWithColors(SkColor fill_color, + SkColor stroke_color, + int size) { + return ui::ResourceBundle::GetSharedInstance().GetImageNamed( + GetPlaceholderAvatarIconResourceID()); +} + +// Have to redo implementation here because of the re-definition of the +// GetPlaceholderAvatarIconWithColors function above which is used in this +// function. Also, changes the label from "Default Avatar" to our placeholder +// avatar name. +std::unique_ptr GetDefaultProfileAvatarIconAndLabel( + SkColor fill_color, + SkColor stroke_color, + bool selected) { + std::unique_ptr avatar_info( + new base::DictionaryValue()); + gfx::Image icon = profiles::GetPlaceholderAvatarIconWithColors( + fill_color, stroke_color, kAvatarIconSize); + size_t index = profiles::GetPlaceholderAvatarIndex(); + return GetAvatarIconAndLabelDict( + webui::GetBitmapDataUrl(icon.AsBitmap()), + l10n_util::GetStringUTF16(IDS_BRAVE_AVATAR_LABEL_PLACEHOLDER), index, + selected, /*is_gaia_avatar=*/false); +} + } // namespace profiles diff --git a/chromium_src/chrome/browser/profiles/profile_avatar_icon_util_unittest.cc b/chromium_src/chrome/browser/profiles/profile_avatar_icon_util_unittest.cc index e04708644ed7..cf594e700357 100644 --- a/chromium_src/chrome/browser/profiles/profile_avatar_icon_util_unittest.cc +++ b/chromium_src/chrome/browser/profiles/profile_avatar_icon_util_unittest.cc @@ -22,30 +22,17 @@ TEST(ProfileUtilTest, KeepChromiumChoice) { } TEST(ProfileUtilTest, BraveAvatarIconChoices) { - // Test that the avatar icon choices presented to the user - // are brave's and include the placeholder so that - // it can be re-selected, unlike chromium. + // Test that the avatar icon choices presented to the user are brave's. std::unique_ptr avatars( profiles::GetCustomProfileAvatarIconsAndLabels(0)); const size_t expected_selectable_avatar_count = - profiles::kBraveDefaultAvatarIconsCount + 1; + profiles::kBraveDefaultAvatarIconsCount; const size_t actual_selectable_avatar_count = avatars->GetSize(); // Avatars are Brave's, not Chromium's EXPECT_EQ(actual_selectable_avatar_count, expected_selectable_avatar_count); - - // Avatars has the placeholder item put back in - const std::string* actual_first_url = - avatars->GetList()[0].FindStringKey("url"); - auto expected_placeholder_url = profiles::GetPlaceholderAvatarIconUrl(); - EXPECT_EQ(*actual_first_url, expected_placeholder_url); - - // The placeholder was not duplicated as a result of injection. - const std::string* actual_second_url = - avatars->GetList()[1].FindStringKey("url"); - EXPECT_NE(*actual_second_url, expected_placeholder_url); } TEST(ProfileUtilTest, RandomIconNeverFirstIcon) { diff --git a/chromium_src/chrome/browser/resources_util.cc b/chromium_src/chrome/browser/resources_util.cc index e29335dd0e38..2bf60c572858 100644 --- a/chromium_src/chrome/browser/resources_util.cc +++ b/chromium_src/chrome/browser/resources_util.cc @@ -7,8 +7,8 @@ #define BRAVE_RESOURCES_UTIL \ for (size_t i = 0; i < kBraveThemeResourcesSize; ++i) { \ - storage.emplace_back(kBraveThemeResources[i].name, \ - kBraveThemeResources[i].value); \ + storage.emplace_back(kBraveThemeResources[i].path, \ + kBraveThemeResources[i].id); \ } #include "../../../../chrome/browser/resources_util.cc" diff --git a/chromium_src/chrome/browser/signin/account_consistency_disabled_unittest.cc b/chromium_src/chrome/browser/signin/account_consistency_disabled_unittest.cc index 04ec264d2dc1..b9717db681df 100644 --- a/chromium_src/chrome/browser/signin/account_consistency_disabled_unittest.cc +++ b/chromium_src/chrome/browser/signin/account_consistency_disabled_unittest.cc @@ -31,6 +31,7 @@ TEST(AccountConsistencyDisabledTest, NewProfile) { // turned on to 100% of the user base and is no longer needed. // See 36417aa39a5e8484b23f1ec927bfda23465f4f21 TestingProfile::Builder profile_builder; + profile_builder.SetIsNewProfile(true); { TestingPrefStore* user_prefs = new TestingPrefStore(); @@ -90,18 +91,5 @@ TEST(AccountConsistencyDisabledTest, DiceFixAuthErrorsForAllProfiles) { signin::AccountConsistencyMethod::kDisabled, AccountConsistencyModeManager::GetMethodForProfile(profile.get())); } - - { - // Legacy supervised profile. - TestingProfile::Builder profile_builder; - profile_builder.SetSupervisedUserId("supervised_id"); - std::unique_ptr profile = profile_builder.Build(); - ASSERT_TRUE(profile->IsLegacySupervised()); - EXPECT_FALSE( - AccountConsistencyModeManager::IsDiceEnabledForProfile(profile.get())); - EXPECT_EQ( - signin::AccountConsistencyMethod::kDisabled, - AccountConsistencyModeManager::GetMethodForProfile(profile.get())); - } } #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) diff --git a/chromium_src/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc b/chromium_src/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc index e104de66c875..77531699538a 100644 --- a/chromium_src/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc +++ b/chromium_src/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc @@ -55,9 +55,9 @@ void BraveRecentTabsSubMenuModel::ExecuteCommand(int command_id, DCHECK(item.tab_id.is_valid() && item.url.is_valid()); if (item.session_tag == kBraveStubSessionTag) { - ShowSingletonTabOverwritingNTP( - browser_, + NavigateParams params( GetSingletonTabNavigateParams(browser_, GURL(kBraveSyncedTabsUrl))); + ShowSingletonTabOverwritingNTP(browser_, ¶ms); return; } } diff --git a/chromium_src/chrome/browser/ui/views/download/download_item_view.h b/chromium_src/chrome/browser/ui/views/download/download_item_view.h index 242c046c1e2c..e9d35097a70a 100644 --- a/chromium_src/chrome/browser/ui/views/download/download_item_view.h +++ b/chromium_src/chrome/browser/ui/views/download/download_item_view.h @@ -14,9 +14,9 @@ protected: \ bool IsShowingWarningDialog() const; -#define UpdateMode virtual UpdateMode +#define SetMode virtual SetMode #include "../../../../../../../chrome/browser/ui/views/download/download_item_view.h" -#undef UpdateMode +#undef SetMode #undef BRAVE_DOWNLOAD_DOWNLOAD_ITEM_VIEW_H_ #endif // BRAVE_CHROMIUM_SRC_CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_H_ diff --git a/chromium_src/chrome/browser/ui/views/extensions/extension_popup.cc b/chromium_src/chrome/browser/ui/views/extensions/extension_popup.cc index 8cca1b23af3a..4b0a3234eac5 100644 --- a/chromium_src/chrome/browser/ui/views/extensions/extension_popup.cc +++ b/chromium_src/chrome/browser/ui/views/extensions/extension_popup.cc @@ -26,7 +26,7 @@ bool IsBraveExtension(extensions::ExtensionViewHost* host) { #define BRAVE_ADDED_TO_WIDGET \ const int radius = IsBraveExtension(host_.get()) \ ? 0 \ - : GetBubbleFrameView()->corner_radius(); + : GetBubbleFrameView()->GetCornerRadius(); #include "../../../../../../../chrome/browser/ui/views/extensions/extension_popup.cc" #undef BRAVE_ADDED_TO_WIDGET diff --git a/chromium_src/chrome/browser/ui/views/location_bar/location_bar_view_browsertest.cc b/chromium_src/chrome/browser/ui/views/location_bar/location_bar_view_browsertest.cc index e21cc987342e..768d81e023dc 100644 --- a/chromium_src/chrome/browser/ui/views/location_bar/location_bar_view_browsertest.cc +++ b/chromium_src/chrome/browser/ui/views/location_bar/location_bar_view_browsertest.cc @@ -13,6 +13,7 @@ #include "components/omnibox/browser/location_bar_model_impl.h" #include "content/public/test/browser_test.h" #include "content/public/test/url_loader_interceptor.h" +#include "mojo/public/cpp/system/data_pipe.h" #include "net/cert/ct_policy_status.h" #include "net/ssl/ssl_info.h" #include "net/test/cert_test_util.h" @@ -69,8 +70,11 @@ class SecurityIndicatorTest resource_response->ssl_info = ssl_info; params->client->OnReceiveResponse(std::move(resource_response)); // Send an empty response's body. This pipe is not filled with data. - mojo::DataPipe pipe; - params->client->OnStartLoadingResponseBody(std::move(pipe.consumer_handle)); + mojo::ScopedDataPipeProducerHandle producer_handle; + mojo::ScopedDataPipeConsumerHandle consumer_handle; + mojo::CreateDataPipe(nullptr, producer_handle, consumer_handle); + + params->client->OnStartLoadingResponseBody(std::move(consumer_handle)); network::URLLoaderCompletionStatus completion_status; completion_status.ssl_info = ssl_info; params->client->OnComplete(completion_status); diff --git a/chromium_src/chrome/browser/ui/views/profiles/avatar_toolbar_button_delegate.cc b/chromium_src/chrome/browser/ui/views/profiles/avatar_toolbar_button_delegate.cc index 183e31f17d5d..a21ce3ad215c 100644 --- a/chromium_src/chrome/browser/ui/views/profiles/avatar_toolbar_button_delegate.cc +++ b/chromium_src/chrome/browser/ui/views/profiles/avatar_toolbar_button_delegate.cc @@ -20,10 +20,11 @@ void BraveAvatarToolbarButtonDelegate::Init(AvatarToolbarButton* button, AvatarToolbarButton::State BraveAvatarToolbarButtonDelegate::GetState() const { AvatarToolbarButton::State state = AvatarToolbarButtonDelegate::GetState(); if (state == AvatarToolbarButton::State::kGenericProfile) { - ProfileAttributesEntry* entry; - if (g_browser_process->profile_manager() + ProfileAttributesEntry* entry = + g_browser_process->profile_manager() ->GetProfileAttributesStorage() - .GetProfileAttributesWithPath(profile_->GetPath(), &entry) && + .GetProfileAttributesWithPath(profile_->GetPath()); + if (entry && entry->GetAvatarIconIndex() == profiles::GetPlaceholderAvatarIndex()) { return AvatarToolbarButton::State::kNormal; } diff --git a/chromium_src/chrome/browser/ui/webui/extensions/extensions_ui.cc b/chromium_src/chrome/browser/ui/webui/extensions/extensions_ui.cc index c2cd57633fb9..669876188dfb 100644 --- a/chromium_src/chrome/browser/ui/webui/extensions/extensions_ui.cc +++ b/chromium_src/chrome/browser/ui/webui/extensions/extensions_ui.cc @@ -15,21 +15,13 @@ namespace extensions { namespace { -#if !BUILDFLAG(OPTIMIZE_WEBUI) -constexpr char kBraveGeneratedPath[] = - "@out_folder@/gen/brave/browser/resources/extensions/preprocessed"; -#endif - // Called from the original extension_ui.cc's CreateMdExtensionsSource via a // patch. void BraveAddExtensionsResources(content::WebUIDataSource* source) { #if !BUILDFLAG(OPTIMIZE_WEBUI) for (size_t i = 0; i < kBraveExtensionsResourcesSize; ++i) { - std::string path = kBraveExtensionsResources[i].name; - if (path.rfind(kBraveGeneratedPath, 0) == 0) { - path = path.substr(strlen(kBraveGeneratedPath)); - } - source->AddResourcePath(path, kBraveExtensionsResources[i].value); + source->AddResourcePath(kBraveExtensionsResources[i].path, + kBraveExtensionsResources[i].id); } #endif NavigationBarDataProvider::Initialize(source); 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 017495d8c7ae..d96475b0bfa1 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 @@ -268,7 +268,7 @@ void BraveAddCommonStrings(content::WebUIDataSource* html_source, {"resetRewardsData", IDS_SETTINGS_RESET_REWARDS_DATA}, {"showFullUrls", IDS_CONTEXT_MENU_SHOW_FULL_URLS}, }; - AddLocalizedStringsBulk(html_source, localized_strings); + html_source->AddLocalizedStrings(localized_strings); html_source->AddString("webRTCLearnMoreURL", base::ASCIIToUTF16(kWebRTCLearnMoreURL)); html_source->AddString("googleLoginLearnMoreURL", diff --git a/chromium_src/chrome/browser/ui/webui/signin/profile_picker_ui.cc b/chromium_src/chrome/browser/ui/webui/signin/profile_picker_ui.cc new file mode 100644 index 000000000000..703e09b53525 --- /dev/null +++ b/chromium_src/chrome/browser/ui/webui/signin/profile_picker_ui.cc @@ -0,0 +1,14 @@ +/* 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 "chrome/browser/ui/webui/signin/profile_picker_ui.h" + +#include "brave/grit/brave_generated_resources.h" +#include "chrome/grit/generated_resources.h" + +#undef IDS_DEFAULT_AVATAR_LABEL_26 +#define IDS_DEFAULT_AVATAR_LABEL_26 IDS_BRAVE_AVATAR_LABEL_PLACEHOLDER +#include "../../../../../../../chrome/browser/ui/webui/signin/profile_picker_ui.cc" +#undef IDS_DEFAULT_AVATAR_LABEL_26 diff --git a/chromium_src/chrome/browser/ui/webui/webui_util.cc b/chromium_src/chrome/browser/ui/webui/webui_util.cc index cbd5bdb36a38..73d505db6f56 100644 --- a/chromium_src/chrome/browser/ui/webui/webui_util.cc +++ b/chromium_src/chrome/browser/ui/webui/webui_util.cc @@ -18,7 +18,7 @@ constexpr char kBraveCSP[] = } // namespace void SetupWebUIDataSource(content::WebUIDataSource* source, - base::span resources, + base::span resources, int default_resource) { SetupWebUIDataSource_ChromiumImpl(source, resources, default_resource); source->OverrideContentSecurityPolicy( diff --git a/chromium_src/chrome/common/chrome_constants.cc b/chromium_src/chrome/common/chrome_constants.cc index 1397eaa3dc0b..3c28d0731107 100644 --- a/chromium_src/chrome/common/chrome_constants.cc +++ b/chromium_src/chrome/common/chrome_constants.cc @@ -10,7 +10,6 @@ #define FPL FILE_PATH_LITERAL #if defined(OS_MAC) -#define CHROMIUM_PRODUCT_STRING BRAVE_PRODUCT_STRING #define PRODUCT_STRING BRAVE_PRODUCT_STRING #endif // defined(OS_MAC) @@ -36,74 +35,42 @@ const char kChromeVersion[] = CHROME_VERSION_STRING; // do so. #if defined(OS_WIN) -const base::FilePath::CharType kBrowserProcessExecutableNameChromium[] = - FPL("brave.exe"); const base::FilePath::CharType kBrowserProcessExecutableName[] = FPL("brave.exe"); -const base::FilePath::CharType kHelperProcessExecutableNameChromium[] = - FPL("brave.exe"); const base::FilePath::CharType kHelperProcessExecutableName[] = FPL("brave.exe"); #elif defined(OS_MAC) -const base::FilePath::CharType kBrowserProcessExecutableNameChromium[] = - FPL(CHROMIUM_PRODUCT_STRING); const base::FilePath::CharType kBrowserProcessExecutableName[] = FPL(PRODUCT_STRING); -const base::FilePath::CharType kHelperProcessExecutableNameChromium[] = - FPL(CHROMIUM_PRODUCT_STRING " Helper"); const base::FilePath::CharType kHelperProcessExecutableName[] = FPL(PRODUCT_STRING " Helper"); #elif defined(OS_ANDROID) // NOTE: Keep it synced with the process names defined in AndroidManifest.xml. const base::FilePath::CharType kBrowserProcessExecutableName[] = FPL("brave"); -const base::FilePath::CharType kBrowserProcessExecutableNameChromium[] = - FPL(""); const base::FilePath::CharType kHelperProcessExecutableName[] = FPL("sandboxed_process"); -const base::FilePath::CharType kHelperProcessExecutableNameChromium[] = FPL(""); #elif defined(OS_POSIX) -const base::FilePath::CharType kBrowserProcessExecutableNameChromium[] = - FPL("brave"); const base::FilePath::CharType kBrowserProcessExecutableName[] = FPL("brave"); // Helper processes end up with a name of "exe" due to execing via // /proc/self/exe. See bug 22703. -const base::FilePath::CharType kHelperProcessExecutableNameChromium[] = - FPL("exe"); const base::FilePath::CharType kHelperProcessExecutableName[] = FPL("exe"); #endif // OS_* #if defined(OS_WIN) -const base::FilePath::CharType kBrowserProcessExecutablePathChromium[] = - FPL("brave.exe"); const base::FilePath::CharType kBrowserProcessExecutablePath[] = FPL("brave.exe"); -const base::FilePath::CharType kHelperProcessExecutablePathChromium[] = - FPL("brave.exe"); const base::FilePath::CharType kHelperProcessExecutablePath[] = FPL("brave.exe"); #elif defined(OS_MAC) -const base::FilePath::CharType kBrowserProcessExecutablePathChromium[] = - FPL(CHROMIUM_PRODUCT_STRING ".app/Contents/MacOS/" CHROMIUM_PRODUCT_STRING); const base::FilePath::CharType kBrowserProcessExecutablePath[] = FPL(PRODUCT_STRING ".app/Contents/MacOS/" PRODUCT_STRING); -const base::FilePath::CharType kHelperProcessExecutablePathChromium[] = - FPL(CHROMIUM_PRODUCT_STRING " Helper.app/Contents/MacOS/" - CHROMIUM_PRODUCT_STRING " Helper"); const base::FilePath::CharType kHelperProcessExecutablePath[] = FPL(PRODUCT_STRING " Helper.app/Contents/MacOS/" PRODUCT_STRING " Helper"); #elif defined(OS_ANDROID) const base::FilePath::CharType kBrowserProcessExecutablePath[] = FPL("brave"); const base::FilePath::CharType kHelperProcessExecutablePath[] = FPL("brave"); -const base::FilePath::CharType kBrowserProcessExecutablePathChromium[] = - FPL("brave"); -const base::FilePath::CharType kHelperProcessExecutablePathChromium[] = - FPL("brave"); #elif defined(OS_POSIX) -const base::FilePath::CharType kBrowserProcessExecutablePathChromium[] = - FPL("brave"); const base::FilePath::CharType kBrowserProcessExecutablePath[] = FPL("brave"); -const base::FilePath::CharType kHelperProcessExecutablePathChromium[] = - FPL("brave"); const base::FilePath::CharType kHelperProcessExecutablePath[] = FPL("brave"); #endif // OS_* @@ -195,21 +162,12 @@ const wchar_t kUserDataDirname[] = L"User Data"; const float kMaxShareOfExtensionProcesses = 0.30f; -#if defined(OS_CHROMEOS) -const char kProfileDirPrefix[] = "u-"; -const char kLegacyProfileDir[] = "user"; -const char kTestUserProfileDir[] = "test-user"; -const char kLockScreenAppProfile[] = "LockScreenAppsProfile"; -#endif - // This GUID is associated with any 'don't ask me again' settings that the // user can select for different file types. // {2676A9A2-D919-4FEE-9187-152100393AB2} const char kApplicationClientIDStringForAVScanning[] = "2676A9A2-D919-4FEE-9187-152100393AB2"; -const size_t kMaxMetaTagAttributeLength = 2000; - } // namespace chrome #undef FPL diff --git a/chromium_src/chrome/common/url_constants.cc b/chromium_src/chrome/common/url_constants.cc index 07aa57d46a87..cb720e3f6dc2 100644 --- a/chromium_src/chrome/common/url_constants.cc +++ b/chromium_src/chrome/common/url_constants.cc @@ -32,6 +32,10 @@ const char kCastNoDestinationFoundURL[] = const char kChooserBluetoothOverviewURL[] = "https://support.brave.com/"; +const char kChooserHidOverviewUrl[] = "https://support.brave.com/"; + +const char kChooserSerialOverviewUrl[] = "https://support.brave.com/"; + const char kChooserUsbOverviewURL[] = "https://support.brave.com/"; @@ -42,37 +46,13 @@ const char kChromeFixUpdateProblems[] = "https://support.brave.com/"; const char kChromeHelpViaKeyboardURL[] = -#if defined(OS_CHROMEOS) -#if defined(GOOGLE_CHROME_BUILD) - "https://support.brave.com/"; -#else - "https://support.brave.com/"; -#endif // defined(GOOGLE_CHROME_BUILD) -#else "https://support.brave.com/"; -#endif // defined(OS_CHROMEOS) const char kChromeHelpViaMenuURL[] = -#if defined(OS_CHROMEOS) -#if defined(GOOGLE_CHROME_BUILD) "https://support.brave.com/"; -#else - "https://support.brave.com/"; -#endif // defined(GOOGLE_CHROME_BUILD) -#else - "https://support.brave.com/"; -#endif // defined(OS_CHROMEOS) const char kChromeHelpViaWebUIURL[] = "https://support.brave.com/"; -#if defined(OS_CHROMEOS) -const char kChromeOsHelpViaWebUIURL[] = -#if BUILDFLAG(GOOGLE_CHROME_BRANDING) - "https://support.brave.com/"; -#else - "https://support.brave.com/"; -#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) -#endif // defined(OS_CHROMEOS) const char kChromeNativeScheme[] = "chrome-native"; @@ -96,10 +76,6 @@ const char kChromeUIUntrustedNewTabPageUrl[] = const char kChromiumProjectURL[] = "https://github.com/brave/brave-browser/"; -const char kCloudPrintLearnMoreURL[] = - "https://support.brave.com/hc/en-us/articles/" - "360017880792-How-do-I-print-from-Brave-"; - const char kCloudPrintCertificateErrorLearnMoreURL[] = "https://support.brave.com/hc/en-us/articles/" "360017880792-How-do-I-print-from-Brave-"; @@ -156,9 +132,6 @@ const char kLearnMoreReportingURL[] = "https://support.brave.com/hc/en-us/articles/" "360017905872-How-do-I-enable-or-disable-automatic-crash-reporting-"; -const char kLegacySupervisedUserManagementDisplayURL[] = - "https://support.brave.com/"; - const char kManagedUiLearnMoreUrl[] = "https://support.brave.com/"; const char kMixedContentDownloadBlockingLearnMoreUrl[] = @@ -191,7 +164,6 @@ const char kPaymentMethodsLearnMoreURL[] = const char kPrivacyLearnMoreURL[] = "https://support.brave.com/hc/en-us/articles/" "360017989132-How-do-I-change-my-Privacy-Settings-"; -const char kPrivacySandboxURL[] = "https://support.brave.com"; const char kRemoveNonCWSExtensionURL[] = "https://support.brave.com/hc/en-us/articles/" @@ -234,10 +206,6 @@ const char kUpgradeHelpCenterBaseURL[] = const char kWhoIsMyAdministratorHelpURL[] = "https://support.brave.com/"; -#if defined(OS_ANDROID) -const char kAndroidAppScheme[] = "android-app"; -#endif - #if defined(OS_ANDROID) const char kEnhancedPlaybackNotificationLearnMoreURL[] = // Keep in sync with chrome/android/java/strings/android_chrome_strings.grd diff --git a/chromium_src/chrome/install_static/brave_install_util_unittest.cc b/chromium_src/chrome/install_static/brave_install_util_unittest.cc index 5ca7c902620a..5943a3ee1e35 100644 --- a/chromium_src/chrome/install_static/brave_install_util_unittest.cc +++ b/chromium_src/chrome/install_static/brave_install_util_unittest.cc @@ -266,7 +266,7 @@ TEST(InstallStaticTest, SpacesAndQuotesWindowsInspired) { TEST(InstallStaticTest, BrowserProcessTest) { EXPECT_FALSE(IsProcessTypeInitialized()); InitializeProcessType(); - EXPECT_FALSE(IsNonBrowserProcess()); + EXPECT_TRUE(IsBrowserProcess()); } class InstallStaticUtilTest diff --git a/chromium_src/components/permissions/DEPS b/chromium_src/components/permissions/DEPS index bc38ae21147e..62ac1b38b06e 100644 --- a/chromium_src/components/permissions/DEPS +++ b/chromium_src/components/permissions/DEPS @@ -1,4 +1,5 @@ include_rules = [ "+../../../../components/permissions", "+components/permissions", + "+third_party/widevine/cdm", ] diff --git a/chromium_src/components/permissions/permission_uma_util.cc b/chromium_src/components/permissions/permission_uma_util.cc index 6c0650fa3f38..9d00fa3a4eba 100644 --- a/chromium_src/components/permissions/permission_uma_util.cc +++ b/chromium_src/components/permissions/permission_uma_util.cc @@ -6,9 +6,10 @@ #include "components/permissions/permission_uma_util.h" #include "build/build_config.h" +#include "third_party/widevine/cdm/buildflags.h" // Since we don't do UMA just reuse an existing UMA type instead of adding one. -#if !defined(OS_ANDROID) && !defined(OS_IOS) +#if BUILDFLAG(ENABLE_WIDEVINE) #define BRAVE_GET_UMA_VALUE_FOR_REQUEST_TYPE \ case RequestType::kWidevine: \ return RequestTypeForUma::PERMISSION_WINDOW_PLACEMENT; diff --git a/chromium_src/components/permissions/request_type.cc b/chromium_src/components/permissions/request_type.cc index 3c61565231c8..adf8f6bacb4f 100644 --- a/chromium_src/components/permissions/request_type.cc +++ b/chromium_src/components/permissions/request_type.cc @@ -9,5 +9,15 @@ case RequestType::kWidevine: \ return vector_icons::kExtensionIcon; +#if BUILDFLAG(ENABLE_WIDEVINE) +#define BRAVE_PERMISSION_KEY_FOR_REQUEST_TYPE \ + case permissions::RequestType::kWidevine: \ + return "widevine"; +#else +#define BRAVE_PERMISSION_KEY_FOR_REQUEST_TYPE +#endif + #include "../../../../components/permissions/request_type.cc" + +#undef BRAVE_PERMISSION_KEY_FOR_REQUEST_TYPE #undef BRAVE_GET_ICON_ID_DESKTOP diff --git a/chromium_src/components/permissions/request_type.h b/chromium_src/components/permissions/request_type.h index 5e8fb0f4a87a..6cdef7cf1c1f 100644 --- a/chromium_src/components/permissions/request_type.h +++ b/chromium_src/components/permissions/request_type.h @@ -7,9 +7,10 @@ #define BRAVE_CHROMIUM_SRC_COMPONENTS_PERMISSIONS_REQUEST_TYPE_H_ #include "build/build_config.h" +#include "third_party/widevine/cdm/buildflags.h" // clang-format off -#if !defined(OS_ANDROID) && !defined(OS_IOS) +#if BUILDFLAG(ENABLE_WIDEVINE) #define BRAVE_REQUEST_TYPES \ kWidevine, #else diff --git a/chromium_src/components/sync/engine_impl/model_type_registry.cc b/chromium_src/components/sync/engine/model_type_registry.cc similarity index 69% rename from chromium_src/components/sync/engine_impl/model_type_registry.cc rename to chromium_src/components/sync/engine/model_type_registry.cc index 7d29dcb0f570..0dacebd0dfa9 100644 --- a/chromium_src/components/sync/engine_impl/model_type_registry.cc +++ b/chromium_src/components/sync/engine/model_type_registry.cc @@ -3,8 +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/. */ -#include "brave/components/sync/engine_impl/brave_model_type_worker.h" +#include "brave/components/sync/engine/brave_model_type_worker.h" #define ModelTypeWorker BraveModelTypeWorker -#include "../../../../../components/sync/engine_impl/model_type_registry.cc" +#include "../../../../../components/sync/engine/model_type_registry.cc" #undef ModelTypeWorker diff --git a/chromium_src/components/sync/engine_impl/model_type_worker.h b/chromium_src/components/sync/engine/model_type_worker.h similarity index 78% rename from chromium_src/components/sync/engine_impl/model_type_worker.h rename to chromium_src/components/sync/engine/model_type_worker.h index ad659993693f..4e8d11d32286 100644 --- a/chromium_src/components/sync/engine_impl/model_type_worker.h +++ b/chromium_src/components/sync/engine/model_type_worker.h @@ -3,8 +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/. */ -#ifndef BRAVE_CHROMIUM_SRC_COMPONENTS_SYNC_ENGINE_IMPL_MODEL_TYPE_WORKER_H_ -#define BRAVE_CHROMIUM_SRC_COMPONENTS_SYNC_ENGINE_IMPL_MODEL_TYPE_WORKER_H_ +#ifndef BRAVE_CHROMIUM_SRC_COMPONENTS_SYNC_ENGINE_MODEL_TYPE_WORKER_H_ +#define BRAVE_CHROMIUM_SRC_COMPONENTS_SYNC_ENGINE_MODEL_TYPE_WORKER_H_ #include "base/gtest_prod_util.h" @@ -25,9 +25,9 @@ FORWARD_DECLARE_TEST(BraveModelTypeWorkerTest, ResetProgressMarkerMaxPeriod); #define OnCommitResponse virtual OnCommitResponse -#include "../../../../../components/sync/engine_impl/model_type_worker.h" +#include "../../../../../components/sync/engine/model_type_worker.h" #undef OnCommitResponse #undef BRAVE_MODEL_TYPE_WORKER_H_ -#endif // BRAVE_CHROMIUM_SRC_COMPONENTS_SYNC_ENGINE_IMPL_MODEL_TYPE_WORKER_H_ +#endif // BRAVE_CHROMIUM_SRC_COMPONENTS_SYNC_ENGINE_MODEL_TYPE_WORKER_H_ diff --git a/chromium_src/components/sync/engine/sync_manager_factory.cc b/chromium_src/components/sync/engine/sync_manager_factory.cc index 18cded8cac53..1c6760d96de9 100644 --- a/chromium_src/components/sync/engine/sync_manager_factory.cc +++ b/chromium_src/components/sync/engine/sync_manager_factory.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 http://mozilla.org/MPL/2.0/. */ -#include "brave/components/sync/engine_impl/brave_sync_manager_impl.h" +#include "brave/components/sync/engine/brave_sync_manager_impl.h" #define SyncManagerImpl BraveSyncManagerImpl #include "../../../../../components/sync/engine/sync_manager_factory.cc" diff --git a/chromium_src/components/sync/engine_impl/DEPS b/chromium_src/components/sync/engine_impl/DEPS deleted file mode 100644 index a3d0e418f537..000000000000 --- a/chromium_src/components/sync/engine_impl/DEPS +++ /dev/null @@ -1,3 +0,0 @@ -include_rules = [ - "+../../../../../components/sync/engine_impl", -] diff --git a/chromium_src/content/browser/renderer_host/navigation_request.cc b/chromium_src/content/browser/renderer_host/navigation_request.cc index 15905a78b6a3..68ae775271d7 100644 --- a/chromium_src/content/browser/renderer_host/navigation_request.cc +++ b/chromium_src/content/browser/renderer_host/navigation_request.cc @@ -21,7 +21,7 @@ GURL GetTopDocumentGURL(content::FrameTreeNode* frame_tree_node) { // On Android, a base URL can be set for the frame. If this the case, it is // the URL to use for cookies. content::NavigationEntry* last_committed_entry = - frame_tree_node->navigator().GetController()->GetLastCommittedEntry(); + frame_tree_node->navigator().controller().GetLastCommittedEntry(); if (last_committed_entry) gurl = last_committed_entry->GetBaseURLForDataURL(); #endif @@ -32,11 +32,11 @@ GURL GetTopDocumentGURL(content::FrameTreeNode* frame_tree_node) { } // namespace -#define BRAVE_ONREQUESTREDIRECTED_MAYBEHIDEREFERRER \ - BrowserContext* browser_context = \ - frame_tree_node_->navigator().GetController()->GetBrowserContext(); \ - GetContentClient()->browser()->MaybeHideReferrer( \ - browser_context, common_params_->url, \ +#define BRAVE_ONREQUESTREDIRECTED_MAYBEHIDEREFERRER \ + BrowserContext* browser_context = \ + frame_tree_node_->navigator().controller().GetBrowserContext(); \ + GetContentClient()->browser()->MaybeHideReferrer( \ + browser_context, common_params_->url, \ GetTopDocumentGURL(frame_tree_node_), &common_params_->referrer); #define BRAVE_ONSTARTCHECKSCOMPLETE_MAYBEHIDEREFERRER \ @@ -47,9 +47,9 @@ GURL GetTopDocumentGURL(content::FrameTreeNode* frame_tree_node) { #define BRAVE_NAVIGATION_REQUEST_ADD_ADDITIONAL_REQUEST_HEADERS \ ? GetContentClient()->browser()->GetEffectiveUserAgent(browser_context, url) -#define BRAVE_NAVIGATION_REQUEST_SET_IS_OVERRIDING_USERAGENT \ - ? GetContentClient()->browser()->GetEffectiveUserAgent( \ - frame_tree_node_->navigator().GetController()->GetBrowserContext(), \ +#define BRAVE_NAVIGATION_REQUEST_SET_IS_OVERRIDING_USERAGENT \ + ? GetContentClient()->browser()->GetEffectiveUserAgent( \ + frame_tree_node_->navigator().controller().GetBrowserContext(), \ GetURL()) #include "../../../../../content/browser/renderer_host/navigation_request.cc" diff --git a/chromium_src/ios/chrome/DEPS b/chromium_src/ios/chrome/DEPS index 4ccdc38aecef..69af31aa692e 100644 --- a/chromium_src/ios/chrome/DEPS +++ b/chromium_src/ios/chrome/DEPS @@ -1,4 +1,5 @@ include_rules = [ + "+components/breadcrumbs/core", "+crypto", "+ios/shared/chrome/common", "+ios/third_party", diff --git a/chromium_src/ios/chrome/browser/application_context_impl.mm b/chromium_src/ios/chrome/browser/application_context_impl.mm index db3e775a66b4..56d25ef32ae9 100644 --- a/chromium_src/ios/chrome/browser/application_context_impl.mm +++ b/chromium_src/ios/chrome/browser/application_context_impl.mm @@ -18,6 +18,7 @@ #include "base/time/default_clock.h" #include "base/time/default_tick_clock.h" #include "brave/ios/browser/metrics/ios_brave_metrics_services_manager_client.h" +#include "components/breadcrumbs/core/breadcrumb_manager.h" #include "components/component_updater/component_updater_service.h" #include "components/gcm_driver/gcm_driver.h" #include "components/history/core/browser/history_service.h" @@ -35,7 +36,6 @@ #include "ios/chrome/browser/browser_state/chrome_browser_state_manager_impl.h" #include "ios/chrome/browser/chrome_paths.h" #import "ios/chrome/browser/crash_report/breadcrumbs/application_breadcrumbs_logger.h" -#include "ios/chrome/browser/crash_report/breadcrumbs/breadcrumb_manager.h" #include "ios/chrome/browser/crash_report/breadcrumbs/breadcrumb_persistent_storage_manager.h" #include "ios/chrome/browser/history/history_service_factory.h" #include "ios/chrome/browser/ios_chrome_io_thread.h" @@ -231,11 +231,6 @@ void BindNetworkChangeManagerReceiver( return GetMetricsServicesManager()->GetVariationsService(); } -rappor::RapporServiceImpl* ApplicationContextImpl::GetRapporServiceImpl() { - DCHECK(thread_checker_.CalledOnValidThread()); - return GetMetricsServicesManager()->GetRapporServiceImpl(); -} - net::NetLog* ApplicationContextImpl::GetNetLog() { DCHECK(thread_checker_.CalledOnValidThread()); return net::NetLog::Get(); diff --git a/chromium_src/sandbox/policy/win/sandbox_win.cc b/chromium_src/sandbox/policy/win/sandbox_win.cc index ccfc60808866..7d584d5e4d43 100644 --- a/chromium_src/sandbox/policy/win/sandbox_win.cc +++ b/chromium_src/sandbox/policy/win/sandbox_win.cc @@ -10,8 +10,10 @@ namespace sandbox { namespace policy { namespace { -void BraveLaunchOption(const std::string& process_type, - base::LaunchOptions *options) { +void BraveLaunchOption(base::CommandLine* cmd_line, + base::LaunchOptions* options) { + std::string process_type = + cmd_line->GetSwitchValueASCII(switches::kProcessType); if (process_type == switches::kUtilityProcess) options->start_hidden = true; } @@ -20,6 +22,6 @@ void BraveLaunchOption(const std::string& process_type, } // namespace policy } // namespace sandbox -#define BRAVE_START_SANDBOXED_PROCESS BraveLaunchOption(process_type, &options); +#define BRAVE_START_SANDBOXED_PROCESS BraveLaunchOption(cmd_line, &options); #include "../../../../../sandbox/policy/win/sandbox_win.cc" #undef BRAVE_START_SANDBOXED_PROCESS diff --git a/chromium_src/third_party/blink/renderer/core/page/plugin_data.h b/chromium_src/third_party/blink/renderer/core/page/plugin_data.h deleted file mode 100644 index 5fc591ef49eb..000000000000 --- a/chromium_src/third_party/blink/renderer/core/page/plugin_data.h +++ /dev/null @@ -1,17 +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/. */ - -#ifndef BRAVE_CHROMIUM_SRC_THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_PLUGIN_DATA_H_ -#define BRAVE_CHROMIUM_SRC_THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_PLUGIN_DATA_H_ - -#define BRAVE_PLUGIN_DATA_H \ - void SetName(const String& new_name) { name_ = new_name; } \ - void SetFilename(const String& new_filename) { filename_ = new_filename; } - -#include "../../../../../../../third_party/blink/renderer/core/page/plugin_data.h" - -#undef BRAVE_PLUGIN_DATA_H - -#endif // BRAVE_CHROMIUM_SRC_THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_PLUGIN_DATA_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 04088e99edb7..a5569681e0a3 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 @@ -14,8 +14,6 @@ #include "third_party/blink/renderer/modules/plugins/dom_plugin.h" #include "third_party/blink/renderer/modules/plugins/dom_plugin_array.h" #include "third_party/blink/renderer/platform/heap/heap.h" -#include "third_party/blink/renderer/platform/wtf/text/string_builder.h" -#include "third_party/blink/renderer/platform/wtf/vector.h" using blink::DOMPlugin; using blink::DOMPluginArray; @@ -26,30 +24,9 @@ using blink::Member; using blink::MimeClassInfo; using blink::PluginInfo; using WTF::String; -using WTF::StringBuilder; namespace brave { -String PluginReplacementName(std::mt19937_64* prng) { - std::vector chrome{"Chrome ", "Chromium ", "Brave ", - "Web ", "Browser ", "OpenSource ", - "Online ", "JavaScript ", ""}; - std::vector pdf{"PDF ", - "Portable Document Format ", - "portable-document-format ", - "document ", - "doc ", - "PDF and PS ", - "com.adobe.pdf "}; - std::vector viewer{"Viewer", "Renderer", "Display", "Plugin", - "plug-in", "plug in", "extension", ""}; - StringBuilder result; - result.Append(chrome[(*prng)() % chrome.size()]); - result.Append(pdf[(*prng)() % pdf.size()]); - result.Append(viewer[(*prng)() % viewer.size()]); - return result.ToString(); -} - void FarblePlugins(DOMPluginArray* owner, HeapVector>* dom_plugins) { if (!owner->DomWindow()) @@ -61,36 +38,15 @@ void FarblePlugins(DOMPluginArray* owner, case BraveFarblingLevel::OFF: { break; } + case BraveFarblingLevel::BALANCED: case BraveFarblingLevel::MAXIMUM: { - dom_plugins->clear(); - // "Maximum" behavior is clear existing plugins + "balanced" behavior, - // so fall through here. - U_FALLTHROUGH; - } - case BraveFarblingLevel::BALANCED: { - std::mt19937_64 prng = BraveSessionCache::From(*(frame->DomWindow())) - .MakePseudoRandomGenerator(); - // The item() method will populate plugin info if any item of - // |dom_plugins_| is null, but when it tries, it assumes the - // length of |dom_plugins_| == the length of the underlying - // GetPluginData()->Plugins(). Once we add our fake plugins, that - // assumption will break and the item() method will crash with an - // out-of-bounds array access. Rather than patch the item() method, we - // ensure that the cache is fully populated now while the assumptions - // still hold, so the problematic code is never executed later. - for (unsigned index = 0; index < dom_plugins->size(); index++) { - auto plugin = frame->GetPluginData()->Plugins()[index]; - String name = plugin->Name(); - // Built-in plugins get their names and descriptions farbled as well. - if ((name == "Chrome PDF Plugin") || (name == "Chrome PDF Viewer")) { - plugin->SetName(PluginReplacementName(&prng)); - plugin->SetFilename( - BraveSessionCache::From(*(frame->DomWindow())) - .GenerateRandomString(plugin->Filename().Ascii(), 32)); - } - (*dom_plugins)[index] = - MakeGarbageCollected(frame->DomWindow(), *plugin); - } + // Both "balanced" and "maximum" behaviors will return a list with 2 fake + // plugins only since Chromium 90, which changed the navigator.plugins + // array to always be an empty one unless features::kNavigatorPluginsEmpty + // is disabled with --disable-features (see https://crrev.com/c/2629990), + // which is a scenario not supported by Brave. + DCHECK(dom_plugins->IsEmpty()); + // Add fake plugin #1. auto* fake_plugin_info_1 = MakeGarbageCollected( BraveSessionCache::From(*(frame->DomWindow())) @@ -109,6 +65,7 @@ void FarblePlugins(DOMPluginArray* owner, auto* fake_dom_plugin_1 = MakeGarbageCollected( frame->DomWindow(), *fake_plugin_info_1); dom_plugins->push_back(fake_dom_plugin_1); + // Add fake plugin #2. auto* fake_plugin_info_2 = MakeGarbageCollected( BraveSessionCache::From(*(frame->DomWindow())) @@ -127,7 +84,10 @@ void FarblePlugins(DOMPluginArray* owner, auto* fake_dom_plugin_2 = MakeGarbageCollected( frame->DomWindow(), *fake_plugin_info_2); dom_plugins->push_back(fake_dom_plugin_2); + // Shuffle the list of plugins pseudo-randomly, based on the domain key. + std::mt19937_64 prng = BraveSessionCache::From(*(frame->DomWindow())) + .MakePseudoRandomGenerator(); std::shuffle(dom_plugins->begin(), dom_plugins->end(), prng); break; } @@ -139,7 +99,7 @@ void FarblePlugins(DOMPluginArray* owner, } // namespace brave #define BRAVE_DOM_PLUGINS_UPDATE_PLUGIN_DATA \ - data->ResetPluginData(); \ + GetPluginData()->ResetPluginData(); \ brave::FarblePlugins(this, &dom_plugins_); #include "../../../../../../../third_party/blink/renderer/modules/plugins/dom_plugin_array.cc" diff --git a/chromium_src/third_party/blink/renderer/modules/webaudio/audio_buffer.cc b/chromium_src/third_party/blink/renderer/modules/webaudio/audio_buffer.cc index 59f187a34e22..4652f51071ad 100644 --- a/chromium_src/third_party/blink/renderer/modules/webaudio/audio_buffer.cc +++ b/chromium_src/third_party/blink/renderer/modules/webaudio/audio_buffer.cc @@ -18,7 +18,7 @@ if (ExecutionContext* context = ExecutionContext::From(script_state)) { \ if (WebContentSettingsClient* settings = \ brave::GetContentSettingsClientFor(context)) { \ - DOMFloat32Array* destination_array = array.View(); \ + DOMFloat32Array* destination_array = array.Get(); \ size_t len = destination_array->length(); \ if (len > 0) { \ float* destination = destination_array->Data(); \ diff --git a/chromium_src/ui/base/webui/web_ui_util.cc b/chromium_src/ui/base/webui/web_ui_util.cc index 084430aaded3..a86c6e49b2ce 100644 --- a/chromium_src/ui/base/webui/web_ui_util.cc +++ b/chromium_src/ui/base/webui/web_ui_util.cc @@ -8,16 +8,10 @@ #include "brave/ui/webui/resources/grit/brave_webui_resources.h" #include "ui/resources/grit/webui_generated_resources.h" -// Replace text_defaults.css with brave's text_defaults.css +// Replace text_defaults_md.css with brave's text_defaults_md.css // which is defined in brave_webui_resources.grd. -#define IDR_WEBUI_CSS_TEXT_DEFAULTS_MD_CSS_PREVIOUS \ - IDR_WEBUI_CSS_TEXT_DEFAULTS_MD_CSS - #undef IDR_WEBUI_CSS_TEXT_DEFAULTS_MD_CSS -#define IDR_WEBUI_CSS_TEXT_DEFAULTS_MD_CSS IDR_BRAVE_WEBUI_CSS_TEXT_DEFAULTS +#define IDR_WEBUI_CSS_TEXT_DEFAULTS_MD_CSS IDR_BRAVE_WEBUI_CSS_TEXT_DEFAULTS_MD #include "../../../../../ui/base/webui/web_ui_util.cc" - #undef IDR_WEBUI_CSS_TEXT_DEFAULTS_MD_CSS -#define IDR_WEBUI_CSS_TEXT_DEFAULTS_MD_CSS \ - IDR_WEBUI_CSS_TEXT_DEFAULTS_MD_CSS_PREVIOUS diff --git a/common/extensions/api/_api_features.json b/common/extensions/api/_api_features.json index b0128beef66a..cee44850e4bc 100644 --- a/common/extensions/api/_api_features.json +++ b/common/extensions/api/_api_features.json @@ -1,7 +1,7 @@ // 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/. -// Command to get whitelist ID: +// Command to get allowlist ID: // Brave Shields A321D47A2B4CA86898167A55CA8B2E02385EA7CD: echo -n mnojpmjdmbbfmejpflffifhffcmidifd | openssl sha1 | tr '[:lower:]' '[:upper:]' // WebTorrent 3D9518A72EB02667A773B69DBA9E72E0F4A37423: echo -n lgjmpdmojkpocjcopdikifhejkkjglho | openssl sha1 | tr '[:lower:]' '[:upper:]' // ipfs-companion 780BF954C0F7C586EA9662D4F967771F49CC2114: echo -n nibjojkomfdiaoajekhjakgkdhaomnch | openssl sha1 | tr '[:lower:]' '[:upper:]' @@ -12,7 +12,7 @@ "channel": "stable", "dependencies": [], "contexts": ["blessed_extension"], - "whitelist": [ + "allowlist": [ "A321D47A2B4CA86898167A55CA8B2E02385EA7CD" ] }, @@ -56,24 +56,24 @@ "sockets.tcp": { "dependencies": ["manifest:sockets"], "contexts": ["blessed_extension"], - "whitelist": ["3D9518A72EB02667A773B69DBA9E72E0F4A37423", "780BF954C0F7C586EA9662D4F967771F49CC2114", "FF32507DC3DB5DFFD1D6733187C84D4B74713D63"] + "allowlist": ["3D9518A72EB02667A773B69DBA9E72E0F4A37423", "780BF954C0F7C586EA9662D4F967771F49CC2114", "FF32507DC3DB5DFFD1D6733187C84D4B74713D63"] }, "sockets.tcpServer": { "dependencies": ["manifest:sockets"], "contexts": ["blessed_extension"], - "whitelist": ["3D9518A72EB02667A773B69DBA9E72E0F4A37423", "780BF954C0F7C586EA9662D4F967771F49CC2114", "FF32507DC3DB5DFFD1D6733187C84D4B74713D63"] + "allowlist": ["3D9518A72EB02667A773B69DBA9E72E0F4A37423", "780BF954C0F7C586EA9662D4F967771F49CC2114", "FF32507DC3DB5DFFD1D6733187C84D4B74713D63"] }, "sockets.udp": { "dependencies": ["manifest:sockets"], "contexts": ["blessed_extension"], - "whitelist": ["3D9518A72EB02667A773B69DBA9E72E0F4A37423", "780BF954C0F7C586EA9662D4F967771F49CC2114", "FF32507DC3DB5DFFD1D6733187C84D4B74713D63"] + "allowlist": ["3D9518A72EB02667A773B69DBA9E72E0F4A37423", "780BF954C0F7C586EA9662D4F967771F49CC2114", "FF32507DC3DB5DFFD1D6733187C84D4B74713D63"] }, "braveRewards": [ { "channel": "stable", "dependencies": [], "contexts": ["blessed_extension"], - "whitelist": [ + "allowlist": [ "46E9817CBF915C0D1F6BCCF916C42CC666FF1D64" ] }, @@ -89,14 +89,14 @@ "channel": "stable", "dependencies": [], "contexts": ["blessed_extension"], - "whitelist": [ + "allowlist": [ "46E9817CBF915C0D1F6BCCF916C42CC666FF1D64" ] }, "braveTheme": [{ "channel": "stable", "contexts": ["blessed_extension"], - "whitelist": [ + "allowlist": [ "A321D47A2B4CA86898167A55CA8B2E02385EA7CD", // braveShields "46E9817CBF915C0D1F6BCCF916C42CC666FF1D64", // braveRewards "21070F3D60711361C1210B870439BE49B5D995F4" // braveWallet @@ -115,7 +115,7 @@ "greaselion": [{ "channel": "stable", "contexts": ["blessed_extension"], - "whitelist": [ + "allowlist": [ "A321D47A2B4CA86898167A55CA8B2E02385EA7CD", // braveShields "46E9817CBF915C0D1F6BCCF916C42CC666FF1D64" // braveRewards ] @@ -129,7 +129,7 @@ "braveToday": { "channel": "stable", "contexts": ["blessed_extension"], - "whitelist": [ + "allowlist": [ "A321D47A2B4CA86898167A55CA8B2E02385EA7CD" // brave ] } diff --git a/common/extensions/api/_brave_wallet_api_features.json b/common/extensions/api/_brave_wallet_api_features.json index c59429c4ce1b..cdf46b58cfad 100644 --- a/common/extensions/api/_brave_wallet_api_features.json +++ b/common/extensions/api/_brave_wallet_api_features.json @@ -1,7 +1,7 @@ // 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/. -// Command to get whitelist ID: +// Command to get allowlist ID: // Brave Shields A321D47A2B4CA86898167A55CA8B2E02385EA7CD: echo -n mnojpmjdmbbfmejpflffifhffcmidifd | openssl sha1 | tr '[:lower:]' '[:upper:]' // Ethereum Remote Client 21070F3D60711361C1210B870439BE49B5D995F4: echo -n odbfpeeihdkbihmopkbjmoonfanlbfcl | openssl sha1 | tr '[:lower:]' '[:upper:]' // MetaMask 25A63DB284EE093DE479761CF1802EF95B19FDAC: echo -n nkbihfbeogaeaoehlefnkodbefgpgknn | openssl sha1 | tr '[:lower:]' '[:upper:]' @@ -12,7 +12,7 @@ "dependencies": [], "contexts": ["blessed_extension"], "component_extensions_auto_granted": false, - "whitelist": [ + "allowlist": [ "A321D47A2B4CA86898167A55CA8B2E02385EA7CD", "21070F3D60711361C1210B870439BE49B5D995F4" ] @@ -30,7 +30,7 @@ "dependencies": [], "contexts": ["blessed_extension"], "component_extensions_auto_granted": false, - "whitelist": [ + "allowlist": [ "21070F3D60711361C1210B870439BE49B5D995F4" ] }, @@ -39,7 +39,7 @@ "dependencies": [], "contexts": ["blessed_extension"], "component_extensions_auto_granted": false, - "whitelist": [ + "allowlist": [ "21070F3D60711361C1210B870439BE49B5D995F4" ] }, @@ -48,7 +48,7 @@ "dependencies": [], "contexts": ["blessed_extension"], "component_extensions_auto_granted": false, - "whitelist": [ + "allowlist": [ "21070F3D60711361C1210B870439BE49B5D995F4" ] }, @@ -57,7 +57,7 @@ "dependencies": [], "contexts": ["blessed_extension"], "component_extensions_auto_granted": false, - "whitelist": [ + "allowlist": [ "21070F3D60711361C1210B870439BE49B5D995F4" ] }, @@ -66,7 +66,7 @@ "dependencies": [], "contexts": ["blessed_extension"], "component_extensions_auto_granted": false, - "whitelist": [ + "allowlist": [ "21070F3D60711361C1210B870439BE49B5D995F4", "25A63DB284EE093DE479761CF1802EF95B19FDAC" ] diff --git a/common/extensions/api/_ipfs_api_features.json b/common/extensions/api/_ipfs_api_features.json index 4f010e0308ea..2c7dbfae3833 100644 --- a/common/extensions/api/_ipfs_api_features.json +++ b/common/extensions/api/_ipfs_api_features.json @@ -17,6 +17,6 @@ }, { "channel": "stable", "contexts": ["blessed_extension"], - "whitelist": ["780BF954C0F7C586EA9662D4F967771F49CC2114", "FF32507DC3DB5DFFD1D6733187C84D4B74713D63", "A321D47A2B4CA86898167A55CA8B2E02385EA7CD"] + "allowlist": ["780BF954C0F7C586EA9662D4F967771F49CC2114", "FF32507DC3DB5DFFD1D6733187C84D4B74713D63", "A321D47A2B4CA86898167A55CA8B2E02385EA7CD"] }] } diff --git a/common/extensions/api/_manifest_features.json b/common/extensions/api/_manifest_features.json index efd965b38956..78d2e1ec7fcf 100644 --- a/common/extensions/api/_manifest_features.json +++ b/common/extensions/api/_manifest_features.json @@ -6,6 +6,6 @@ "sockets": { "channel": "stable", "extension_types": ["extension", "platform_app"], - "whitelist": ["3D9518A72EB02667A773B69DBA9E72E0F4A37423", "780BF954C0F7C586EA9662D4F967771F49CC2114", "FF32507DC3DB5DFFD1D6733187C84D4B74713D63"] + "allowlist": ["3D9518A72EB02667A773B69DBA9E72E0F4A37423", "780BF954C0F7C586EA9662D4F967771F49CC2114", "FF32507DC3DB5DFFD1D6733187C84D4B74713D63"] } } diff --git a/common/extensions/api/_permission_features.json b/common/extensions/api/_permission_features.json index 06ac2ce73e4e..0f3756a2a5e5 100644 --- a/common/extensions/api/_permission_features.json +++ b/common/extensions/api/_permission_features.json @@ -15,7 +15,7 @@ { "channel": "stable", "extension_types": ["extension"], - "whitelist": [ + "allowlist": [ "63ED55E43214C211F82122ED56407FF1A807F2A3", // Media Router Dev "226CF815E39A363090A1E547D53063472B8279FA", // Media Router Release "A321D47A2B4CA86898167A55CA8B2E02385EA7CD" // Brave Shields diff --git a/common/render_messages.h b/common/render_messages.h index 37e13ab4777d..05381a496522 100644 --- a/common/render_messages.h +++ b/common/render_messages.h @@ -10,9 +10,9 @@ #include "ipc/ipc_message_macros.h" // The message starter should be declared in ipc/ipc_message_start.h. Since -// we don't want to patch Chromium, we just pretend to be Content Shell. +// we don't want to patch Chromium, we just pretend to be a frame. -#define IPC_MESSAGE_START ChromeMsgStart +#define IPC_MESSAGE_START FrameMsgStart // Tells the browser that content in the current page was blocked due to the // user's content settings. diff --git a/components/autofill_payments_strings.grdp b/components/autofill_payments_strings.grdp index 55e6c271b185..aad2f2d1df7e 100644 --- a/components/autofill_payments_strings.grdp +++ b/components/autofill_payments_strings.grdp @@ -313,6 +313,9 @@ The CVC is located behind your card. + + After you confirm, card details from your Brave sync chain will be shared with this site. Find the CVC in your Plex Account details. + @@ -505,16 +508,26 @@ Cashback linked - - Don't forget your Brave Pay offer + + Brave Pay offer available - + Got it - - Check out with - - - See details. - + + + Pay with $1Visa - 1234 at checkout + + + Brave Pay offer available + + + + + Pay with %1$sVisa - 1234 at checkout. + + + See details + + diff --git a/components/autofill_strings.grdp b/components/autofill_strings.grdp index a903909a76a9..fa179f2a551f 100644 --- a/components/autofill_strings.grdp +++ b/components/autofill_strings.grdp @@ -65,8 +65,8 @@ Elo - - Brave + + Plex Brave Pay diff --git a/components/brave_ads/browser/ads_service_impl.cc b/components/brave_ads/browser/ads_service_impl.cc index c02aaadcd448..8c967abc47a8 100644 --- a/components/brave_ads/browser/ads_service_impl.cc +++ b/components/brave_ads/browser/ads_service_impl.cc @@ -1958,8 +1958,8 @@ void AdsServiceImpl::RunDBTransaction(ads::DBTransactionPtr transaction, ads::RunDBTransactionCallback callback) { base::PostTaskAndReplyWithResult( file_task_runner_.get(), FROM_HERE, - base::BindOnce(&RunDBTransactionOnFileTaskRunner, - base::Passed(std::move(transaction)), database_.get()), + base::BindOnce(&RunDBTransactionOnFileTaskRunner, std::move(transaction), + database_.get()), base::BindOnce(&AdsServiceImpl::OnRunDBTransaction, AsWeakPtr(), std::move(callback))); } diff --git a/components/brave_ads/browser/buildflags/BUILD.gn b/components/brave_ads/browser/buildflags/BUILD.gn index 8cd13a7a5e81..6755e050a848 100644 --- a/components/brave_ads/browser/buildflags/BUILD.gn +++ b/components/brave_ads/browser/buildflags/BUILD.gn @@ -1,9 +1,7 @@ -import("//build/buildflag_header.gni") import("//brave/components/brave_ads/browser/buildflags/buildflags.gni") +import("//build/buildflag_header.gni") buildflag_header("buildflags") { header = "buildflags.h" - flags = [ - "BRAVE_ADS_ENABLED=$brave_ads_enabled", - ] + flags = [ "BRAVE_ADS_ENABLED=$brave_ads_enabled" ] } diff --git a/components/brave_ads/browser/buildflags/buildflags.gni b/components/brave_ads/browser/buildflags/buildflags.gni index 9fd59d7f1f1d..03c42bef29f3 100644 --- a/components/brave_ads/browser/buildflags/buildflags.gni +++ b/components/brave_ads/browser/buildflags/buildflags.gni @@ -2,5 +2,6 @@ import("//brave/components/brave_rewards/browser/buildflags/buildflags.gni") import("//build/config/features.gni") declare_args() { - brave_ads_enabled = brave_rewards_enabled && (is_mac || is_linux || is_win || is_android) + brave_ads_enabled = + brave_rewards_enabled && (is_mac || is_linux || is_win || is_android) } diff --git a/components/brave_ads/test/BUILD.gn b/components/brave_ads/test/BUILD.gn index 61f1dbf7693f..3371c1d2722e 100644 --- a/components/brave_ads/test/BUILD.gn +++ b/components/brave_ads/test/BUILD.gn @@ -181,6 +181,7 @@ source_set("brave_ads_unit_tests") { "//brave/vendor/bat-native-rapidjson", "//brave/vendor/bat-native-tweetnacl:tweetnacl", "//chrome/browser:browser", + "//chrome/browser/profiles:profile", "//components/prefs:prefs", "//content/test:test_support", ] diff --git a/components/brave_rewards/browser/rewards_service_impl.cc b/components/brave_rewards/browser/rewards_service_impl.cc index 7584b8fd9ba3..2d9f963a33b4 100644 --- a/components/brave_rewards/browser/rewards_service_impl.cc +++ b/components/brave_rewards/browser/rewards_service_impl.cc @@ -3219,14 +3219,11 @@ void RewardsServiceImpl::RunDBTransaction( ledger::client::RunDBTransactionCallback callback) { DCHECK(ledger_database_); base::PostTaskAndReplyWithResult( - file_task_runner_.get(), - FROM_HERE, - base::BindOnce(&RunDBTransactionOnFileTaskRunner, - base::Passed(std::move(transaction)), - ledger_database_.get()), - base::BindOnce(&RewardsServiceImpl::OnRunDBTransaction, - AsWeakPtr(), - std::move(callback))); + file_task_runner_.get(), FROM_HERE, + base::BindOnce(&RunDBTransactionOnFileTaskRunner, std::move(transaction), + ledger_database_.get()), + base::BindOnce(&RewardsServiceImpl::OnRunDBTransaction, AsWeakPtr(), + std::move(callback))); } void RewardsServiceImpl::OnRunDBTransaction( diff --git a/components/brave_rewards/test/BUILD.gn b/components/brave_rewards/test/BUILD.gn index f23946138067..daf6c40f63f3 100644 --- a/components/brave_rewards/test/BUILD.gn +++ b/components/brave_rewards/test/BUILD.gn @@ -30,6 +30,7 @@ source_set("brave_rewards_unit_tests") { "//brave/vendor/bat-native-ledger:publishers_proto", "//brave/vendor/bat-native-rapidjson", "//chrome/browser:browser", + "//chrome/browser/profiles:profile", "//content/test:test_support", "//net:net", "//ui/base:base", diff --git a/components/brave_wallet/brave_wallet_service.cc b/components/brave_wallet/brave_wallet_service.cc index 5aee47d36172..72a83bd35b1f 100644 --- a/components/brave_wallet/brave_wallet_service.cc +++ b/components/brave_wallet/brave_wallet_service.cc @@ -11,6 +11,7 @@ #include "base/base64.h" #include "base/bind.h" #include "base/files/file_util.h" +#include "base/strings/string_util.h" #include "base/strings/stringprintf.h" #include "base/task/post_task.h" #include "base/task_runner_util.h" @@ -32,8 +33,8 @@ #if BUILDFLAG(ENABLE_EXTENSIONS) #include "extensions/browser/extension_prefs.h" #include "extensions/browser/extension_system.h" -#include "extensions/browser/shared_user_script_manager.h" #include "extensions/browser/unloaded_extension_reason.h" +#include "extensions/browser/user_script_manager.h" #endif BraveWalletService::BraveWalletService( @@ -82,8 +83,8 @@ std::string BraveWalletService::GetBitGoSeedFromRootSeed( const std::string& seed) { base::StringPiece salt("brave-bitgo-salt"); base::StringPiece info("bitgo"); - return crypto::HkdfSha256(base::StringPiece(seed.begin(), seed.end()), salt, - info, kSeedByteLength); + return crypto::HkdfSha256(base::MakeStringPiece(seed.begin(), seed.end()), + salt, info, kSeedByteLength); } // Returns 32 bytes of output from HKDF-SHA256. @@ -97,8 +98,8 @@ std::string BraveWalletService::GetEthereumRemoteClientSeedFromRootSeed( const std::string& seed) { base::StringPiece salt("brave-ethwallet-salt"); base::StringPiece info("ethwallet"); - return crypto::HkdfSha256(base::StringPiece(seed.begin(), seed.end()), salt, - info, kSeedByteLength); + return crypto::HkdfSha256(base::MakeStringPiece(seed.begin(), seed.end()), + salt, info, kSeedByteLength); } // static @@ -155,7 +156,7 @@ bool BraveWalletService::SealSeed(const std::string& seed, std::string* cipher_seed) { crypto::Aead aes_256_gcm_siv(crypto::Aead::AES_256_GCM_SIV); aes_256_gcm_siv.Init(&key); - return aes_256_gcm_siv.Seal(base::StringPiece(seed.begin(), seed.end()), + return aes_256_gcm_siv.Seal(base::MakeStringPiece(seed.begin(), seed.end()), nonce, base::StringPiece(""), cipher_seed); } @@ -170,8 +171,9 @@ void BraveWalletService::SaveToPrefs(PrefService* prefs, std::string base64_nonce; std::string base64_cipher_seed; base::Base64Encode(nonce, &base64_nonce); - base::Base64Encode(base::StringPiece(cipher_seed.begin(), cipher_seed.end()), - &base64_cipher_seed); + base::Base64Encode( + base::MakeStringPiece(cipher_seed.begin(), cipher_seed.end()), + &base64_cipher_seed); prefs->SetString(kBraveWalletAES256GCMSivNonce, base64_nonce); prefs->SetString(kBraveWalletEncryptedSeed, base64_cipher_seed); } @@ -261,11 +263,14 @@ std::string BraveWalletService::GetBitGoSeed(std::vector key) { } void BraveWalletService::RemoveUnusedWeb3ProviderContentScripts() { +// We don't use ExtensionRegistryObserver and simply access the private methods +// OnExtensionLoaded()/OnExtensionUnloaded() from UserScriptLoader instead since +// we only want to load/unload the content scripts and not the extension. #if BUILDFLAG(ENABLE_EXTENSIONS) PrefService* prefs = user_prefs::UserPrefs::Get(context_); - auto* shared_user_script_manager = - extensions::ExtensionSystem::Get(context_)->shared_user_script_manager(); - if (!shared_user_script_manager) { + auto* user_script_manager = + extensions::ExtensionSystem::Get(context_)->user_script_manager(); + if (!user_script_manager) { return; } auto* registry = extensions::ExtensionRegistry::Get(context_); @@ -275,13 +280,13 @@ void BraveWalletService::RemoveUnusedWeb3ProviderContentScripts() { auto* erc_extension = registry->enabled_extensions().GetByID( ethereum_remote_client_extension_id); if (erc_extension) { - shared_user_script_manager->OnExtensionUnloaded( + user_script_manager->OnExtensionUnloaded( context_, erc_extension, extensions::UnloadedExtensionReason::DISABLE); } auto* metamask_extension = registry->enabled_extensions().GetByID(metamask_extension_id); if (metamask_extension) { - shared_user_script_manager->OnExtensionUnloaded( + user_script_manager->OnExtensionUnloaded( context_, metamask_extension, extensions::UnloadedExtensionReason::DISABLE); } @@ -294,12 +299,11 @@ void BraveWalletService::RemoveUnusedWeb3ProviderContentScripts() { // 2) Check if CryptoWallets content scripts are enabled, if so, disable them. if (provider == BraveWalletWeb3ProviderTypes::CRYPTO_WALLETS) { if (erc_extension) { - shared_user_script_manager->OnExtensionLoaded(context_, erc_extension); + user_script_manager->OnExtensionLoaded(context_, erc_extension); } } else if (provider != BraveWalletWeb3ProviderTypes::NONE) { if (metamask_extension) { - shared_user_script_manager->OnExtensionLoaded(context_, - metamask_extension); + user_script_manager->OnExtensionLoaded(context_, metamask_extension); } } #endif diff --git a/android/java/res/layout/tile_no_text_view.xml b/components/browser_ui/widget/android/java/res/layout/tile_no_text_view.xml similarity index 100% rename from android/java/res/layout/tile_no_text_view.xml rename to components/browser_ui/widget/android/java/res/layout/tile_no_text_view.xml diff --git a/components/common/locale.ts b/components/common/locale.ts index bca6aadbd7a6..7073d611f56f 100644 --- a/components/common/locale.ts +++ b/components/common/locale.ts @@ -20,7 +20,7 @@ export const getLocale = (key: string, replacements?: Record) => if (replacements) { for (let item in replacements) { - returnVal = returnVal.replace(new RegExp('{{\\s*' + item + '\\s*}}'), replacements[item].toString()) + returnVal = returnVal.replace(new RegExp('\\[\\[\\s*' + item + '\\s*\\]\\]'), replacements[item].toString()) } } diff --git a/components/components_brave_strings.grd b/components/components_brave_strings.grd index f7752c69bc1f..32c41542f19a 100644 --- a/components/components_brave_strings.grd +++ b/components/components_brave_strings.grd @@ -35,6 +35,9 @@ + + + @@ -56,7 +59,6 @@ - @@ -103,6 +105,10 @@ + + + + @@ -187,7 +193,7 @@ - + diff --git a/components/components_strings.grd b/components/components_strings.grd index 00ab7d8f84e0..2c8d84db5edd 100644 --- a/components/components_strings.grd +++ b/components/components_strings.grd @@ -35,6 +35,9 @@ + + + @@ -56,7 +59,6 @@ - @@ -190,6 +192,10 @@ + + + + @@ -274,7 +280,7 @@ - + @@ -324,6 +330,9 @@ + + + diff --git a/components/components_strings_override.grd b/components/components_strings_override.grd index 4fe8da84ac06..cd23f3ed27c9 100644 --- a/components/components_strings_override.grd +++ b/components/components_strings_override.grd @@ -82,7 +82,7 @@ - + @@ -90,6 +90,8 @@ + + diff --git a/components/cosmetic_filters/renderer/cosmetic_filters_js_handler.cc b/components/cosmetic_filters/renderer/cosmetic_filters_js_handler.cc index df4ff092b21b..fdf3c2c00594 100644 --- a/components/cosmetic_filters/renderer/cosmetic_filters_js_handler.cc +++ b/components/cosmetic_filters/renderer/cosmetic_filters_js_handler.cc @@ -192,7 +192,7 @@ CosmeticFiltersJSHandler::CosmeticFiltersJSHandler( isolated_world_id_(isolated_world_id), enabled_1st_party_cf_(false) { if (g_observing_script->empty()) { - *g_observing_script = LoadDataResource(kCosmeticFiltersGenerated[0].value); + *g_observing_script = LoadDataResource(kCosmeticFiltersGenerated[0].id); } EnsureConnected(); } diff --git a/components/greaselion/browser/greaselion_service_impl.cc b/components/greaselion/browser/greaselion_service_impl.cc index 7bf6d53bda5e..a7d7f76be92d 100644 --- a/components/greaselion/browser/greaselion_service_impl.cc +++ b/components/greaselion/browser/greaselion_service_impl.cc @@ -301,10 +301,9 @@ void GreaselionServiceImpl::PostConvert( greaselion_extensions_.push_back(converted_extension->first->id()); extension_dirs_.push_back(std::move(converted_extension->second)); extension_system_->ready().Post( - FROM_HERE, - base::BindOnce(&GreaselionServiceImpl::Install, - weak_factory_.GetWeakPtr(), - base::Passed(&converted_extension->first))); + FROM_HERE, base::BindOnce(&GreaselionServiceImpl::Install, + weak_factory_.GetWeakPtr(), + std::move(converted_extension->first))); } } diff --git a/components/management_strings.grdp b/components/management_strings.grdp index c554ef5ca0fa..9f81b2c9a4bd 100644 --- a/components/management_strings.grdp +++ b/components/management_strings.grdp @@ -176,9 +176,6 @@ Which extensions and plugins you have installed - - <a target="_blank" rel="noopener noreferrer" href="$1"><a target="_blank" href="https://example.com">Safe Browsing</a></a> warnings - Websites you visit and time spent on them diff --git a/components/memories_strings.grdp b/components/memories_strings.grdp new file mode 100644 index 000000000000..b1471958a2f5 --- /dev/null +++ b/components/memories_strings.grdp @@ -0,0 +1,8 @@ + + + + + + Memories + + diff --git a/components/ntp_background_images/browser/ntp_background_images_component_installer.cc b/components/ntp_background_images/browser/ntp_background_images_component_installer.cc index cfba5ff55b54..feb67bf46e0b 100644 --- a/components/ntp_background_images/browser/ntp_background_images_component_installer.cc +++ b/components/ntp_background_images/browser/ntp_background_images_component_installer.cc @@ -57,7 +57,6 @@ class NTPBackgroundImagesComponentInstallerPolicy void GetHash(std::vector* hash) const override; std::string GetName() const override; update_client::InstallerAttributes GetInstallerAttributes() const override; - std::vector GetMimeTypes() const override; private: const std::string component_id_; @@ -135,11 +134,6 @@ NTPBackgroundImagesComponentInstallerPolicy::GetInstallerAttributes() const { return update_client::InstallerAttributes(); } -std::vector - NTPBackgroundImagesComponentInstallerPolicy::GetMimeTypes() const { - return std::vector(); -} - void OnRegistered(const std::string& component_id) { BraveOnDemandUpdater::GetInstance()->OnDemandUpdate(component_id); } diff --git a/components/ntp_snippets_strings.grdp b/components/ntp_snippets_strings.grdp index f60ddee9c656..a348009ce373 100644 --- a/components/ntp_snippets_strings.grdp +++ b/components/ntp_snippets_strings.grdp @@ -2,7 +2,7 @@ - + That’s all for now diff --git a/components/page_info_strings.grdp b/components/page_info_strings.grdp index f55806ff72b4..ce19063f768e 100644 --- a/components/page_info_strings.grdp +++ b/components/page_info_strings.grdp @@ -98,6 +98,49 @@ The identity of this website has not been verified. + + + Your password may be compromised + + + + You just entered your password on a deceptive site. Brave recommends changing your password now. + + + You just entered your password on a deceptive site. Brave recommends checking your saved passwords for $1www.google.com and other sites where you use this password now. + + + You just entered your password on a deceptive site. Brave recommends checking your saved passwords for $1www.google.com, $2www.reddit.com, and other sites where you use this password now. + + + You just entered your password on a deceptive site. Brave recommends checking your saved passwords for $1www.google.com, $2www.reddit.com, $3www.amazon.com, and other sites where you use this password now. + + + + + You just entered your password on a deceptive site. Brave recommends changing your password now. + + + You just entered your password on a deceptive site. Brave recommends checking your saved passwords for $1www.google.com and other sites where you use this password now. + + + You just entered your password on a deceptive site. Brave recommends checking your saved passwords for $1www.google.com, $2www.reddit.com, and other sites where you use this password now. + + + You just entered your password on a deceptive site. Brave recommends checking your saved passwords for $1www.google.com, $2www.reddit.com, $3www.amazon.com, and other sites where you use this password now. + + + + + Check Passwords + + + + + Check passwords + + + @@ -250,7 +293,7 @@ Background Sync - Your presence + Your device use Images @@ -472,16 +515,10 @@ - - Your password may be compromised - You could lose access to your Brave sync chain. Brave recommends changing your password now. You'll be asked to sign in. - - You just entered your password on a deceptive site. Brave recommends changing your password now. - You just entered your password on a deceptive site. Brave recommends going to $1www.google.com and other sites where you use this password and changing it now. @@ -491,15 +528,6 @@ You just entered your password on a deceptive site. Brave recommends going to $1www.google.com, $2www.reddit.com, $3www.amazon.com, and other sites where you use this password and changing it now. - - You just entered your password on a deceptive site. Brave recommends checking your saved passwords for $1www.google.com and other sites where you use this password now. - - - You just entered your password on a deceptive site. Brave recommends checking your saved passwords for $1www.google.com, $2www.reddit.com, and other sites where you use this password now. - - - You just entered your password on a deceptive site. Brave recommends checking your saved passwords for $1www.google.com, $2www.reddit.com, $3www.amazon.com, and other sites where you use this password now. - Brave can help you protect your Brave sync chain and change your password. @@ -517,10 +545,7 @@ You could lose access to your Brave sync chain. Brave recommends changing your password now. You'll be asked to sign in. - - You just entered your password on a deceptive site. Brave recommends changing your password now. - - + You just entered your password on a deceptive site. Brave recommends going to $1www.google.com and other sites where you use this password and changing it now. @@ -529,15 +554,6 @@ You just entered your password on a deceptive site. Brave recommends going to $1www.google.com, $2www.reddit.com, $3www.amazon.com, and other sites where you use this password and changing it now. - - You just entered your password on a deceptive site. Brave recommends checking your saved passwords for $1www.google.com and other sites where you use this password now. - - - You just entered your password on a deceptive site. Brave recommends checking your saved passwords for $1www.google.com, $2www.reddit.com, and other sites where you use this password now. - - - You just entered your password on a deceptive site. Brave recommends checking your saved passwords for $1www.google.com, $2www.reddit.com, $3www.amazon.com, and other sites where you use this password now. - Brave can help you protect your Brave sync chain and change your password. @@ -556,9 +572,6 @@ Change Password - - Check Passwords - Protect Account @@ -570,9 +583,6 @@ Change password - - Check passwords - Protect account diff --git a/components/payments_strings.grdp b/components/payments_strings.grdp index a79e0f67f56d..12112848b338 100644 --- a/components/payments_strings.grdp +++ b/components/payments_strings.grdp @@ -624,9 +624,16 @@ - - Use Touch ID to verify and complete your purchase? - + + + Use Touch ID to verify and complete your purchase? + + + + + Use Windows Hello to verify and complete your purchase? + + Store diff --git a/components/payments_strings_override.grdp b/components/payments_strings_override.grdp index 8f74552318c1..ff3321dd8144 100644 --- a/components/payments_strings_override.grdp +++ b/components/payments_strings_override.grdp @@ -32,4 +32,6 @@ - + + + diff --git a/components/pdf_strings.grdp b/components/pdf_strings.grdp index a27609499020..5c6a96186e35 100644 --- a/components/pdf_strings.grdp +++ b/components/pdf_strings.grdp @@ -86,6 +86,21 @@ Page size: + + $18.5 × $211.00 in ($3portrait) + + + $1210 × $2297 mm ($3portrait) + + + portrait + + + landscape + + + Varies + Fast web view: diff --git a/components/permissions_strings.grdp b/components/permissions_strings.grdp index 9429723139b6..8be74f9aa008 100644 --- a/components/permissions_strings.grdp +++ b/components/permissions_strings.grdp @@ -32,7 +32,7 @@ • Use your camera - $1google.com wants to know when you're present + $1google.com wants to know when you're actively using this device Notifications for $1example.com are blocked @@ -40,6 +40,9 @@ Notifications are automatically blocked for all sites except ones you allow + + Notifications were automatically blocked because you usually don't allow them + $1html5rocks.com wants to use your microphone @@ -121,7 +124,7 @@ This will otherwise be blocked by your privacy settings. This will allow the con Use the fonts on your computer so you can create high-fidelity content - Know when you're present + Know when you're actively using this device Allow @@ -168,7 +171,7 @@ This will otherwise be blocked by your privacy settings. This will allow the con Allow AR? - Share your presence? + Know your device use? diff --git a/components/policy_strings.grdp b/components/policy_strings.grdp index 2076d648e9c9..774daf658f81 100644 --- a/components/policy_strings.grdp +++ b/components/policy_strings.grdp @@ -266,7 +266,7 @@ Additional details: Policy level is not supported. - + OK @@ -289,6 +289,12 @@ Additional details: Reload policies + + Loading policies + + + Policies is loaded + Export to JSON @@ -312,9 +318,6 @@ Additional details: Enrollment domain: - - Display domain: - Enrollment domain: @@ -345,6 +348,9 @@ Additional details: Directory API ID: + + Managed by: + Last fetched: @@ -366,9 +372,18 @@ Additional details: Fetch interval: - + Conflict + + Superseding + + + Value (conflict) + + + Value (superseded) + Error @@ -390,6 +405,9 @@ Additional details: Status: + + Info + Show policies with no value set @@ -506,10 +524,10 @@ Additional details: Warning: This policy was not merged as specified in PolicyDictionaryMultipleSourceMergeList policy because it is not part of the dictionary policies that can be merged. - More than one source is present for the policy, but the values are the same. + This policy is working as intended but the same value is set elsewhere and is superseded by this policy. - More than one source with conflicting values is present for this policy! + This policy is working as intended but a conflicting value is set elsewhere and is overridden by this policy. This policy is deprecated. You should use the $1AllowDinosaurEasterEgg policy instead. @@ -580,7 +598,7 @@ Additional details: - + Pasting from $1corp.google.com to this location is blocked by administrator policy @@ -592,6 +610,18 @@ Additional details: Got it + + Pasting from $1corp.google.com to this location is not recommended by administrator policy + + + Paste anyway + + + Cancel + + + Copying and pasting this content to $1Linux is not recommended by administrator policy + Printing is blocked diff --git a/components/rappor/log_uploader_unittest.cc b/components/rappor/log_uploader_unittest.cc deleted file mode 100644 index 739c82a8482f..000000000000 --- a/components/rappor/log_uploader_unittest.cc +++ /dev/null @@ -1,78 +0,0 @@ -/* Copyright (c) 2019 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 "components/rappor/log_uploader.h" - -#include "base/macros.h" -#include "base/run_loop.h" -#include "base/test/bind.h" -#include "base/test/task_environment.h" -#include "base/threading/thread_task_runner_handle.h" -#include "services/network/public/cpp/shared_url_loader_factory.h" -#include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h" -#include "services/network/test/test_url_loader_factory.h" -#include "testing/gtest/include/gtest/gtest.h" - -namespace rappor { - -namespace { - -const char kTestServerURL[] = "https://www.brave.com/"; -const char kTestMimeType[] = "text/plain"; - -class TestLogUploader : public LogUploader { - public: - explicit TestLogUploader( - scoped_refptr url_loader_factory) - : LogUploader(GURL(kTestServerURL), kTestMimeType, url_loader_factory) { - Start(); - } - - private: - DISALLOW_COPY_AND_ASSIGN(TestLogUploader); -}; - -} // namespace - -class RapporLogUploaderTest : public testing::Test { - public: - RapporLogUploaderTest() - : task_environment_( - base::test::TaskEnvironment::MainThreadType::UI), - test_shared_loader_factory_( - base::MakeRefCounted( - &test_url_loader_factory_)) {} - - protected: - scoped_refptr shared_url_loader_factory() { - return test_shared_loader_factory_; - } - network::TestURLLoaderFactory* test_url_loader_factory() { - return &test_url_loader_factory_; - } - - private: - // Required for base::ThreadTaskRunnerHandle::Get(). - base::test::TaskEnvironment task_environment_; - network::TestURLLoaderFactory test_url_loader_factory_; - scoped_refptr test_shared_loader_factory_; - - DISALLOW_COPY_AND_ASSIGN(RapporLogUploaderTest); -}; - -TEST_F(RapporLogUploaderTest, NoFetch) { - bool network_access_occurred = false; - test_url_loader_factory()->SetInterceptor( - base::BindLambdaForTesting([&](const network::ResourceRequest& request) { - network_access_occurred = true; - })); - TestLogUploader uploader(shared_url_loader_factory()); - - uploader.QueueLog("log1"); - base::RunLoop().RunUntilIdle(); - EXPECT_FALSE(network_access_occurred); -} - -} // namespace rappor diff --git a/components/resources/brave_components_strings.grd b/components/resources/brave_components_strings.grd index c9196cbb1ec2..d69b4761c018 100644 --- a/components/resources/brave_components_strings.grd +++ b/components/resources/brave_components_strings.grd @@ -55,7 +55,6 @@ - @@ -102,6 +101,10 @@ + + + + @@ -325,12 +328,12 @@ This Private Window is more private with Tor Connectivity Tor hides your IP address from the sites you visit, by routing your browsing through several Tor servers before it reaches your destination. Tor can slow down browsing and some sites might not work at all. - Using Private Windows only changes what Brave does on your device — it doesn't change anyone else's behavior. Tor hides your IP address from the sites you visit and makes it somewhat more difficult, but not impossible, for your ISP or employer to see what sites you are visiting. Open a Private Window with Tor from the menu, or with {{ key }}. + Using Private Windows only changes what Brave does on your device — it doesn't change anyone else's behavior. Tor hides your IP address from the sites you visit and makes it somewhat more difficult, but not impossible, for your ISP or employer to see what sites you are visiting. Open a Private Window with Tor from the menu, or with [[ key ]]. Learn more about Tor in Brave Tor Status Connected Disconnected - Initializing {{percentage}}% + Initializing [[percentage]]% Additional Filters @@ -379,7 +382,7 @@ Ads - Earn {{currency}} by viewing Brave Ads. Ads presented are based on your interests, as inferred from your browsing behavior. No personal data or browsing history ever leaves your browser. + Earn [[currency]] by viewing Brave Ads. Ads presented are based on your interests, as inferred from your browsing behavior. No personal data or browsing history ever leaves your browser. Auto-Contribute An automatic way to support publishers and content creators. Set a monthly payment and browse normally. The Brave Verified sites you visit will receive your contributions automatically, based on your attention as measured by Brave. Estimated pending rewards @@ -398,7 +401,7 @@ State level ad targeting This allows Brave to show you ads meant specifically for your state. Learn More - Auto-detected as {{adsSubdivisionTarget}} + Auto-detected as [[adsSubdivisionTarget]] Auto-detect Disable Disabled @@ -472,7 +475,7 @@ Clicked Viewed BAT is not currently supported in your region. Please refer $1here$2 for updates. - By turning on {{title}}, you agree to the $1Terms of Service$2 and $3Privacy Policy$4. + By turning on [[title]], you agree to the $1Terms of Service$2 and $3Privacy Policy$4. Close Error creating Brave Browser BAT card You need a verified wallet to Login @@ -512,7 +515,7 @@ External wallet info Invalid Key info seed: - We show the last {{numberOfLines}} lines of the log. If you want the whole log, you can download it above. + We show the last [[numberOfLines]] lines of the log. If you want the whole log, you can download it above. Rewards internals Persona ID Ads @@ -579,8 +582,8 @@ One Time Tip One time tip amount: Hold on, you can’t tip yet - {{user}}’s post - {{user}}’s tweet + [[user]]’s post + [[user]]’s tweet Sorry to see you go… Support this creator By proceeding, you agree to the $1Terms of Service$2 and $3Privacy Policy$4. @@ -643,7 +646,7 @@ Maximum ads received per hour: All Saved - Ads you've received in the past {{totalDays}} days + Ads you've received in the past [[totalDays]] days Ads History Ads rewards received Mark As Inappropriate @@ -662,7 +665,7 @@ Ads Support your favorite sites just by browsing – or tip a site any time you like. Auto-Contribute - Auto-Contribute {{processor}} + Auto-Contribute [[processor]] Brave Rewards and Privacy Policy @@ -686,7 +689,7 @@ Contribute Auto-Contribute Allocation Copy - You’re currently sending {{currentDonation}} BAT to this site every month. + You’re currently sending [[currentDonation]] BAT to this site every month. Date Deposit Deposits @@ -712,10 +715,10 @@ Total number of sites you excluded from Auto-Contribute: expires on for - {{currency}} not used by the expiration date will be automatically returned to the Brave User Growth Pool. + [[currency]] not used by the expiration date will be automatically returned to the Brave User Growth Pool. Grant Expiration Date Grants - Hello, {{name}}! + Hello, [[name]]! import Include in Auto-Contribute Learn More @@ -752,8 +755,8 @@ Currently no token grant is available. No activities yet… No, thank you - Not enough {{currency}}. - Not enough {{currency}}. Please + Not enough [[currency]]. + Not enough [[currency]]. Please off ok on @@ -786,7 +789,7 @@ Monthly Contributions remove Remove From Saved - You’ve designated {{reservedAmount}} {{currency}} for creators who haven’t yet signed up to receive contributions. Your browser will keep trying to contribute until they verify, or until 90 days have passed. + You’ve designated [[reservedAmount]] [[currency]] for creators who haven’t yet signed up to receive contributions. Your browser will keep trying to contribute until they verify, or until 90 days have passed. Learn more. Reset Restore @@ -827,7 +830,7 @@ Use your recovery key to restore your wallet. Restoring with a recovery key will replace your current wallet. So make sure you empty or back up your current wallet before restoring. Enter your recovery key or - Backup your wallet before replacing. Or you will lose the fund, {{funds}}, in your current wallet. + Backup your wallet before replacing. Or you will lose the fund, [[funds]], in your current wallet. Are you sure you want to reset your Rewards Wallet? Your $15 BAT and other Rewards data will be permanently lost if you reset your wallet. Please ensure you have verified your wallet with $2Uphold so you can keep your BAT. Your Rewards data will be permanently lost if you reset your wallet. @@ -835,8 +838,8 @@ Rewards Summary Save as File Save - See all {{numItems}} items - See all {{numSites}} sites + See all [[numItems]] items + See all [[numSites]] sites Send Tip Send my Tip Settings @@ -912,7 +915,7 @@ Your Reward is on its way to your Brave Rewards wallet. Your Reward Amount It’s your lucky day! - Your {{currency}} grant is on its way. + Your [[currency]] grant is on its way. Free Token Grant Free Point Grant @@ -1002,7 +1005,7 @@ OK Edit Cards - By clicking {{title}}, you agree to the $1Terms of Service$2 and $3Privacy Policy$4. + By clicking [[title]], you agree to the $1Terms of Service$2 and $3Privacy Policy$4. Start using Brave Rewards Brave Together Start a private video call with your friends and colleagues. diff --git a/components/services/ipfs/ipfs_service_impl.h b/components/services/ipfs/ipfs_service_impl.h index 061ee3af9d9a..25682d5ca071 100644 --- a/components/services/ipfs/ipfs_service_impl.h +++ b/components/services/ipfs/ipfs_service_impl.h @@ -9,6 +9,7 @@ #include #include "base/process/process.h" +#include "base/threading/thread.h" #include "brave/components/services/ipfs/public/mojom/ipfs_service.mojom.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/receiver.h" diff --git a/components/services/tor/tor_launcher_impl.h b/components/services/tor/tor_launcher_impl.h index d8f20bc7a6f2..01cff036e6d1 100644 --- a/components/services/tor/tor_launcher_impl.h +++ b/components/services/tor/tor_launcher_impl.h @@ -12,6 +12,7 @@ #include "base/macros.h" #include "base/process/process.h" +#include "base/threading/thread.h" #include "brave/components/services/tor/public/interfaces/tor.mojom.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/receiver.h" diff --git a/components/signin/public/identity_manager/BUILD.gn b/components/signin/public/identity_manager/BUILD.gn new file mode 100644 index 000000000000..3f776a24af6a --- /dev/null +++ b/components/signin/public/identity_manager/BUILD.gn @@ -0,0 +1,30 @@ +# Copyright (c) 2021 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/. + +source_set("unit_tests") { + testonly = true + + sources = [ "brave_identity_manager_unittest.cc" ] + + deps = [ + "//base", + "//base/test:test_support", + "//components/image_fetcher/core:test_support", + "//components/prefs", + "//components/prefs:test_support", + "//components/signin/internal/identity_manager", + "//components/signin/internal/identity_manager:test_support", + "//components/signin/public/base", + "//components/signin/public/base:test_support", + "//components/signin/public/identity_manager", + "//components/signin/public/identity_manager:test_support", + "//components/sync_preferences:test_support", + "//testing/gtest", + ] + + if (is_ios) { + deps += [ "//components/signin/public/identity_manager/ios:test_support" ] + } +} diff --git a/components/signin/public/identity_manager/brave_identity_manager_unittest.cc b/components/signin/public/identity_manager/brave_identity_manager_unittest.cc new file mode 100644 index 000000000000..fa5deebf9ea0 --- /dev/null +++ b/components/signin/public/identity_manager/brave_identity_manager_unittest.cc @@ -0,0 +1,268 @@ +/* Copyright (c) 2021 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/components/signin/public/identity_manager/brave_identity_manager.h" + +#include +#include + +#include "base/command_line.h" +#include "base/files/scoped_temp_dir.h" +#include "base/run_loop.h" +#include "base/test/task_environment.h" +#include "build/build_config.h" +#include "components/image_fetcher/core/fake_image_decoder.h" +#include "components/signin/internal/identity_manager/account_fetcher_service.h" +#include "components/signin/internal/identity_manager/account_tracker_service.h" +#include "components/signin/internal/identity_manager/accounts_cookie_mutator_impl.h" +#include "components/signin/internal/identity_manager/accounts_mutator_impl.h" +#include "components/signin/internal/identity_manager/device_accounts_synchronizer_impl.h" +#include "components/signin/internal/identity_manager/diagnostics_provider_impl.h" +#include "components/signin/internal/identity_manager/fake_profile_oauth2_token_service.h" +#include "components/signin/internal/identity_manager/gaia_cookie_manager_service.h" +#include "components/signin/internal/identity_manager/primary_account_manager.h" +#include "components/signin/internal/identity_manager/primary_account_mutator_impl.h" +#include "components/signin/internal/identity_manager/primary_account_policy_manager_impl.h" +#include "components/signin/public/base/account_consistency_method.h" +#include "components/signin/public/base/list_accounts_test_utils.h" +#include "components/signin/public/base/signin_switches.h" +#include "components/signin/public/base/test_signin_client.h" +#include "components/signin/public/identity_manager/accounts_cookie_mutator.h" +#include "components/signin/public/identity_manager/identity_manager.h" +#include "components/signin/public/identity_manager/test_identity_manager_observer.h" +#include "components/sync_preferences/testing_pref_service_syncable.h" +#include "testing/gtest/include/gtest/gtest.h" + +#if defined(OS_ANDROID) +#include "components/signin/internal/identity_manager/child_account_info_fetcher_android.h" +#endif + +namespace signin { +namespace { + +const char kTestGaiaId[] = "dummyId"; +const char kTestGaiaId2[] = "dummyId2"; +const char kTestEmail[] = "me@gmail.com"; +const char kTestEmail2[] = "me2@gmail.com"; + +} // namespace + +class BraveIdentityManagerTest : public testing::Test { + protected: + BraveIdentityManagerTest() + : signin_client_(&pref_service_, &test_url_loader_factory_) { + IdentityManager::RegisterProfilePrefs(pref_service_.registry()); + IdentityManager::RegisterLocalStatePrefs(pref_service_.registry()); + + RecreateIdentityManager(); + } + + ~BraveIdentityManagerTest() override { signin_client_.Shutdown(); } + + BraveIdentityManagerTest(const BraveIdentityManagerTest&) = delete; + BraveIdentityManagerTest& operator=(const BraveIdentityManagerTest&) = delete; + + void SetUp() override { + primary_account_id_ = + identity_manager_->PickAccountIdForAccount(kTestGaiaId, kTestEmail); + } + + IdentityManager* identity_manager() { return identity_manager_.get(); } + + TestIdentityManagerObserver* identity_manager_observer() { + return identity_manager_observer_.get(); + } + + GaiaCookieManagerService* gaia_cookie_manager_service() { + return gaia_cookie_manager_service_; + } + + // Recreates IdentityManager. This process destroys any existing + // IdentityManager and its dependencies, then remakes them. Dependencies that + // outlive PrimaryAccountManager (e.g. SigninClient) will be reused. + void RecreateIdentityManager() { + // Remove observer first, otherwise IdentityManager destruction might + // trigger a DCHECK because there are still living observers. + identity_manager_observer_.reset(); + identity_manager_.reset(); + + ASSERT_TRUE(temp_profile_dir_.CreateUniqueTempDir()); + + auto account_tracker_service = std::make_unique(); + account_tracker_service->Initialize(&pref_service_, + temp_profile_dir_.GetPath()); + auto token_service = + std::make_unique(&pref_service_); + + auto gaia_cookie_manager_service = + std::make_unique(token_service.get(), + &signin_client_); + gaia_cookie_manager_service_ = gaia_cookie_manager_service.get(); + + auto account_fetcher_service = std::make_unique(); + account_fetcher_service->Initialize( + &signin_client_, token_service.get(), account_tracker_service.get(), + std::make_unique()); + + std::unique_ptr policy_manager; + auto primary_account_manager = std::make_unique( + &signin_client_, token_service.get(), account_tracker_service.get(), + std::move(policy_manager)); + + // Passing this switch ensures that the new PrimaryAccountManager starts + // with a clean slate. Otherwise PrimaryAccountManager::Initialize will use + // the account id stored in prefs::kGoogleServicesAccountId. + base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); + cmd_line->AppendSwitch(switches::kClearTokenService); + + primary_account_manager->Initialize(&pref_service_); + + IdentityManager::InitParameters init_params; + + init_params.accounts_cookie_mutator = + std::make_unique( + &signin_client_, token_service.get(), + gaia_cookie_manager_service.get(), account_tracker_service.get()); + + init_params.diagnostics_provider = + std::make_unique( + token_service.get(), gaia_cookie_manager_service.get()); + + init_params.primary_account_mutator = + std::make_unique( + account_tracker_service.get(), token_service.get(), + primary_account_manager.get(), &pref_service_, + AccountConsistencyMethod::kDisabled); + +#if defined(OS_ANDROID) || defined(OS_IOS) + init_params.device_accounts_synchronizer = + std::make_unique( + token_service->GetDelegate()); +#else + init_params.accounts_mutator = std::make_unique( + token_service.get(), account_tracker_service.get(), + primary_account_manager.get(), &pref_service_); +#endif + + init_params.account_fetcher_service = std::move(account_fetcher_service); + init_params.account_tracker_service = std::move(account_tracker_service); + init_params.gaia_cookie_manager_service = + std::move(gaia_cookie_manager_service); + init_params.primary_account_manager = std::move(primary_account_manager); + init_params.token_service = std::move(token_service); + + identity_manager_.reset(new BraveIdentityManager(std::move(init_params))); + identity_manager_observer_.reset( + new TestIdentityManagerObserver(identity_manager_.get())); + } + + void TriggerListAccounts() { + std::vector signed_in_accounts; + std::vector signed_out_accounts; + bool accounts_are_fresh = gaia_cookie_manager_service()->ListAccounts( + &signed_in_accounts, &signed_out_accounts); + static_cast(accounts_are_fresh); + } + + const CoreAccountId& primary_account_id() const { + return primary_account_id_; + } + + TestSigninClient* signin_client() { return &signin_client_; } + + network::TestURLLoaderFactory* test_url_loader_factory() { + return &test_url_loader_factory_; + } + + private: + base::ScopedTempDir temp_profile_dir_; + base::test::TaskEnvironment task_environment_; + sync_preferences::TestingPrefServiceSyncable pref_service_; + network::TestURLLoaderFactory test_url_loader_factory_; + TestSigninClient signin_client_; + std::unique_ptr identity_manager_; + std::unique_ptr identity_manager_observer_; + CoreAccountId primary_account_id_; + GaiaCookieManagerService* gaia_cookie_manager_service_; +}; + +TEST_F(BraveIdentityManagerTest, GetAccountsInCookieJarWithNoAccounts) { + base::RunLoop run_loop; + identity_manager_observer()->SetOnAccountsInCookieUpdatedCallback( + run_loop.QuitClosure()); + + SetListAccountsResponseNoAccounts(test_url_loader_factory()); + + TriggerListAccounts(); + const AccountsInCookieJarInfo& accounts_in_cookie_jar = + identity_manager()->GetAccountsInCookieJar(); + EXPECT_FALSE(accounts_in_cookie_jar.accounts_are_fresh); + EXPECT_TRUE(accounts_in_cookie_jar.signed_in_accounts.empty()); + EXPECT_TRUE(accounts_in_cookie_jar.signed_out_accounts.empty()); + + run_loop.Run(); + + TriggerListAccounts(); + const AccountsInCookieJarInfo updated_accounts_in_cookie_jar = + identity_manager()->GetAccountsInCookieJar(); + + EXPECT_FALSE(updated_accounts_in_cookie_jar.accounts_are_fresh); + EXPECT_TRUE(updated_accounts_in_cookie_jar.signed_in_accounts.empty()); + EXPECT_TRUE(updated_accounts_in_cookie_jar.signed_out_accounts.empty()); +} + +TEST_F(BraveIdentityManagerTest, GetAccountsInCookieJarWithOneAccount) { + base::RunLoop run_loop; + identity_manager_observer()->SetOnAccountsInCookieUpdatedCallback( + run_loop.QuitClosure()); + + SetListAccountsResponseOneAccount(kTestEmail, kTestGaiaId, + test_url_loader_factory()); + + TriggerListAccounts(); + const AccountsInCookieJarInfo& accounts_in_cookie_jar = + identity_manager()->GetAccountsInCookieJar(); + EXPECT_FALSE(accounts_in_cookie_jar.accounts_are_fresh); + EXPECT_TRUE(accounts_in_cookie_jar.signed_in_accounts.empty()); + EXPECT_TRUE(accounts_in_cookie_jar.signed_out_accounts.empty()); + + run_loop.Run(); + + TriggerListAccounts(); + const AccountsInCookieJarInfo& updated_accounts_in_cookie_jar = + identity_manager()->GetAccountsInCookieJar(); + + EXPECT_FALSE(updated_accounts_in_cookie_jar.accounts_are_fresh); + EXPECT_TRUE(updated_accounts_in_cookie_jar.signed_in_accounts.empty()); + EXPECT_TRUE(updated_accounts_in_cookie_jar.signed_out_accounts.empty()); +} + +TEST_F(BraveIdentityManagerTest, GetAccountsInCookieJarWithTwoAccounts) { + base::RunLoop run_loop; + identity_manager_observer()->SetOnAccountsInCookieUpdatedCallback( + run_loop.QuitClosure()); + + SetListAccountsResponseTwoAccounts(kTestEmail, kTestGaiaId, kTestEmail2, + kTestGaiaId2, test_url_loader_factory()); + + TriggerListAccounts(); + const AccountsInCookieJarInfo& accounts_in_cookie_jar = + identity_manager()->GetAccountsInCookieJar(); + EXPECT_FALSE(accounts_in_cookie_jar.accounts_are_fresh); + EXPECT_TRUE(accounts_in_cookie_jar.signed_in_accounts.empty()); + EXPECT_TRUE(accounts_in_cookie_jar.signed_out_accounts.empty()); + + run_loop.Run(); + + TriggerListAccounts(); + const AccountsInCookieJarInfo& updated_accounts_in_cookie_jar = + identity_manager()->GetAccountsInCookieJar(); + + EXPECT_FALSE(updated_accounts_in_cookie_jar.accounts_are_fresh); + EXPECT_TRUE(updated_accounts_in_cookie_jar.signed_in_accounts.empty()); + EXPECT_TRUE(updated_accounts_in_cookie_jar.signed_out_accounts.empty()); +} + +} // namespace signin diff --git a/components/sms_strings.grdp b/components/sms_strings.grdp index 28e04bd70692..2348c2ad9af7 100644 --- a/components/sms_strings.grdp +++ b/components/sms_strings.grdp @@ -9,6 +9,10 @@ $1123 is your code for $2example.com + + $1123 is your code for $3iframe.com to continue on $2example.com + + Verify diff --git a/components/speedreader/speedreader_url_loader.cc b/components/speedreader/speedreader_url_loader.cc index f94be88f1e76..971416e43764 100644 --- a/components/speedreader/speedreader_url_loader.cc +++ b/components/speedreader/speedreader_url_loader.cc @@ -291,7 +291,7 @@ void SpeedReaderURLLoader::CompleteLoading(std::string body) { throttle_->Resume(); mojo::ScopedDataPipeConsumerHandle body_to_send; MojoResult result = - mojo::CreateDataPipe(nullptr, &body_producer_handle_, &body_to_send); + mojo::CreateDataPipe(nullptr, body_producer_handle_, body_to_send); if (result != MOJO_RESULT_OK) { Abort(); return; diff --git a/components/speedreader/speedreader_url_loader.h b/components/speedreader/speedreader_url_loader.h index efdf3ec87142..4d38625186e0 100644 --- a/components/speedreader/speedreader_url_loader.h +++ b/components/speedreader/speedreader_url_loader.h @@ -14,7 +14,6 @@ #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" #include "base/strings/string_piece.h" -#include "mojo/public/cpp/bindings/binding.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/pending_remote.h" #include "mojo/public/cpp/bindings/receiver.h" diff --git a/components/sync/driver/brave_sync_profile_sync_service_unittest.cc b/components/sync/driver/brave_sync_profile_sync_service_unittest.cc index ccf5d29b73a6..074e94f49e25 100644 --- a/components/sync/driver/brave_sync_profile_sync_service_unittest.cc +++ b/components/sync/driver/brave_sync_profile_sync_service_unittest.cc @@ -10,18 +10,17 @@ #include "brave/components/sync/driver/brave_sync_profile_sync_service.h" #include "brave/components/sync/driver/profile_sync_service_delegate.h" #include "components/os_crypt/os_crypt_mocker.h" -#include "components/sync/driver/data_type_manager_mock.h" +#include "components/sync/driver/data_type_manager_impl.h" #include "components/sync/driver/fake_data_type_controller.h" +#include "components/sync/driver/fake_sync_api_component_factory.h" #include "components/sync/driver/profile_sync_service_bundle.h" -#include "components/sync/driver/sync_api_component_factory_mock.h" #include "components/sync/test/engine/fake_sync_engine.h" -#include "components/sync/test/engine/mock_sync_engine.h" +#include "components/sync/test/engine/fake_sync_manager.h" #include "content/public/test/browser_task_environment.h" #include "testing/gtest/include/gtest/gtest.h" using testing::_; using testing::ByMove; -using testing::NiceMock; using testing::Return; namespace syncer { @@ -75,32 +74,20 @@ class BraveProfileSyncServiceTest : public testing::Test { std::make_unique()); } - MockSyncEngine* SetUpMockSyncEngine() { - auto sync_engine = std::make_unique>(); - MockSyncEngine* sync_engine_raw = sync_engine.get(); - ON_CALL(*component_factory(), CreateSyncEngine(_, _, _, _)) - .WillByDefault(Return(ByMove(std::move(sync_engine)))); - return sync_engine_raw; - } - - FakeSyncEngine* SetUpFakeSyncEngine() { - auto sync_engine = std::make_unique(); - FakeSyncEngine* sync_engine_raw = sync_engine.get(); - ON_CALL(*component_factory(), CreateSyncEngine(_, _, _, _)) - .WillByDefault(Return(ByMove(std::move(sync_engine)))); - return sync_engine_raw; - } - brave_sync::Prefs* brave_sync_prefs() { return &brave_sync_prefs_; } SyncPrefs* sync_prefs() { return &sync_prefs_; } BraveProfileSyncService* brave_sync_service() { return sync_service_.get(); } - SyncApiComponentFactoryMock* component_factory() { + FakeSyncApiComponentFactory* component_factory() { return profile_sync_service_bundle_.component_factory(); } + FakeSyncEngine* engine() { + return component_factory()->last_created_engine(); + } + private: content::BrowserTaskEnvironment task_environment_; ProfileSyncServiceBundle profile_sync_service_bundle_; @@ -113,9 +100,9 @@ TEST_F(BraveProfileSyncServiceTest, ValidPassphrase) { OSCryptMocker::SetUp(); CreateSyncService(ProfileSyncService::MANUAL_START); - SetUpFakeSyncEngine(); brave_sync_service()->Initialize(); + EXPECT_FALSE(engine()); bool set_code_result = brave_sync_service()->SetSyncCode(kValidSyncCode); EXPECT_TRUE(set_code_result); @@ -129,9 +116,9 @@ TEST_F(BraveProfileSyncServiceTest, InvalidPassphrase) { OSCryptMocker::SetUp(); CreateSyncService(ProfileSyncService::MANUAL_START); - SetUpFakeSyncEngine(); brave_sync_service()->Initialize(); + EXPECT_FALSE(engine()); bool set_code_result = brave_sync_service()->SetSyncCode("word one and then two"); @@ -146,9 +133,9 @@ TEST_F(BraveProfileSyncServiceTest, ValidPassphraseLeadingTrailingWhitespace) { OSCryptMocker::SetUp(); CreateSyncService(ProfileSyncService::MANUAL_START); - SetUpFakeSyncEngine(); brave_sync_service()->Initialize(); + EXPECT_FALSE(engine()); std::string sync_code_extra_whitespace = std::string(" \t\n") + kValidSyncCode + std::string(" \t\n"); @@ -161,39 +148,4 @@ TEST_F(BraveProfileSyncServiceTest, ValidPassphraseLeadingTrailingWhitespace) { OSCryptMocker::TearDown(); } -TEST_F(BraveProfileSyncServiceTest, NoIdentityManagerCalls) { - OSCryptMocker::SetUp(); - - CreateSyncService(ProfileSyncService::MANUAL_START); - MockSyncEngine* sync_engine = SetUpMockSyncEngine(); - - brave_sync_service()->Initialize(); - - bool set_code_result = brave_sync_service()->SetSyncCode(kValidSyncCode); - EXPECT_TRUE(set_code_result); - - EXPECT_EQ(brave_sync_prefs()->GetSeed(), kValidSyncCode); - - ON_CALL(*sync_engine, IsInitialized()).WillByDefault(Return(true)); - - // We need to test that during `ProfileSyncService::OnEngineInitialized` - // the stubbed call identity_manager_->GetAccountsInCookieJar() is invoked. - // We can do it indirectly. The stubbed method returns result where - // `accounts_in_cookie_jar_info.accounts_are_fresh` is set to `false`, - // this makes following sequence of calls: - // `ProfileSyncService::OnAccountsInCookieUpdated`, - // `ProfileSyncService::OnAccountsInCookieUpdatedWithCallback`, - // `engine_->OnCookieJarChanged` - // will not be invoked. - // So the indirect way to ensure is to see there is no call of - // `SyncEngine::OnCookieJarChanged` - - EXPECT_CALL(*sync_engine, OnCookieJarChanged(_, _)).Times(0); - brave_sync_service()->OnEngineInitialized( - ModelTypeSet(BOOKMARKS), WeakHandle(), - WeakHandle(), "", "", true); - - OSCryptMocker::TearDown(); -} - } // namespace syncer diff --git a/components/sync/engine_impl/BUILD.gn b/components/sync/engine/BUILD.gn similarity index 84% rename from components/sync/engine_impl/BUILD.gn rename to components/sync/engine/BUILD.gn index 1fb35ca8188a..b629b113ee9d 100644 --- a/components/sync/engine_impl/BUILD.gn +++ b/components/sync/engine/BUILD.gn @@ -6,9 +6,8 @@ source_set("unit_tests") { testonly = true - sources = [ - "//brave/components/sync/engine_impl/brave_model_type_worker_unittest.cc", - ] + sources = + [ "//brave/components/sync/engine/brave_model_type_worker_unittest.cc" ] deps = [ "//base", diff --git a/components/sync/engine_impl/brave_model_type_worker.cc b/components/sync/engine/brave_model_type_worker.cc similarity index 98% rename from components/sync/engine_impl/brave_model_type_worker.cc rename to components/sync/engine/brave_model_type_worker.cc index bb8e2cd630f5..2a5311846278 100644 --- a/components/sync/engine_impl/brave_model_type_worker.cc +++ b/components/sync/engine/brave_model_type_worker.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 http://mozilla.org/MPL/2.0/. */ -#include "brave/components/sync/engine_impl/brave_model_type_worker.h" +#include "brave/components/sync/engine/brave_model_type_worker.h" #include diff --git a/components/sync/engine_impl/brave_model_type_worker.h b/components/sync/engine/brave_model_type_worker.h similarity index 90% rename from components/sync/engine_impl/brave_model_type_worker.h rename to components/sync/engine/brave_model_type_worker.h index 6931ab3eee3e..9c2b35f7ea26 100644 --- a/components/sync/engine_impl/brave_model_type_worker.h +++ b/components/sync/engine/brave_model_type_worker.h @@ -3,8 +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/. */ -#ifndef BRAVE_COMPONENTS_SYNC_ENGINE_IMPL_BRAVE_MODEL_TYPE_WORKER_H_ -#define BRAVE_COMPONENTS_SYNC_ENGINE_IMPL_BRAVE_MODEL_TYPE_WORKER_H_ +#ifndef BRAVE_COMPONENTS_SYNC_ENGINE_BRAVE_MODEL_TYPE_WORKER_H_ +#define BRAVE_COMPONENTS_SYNC_ENGINE_BRAVE_MODEL_TYPE_WORKER_H_ #include @@ -12,7 +12,7 @@ #include "components/sync/base/model_type.h" #include "components/sync/base/passphrase_enums.h" #include "components/sync/engine/commit_and_get_updates_types.h" -#include "components/sync/engine_impl/model_type_worker.h" +#include "components/sync/engine/model_type_worker.h" namespace syncer { @@ -69,4 +69,4 @@ class BraveModelTypeWorker : public ModelTypeWorker { } // namespace syncer -#endif // BRAVE_COMPONENTS_SYNC_ENGINE_IMPL_BRAVE_MODEL_TYPE_WORKER_H_ +#endif // BRAVE_COMPONENTS_SYNC_ENGINE_BRAVE_MODEL_TYPE_WORKER_H_ diff --git a/components/sync/engine_impl/brave_model_type_worker_unittest.cc b/components/sync/engine/brave_model_type_worker_unittest.cc similarity index 98% rename from components/sync/engine_impl/brave_model_type_worker_unittest.cc rename to components/sync/engine/brave_model_type_worker_unittest.cc index 8f969f113850..30f9370f41f9 100644 --- a/components/sync/engine_impl/brave_model_type_worker_unittest.cc +++ b/components/sync/engine/brave_model_type_worker_unittest.cc @@ -3,14 +3,14 @@ * 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/components/sync/engine_impl/brave_model_type_worker.h" +#include "brave/components/sync/engine/brave_model_type_worker.h" #include #include "base/bind.h" #include "base/test/scoped_feature_list.h" #include "base/time/time_override.h" -#include "components/sync/engine_impl/cancelation_signal.h" +#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/mock_model_type_processor.h" diff --git a/components/sync/engine_impl/brave_sync_manager_impl.cc b/components/sync/engine/brave_sync_manager_impl.cc similarity index 86% rename from components/sync/engine_impl/brave_sync_manager_impl.cc rename to components/sync/engine/brave_sync_manager_impl.cc index 9263a7814c07..0cdde777af1f 100644 --- a/components/sync/engine_impl/brave_sync_manager_impl.cc +++ b/components/sync/engine/brave_sync_manager_impl.cc @@ -3,14 +3,14 @@ * 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/components/sync/engine_impl/brave_sync_manager_impl.h" +#include "brave/components/sync/engine/brave_sync_manager_impl.h" namespace syncer { BraveSyncManagerImpl::BraveSyncManagerImpl( const std::string& name, network::NetworkConnectionTracker* network_connection_tracker) - : SyncManagerImpl(name, network_connection_tracker) {} + : SyncManagerImpl(name, network_connection_tracker) {} BraveSyncManagerImpl::~BraveSyncManagerImpl() {} diff --git a/components/sync/engine_impl/brave_sync_manager_impl.h b/components/sync/engine/brave_sync_manager_impl.h similarity index 71% rename from components/sync/engine_impl/brave_sync_manager_impl.h rename to components/sync/engine/brave_sync_manager_impl.h index 957cccc422a8..45b69329b60b 100644 --- a/components/sync/engine_impl/brave_sync_manager_impl.h +++ b/components/sync/engine/brave_sync_manager_impl.h @@ -3,12 +3,12 @@ * 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_COMPONENTS_SYNC_ENGINE_IMPL_BRAVE_SYNC_MANAGER_IMPL_H_ -#define BRAVE_COMPONENTS_SYNC_ENGINE_IMPL_BRAVE_SYNC_MANAGER_IMPL_H_ +#ifndef BRAVE_COMPONENTS_SYNC_ENGINE_BRAVE_SYNC_MANAGER_IMPL_H_ +#define BRAVE_COMPONENTS_SYNC_ENGINE_BRAVE_SYNC_MANAGER_IMPL_H_ #include -#include "components/sync/engine_impl/sync_manager_impl.h" +#include "components/sync/engine/sync_manager_impl.h" namespace syncer { @@ -27,4 +27,4 @@ class BraveSyncManagerImpl : public SyncManagerImpl { } // namespace syncer -#endif // BRAVE_COMPONENTS_SYNC_ENGINE_IMPL_BRAVE_SYNC_MANAGER_IMPL_H_ +#endif // BRAVE_COMPONENTS_SYNC_ENGINE_BRAVE_SYNC_MANAGER_IMPL_H_ diff --git a/components/sync/sources.gni b/components/sync/sources.gni index 3b47a5f654f1..66d5f2073404 100644 --- a/components/sync/sources.gni +++ b/components/sync/sources.gni @@ -4,8 +4,8 @@ # You can obtain one at http://mozilla.org/MPL/2.0/. brave_components_sync_sources = [ - "//brave/components/sync/engine_impl/brave_model_type_worker.cc", - "//brave/components/sync/engine_impl/brave_model_type_worker.h", - "//brave/components/sync/engine_impl/brave_sync_manager_impl.cc", - "//brave/components/sync/engine_impl/brave_sync_manager_impl.h", + "//brave/components/sync/engine/brave_model_type_worker.cc", + "//brave/components/sync/engine/brave_model_type_worker.h", + "//brave/components/sync/engine/brave_sync_manager_impl.cc", + "//brave/components/sync/engine/brave_sync_manager_impl.h", ] diff --git a/components/translate_strings.grdp b/components/translate_strings.grdp index c50a08f7dd88..27fbb3610c27 100644 --- a/components/translate_strings.grdp +++ b/components/translate_strings.grdp @@ -114,9 +114,12 @@ Undo - - + + Unknown + + Detected Language + diff --git a/content/browser/webui/brave_shared_resources_data_source.cc b/content/browser/webui/brave_shared_resources_data_source.cc index 1b89d6a7a73e..9534e9d3e166 100644 --- a/content/browser/webui/brave_shared_resources_data_source.cc +++ b/content/browser/webui/brave_shared_resources_data_source.cc @@ -38,18 +38,6 @@ namespace { using ResourcesMap = std::unordered_map; -const std::map CreatePathPrefixAliasesMap() { - // Map of GRD-relative path prefixes to incoming request path, e.g. - // brave://brave-resources/blah/X could be mapped to - // GRD:../../resources/web/blah/X. - // See chromium's SharedResourcesDataSource for an example - // Format is {"../../somewhere/in/src/tree/", "request/path" } - std::map aliases = { - {"@out_folder@/gen/brave/ui/webui/resources/", ""}, - }; - return aliases; -} - void AddResource(const std::string& path, int resource_id, ResourcesMap* resources_map) { @@ -58,22 +46,9 @@ void AddResource(const std::string& path, } void AddResourcesToMap(ResourcesMap* resources_map) { - const std::map aliases = - CreatePathPrefixAliasesMap(); - for (size_t i = 0; i < kBraveWebuiResourcesSize; ++i) { const auto& resource = kBraveWebuiResources[i]; - - AddResource(resource.name, resource.value, resources_map); - - for (auto it = aliases.begin(); it != aliases.end(); ++it) { - if (base::StartsWith(resource.name, it->first, - base::CompareCase::SENSITIVE)) { - std::string resource_name(resource.name); - AddResource(it->second + resource_name.substr(it->first.length()), - resource.value, resources_map); - } - } + AddResource(resource.path, resource.id, resources_map); } } diff --git a/ios/browser/metrics/BUILD.gn b/ios/browser/metrics/BUILD.gn index 740335408ab4..29b8143f9e97 100644 --- a/ios/browser/metrics/BUILD.gn +++ b/ios/browser/metrics/BUILD.gn @@ -16,9 +16,8 @@ source_set("metrics") { deps = [ "//base", - "//ios/chrome/browser/metrics", "//components/metrics", "//components/prefs", - "//components/rappor", + "//ios/chrome/browser/metrics", ] } diff --git a/ios/browser/metrics/ios_brave_metrics_services_manager_client.h b/ios/browser/metrics/ios_brave_metrics_services_manager_client.h index b3c62b7c1352..ab3e9de523d0 100644 --- a/ios/browser/metrics/ios_brave_metrics_services_manager_client.h +++ b/ios/browser/metrics/ios_brave_metrics_services_manager_client.h @@ -27,7 +27,6 @@ class IOSBraveMetricsServicesManagerClient private: // metrics_services_manager::MetricsServicesManagerClient: - std::unique_ptr CreateRapporServiceImpl() override; std::unique_ptr CreateMetricsServiceClient() override; bool IsMetricsReportingEnabled() override; diff --git a/ios/browser/metrics/ios_brave_metrics_services_manager_client.mm b/ios/browser/metrics/ios_brave_metrics_services_manager_client.mm index 3cedfa5bc806..cc521e9865e7 100644 --- a/ios/browser/metrics/ios_brave_metrics_services_manager_client.mm +++ b/ios/browser/metrics/ios_brave_metrics_services_manager_client.mm @@ -7,7 +7,6 @@ #include "components/metrics/metrics_service_client.h" #include "components/prefs/pref_service.h" -#include "components/rappor/rappor_service_impl.h" #if !defined(__has_feature) || !__has_feature(objc_arc) #error "This file requires ARC support." @@ -20,11 +19,6 @@ IOSBraveMetricsServicesManagerClient:: ~IOSBraveMetricsServicesManagerClient() = default; -std::unique_ptr -IOSBraveMetricsServicesManagerClient::CreateRapporServiceImpl() { - return nullptr; -} - std::unique_ptr IOSBraveMetricsServicesManagerClient::CreateMetricsServiceClient() { return nullptr; diff --git a/patches/base-BUILD.gn.patch b/patches/base-BUILD.gn.patch index 965cc342f23e..faa679c3f30f 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 21e4ee1d3efb4745e224d637b062d837866863fe..df2b1cce18fb483fcd6a4c36cef58421dbc423bd 100644 +index 70911a2154988e11678db1f7ac03c8437d148fe3..10dd1cbf1eb14bbe105daa1196fdab21abd04bf4 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn -@@ -3792,6 +3792,7 @@ if (is_android) { +@@ -3886,6 +3886,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-threading-thread_restrictions.h.patch b/patches/base-threading-thread_restrictions.h.patch index 28acb6441907..a602b55d0dba 100644 --- a/patches/base-threading-thread_restrictions.h.patch +++ b/patches/base-threading-thread_restrictions.h.patch @@ -1,8 +1,8 @@ diff --git a/base/threading/thread_restrictions.h b/base/threading/thread_restrictions.h -index c0cc548d9f8e5156b27818a6c19ea7769b376a14..726d694fc71de2f8675904565de99732eaf820e8 100644 +index ce16488c6d3c377dee372d01c715bd70c8e4a1dc..b8eed94e05d8702a51cfe981cf861a1d189d8273 100644 --- a/base/threading/thread_restrictions.h +++ b/base/threading/thread_restrictions.h -@@ -450,6 +450,7 @@ INLINE_IF_DCHECK_IS_OFF void DisallowBaseSyncPrimitives() +@@ -452,6 +452,7 @@ INLINE_IF_DCHECK_IS_OFF void DisallowBaseSyncPrimitives() EMPTY_BODY_IF_DCHECK_IS_OFF; class BASE_EXPORT ScopedAllowBaseSyncPrimitives { diff --git a/patches/build-android-gyp-util-resource_utils.py.patch b/patches/build-android-gyp-util-resource_utils.py.patch index 48022bd0bde8..b9bd622268af 100644 --- a/patches/build-android-gyp-util-resource_utils.py.patch +++ b/patches/build-android-gyp-util-resource_utils.py.patch @@ -1,5 +1,5 @@ diff --git a/build/android/gyp/util/resource_utils.py b/build/android/gyp/util/resource_utils.py -index 7b83981c32a00f9a86e9b40b6a91a5d9cea44404..46d022cdf9487a5e1f1caa774cea27f37a51f33f 100644 +index d8015326691d9338c7100ebfcea770ffe48b62cb..ff3a3c52d1671d04b9dc3f25c89daf52d84d5f69 100644 --- a/build/android/gyp/util/resource_utils.py +++ b/build/android/gyp/util/resource_utils.py @@ -257,6 +257,7 @@ class ResourceInfoFile(object): diff --git a/patches/build-config-BUILDCONFIG.gn.patch b/patches/build-config-BUILDCONFIG.gn.patch index a5d092329c62..4b3e82868af3 100644 --- a/patches/build-config-BUILDCONFIG.gn.patch +++ b/patches/build-config-BUILDCONFIG.gn.patch @@ -1,8 +1,8 @@ diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn -index 1cff821865f06fec2efa37bf68781af94a4127e7..aa2c054f8e9cfbb83cdd1e77484e7e92310a493d 100644 +index fa375deef6c851867efdd8e9d6a79261b1256774..5366c53bb34964e452e244b42e8bd29c64d96230 100644 --- a/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn -@@ -323,6 +323,7 @@ is_posix = !is_win && !is_fuchsia +@@ -312,6 +312,7 @@ is_posix = !is_win && !is_fuchsia # Holds all configs used for running the compiler. default_compiler_configs = [ diff --git a/patches/build-config-android-config.gni.patch b/patches/build-config-android-config.gni.patch index 114fd2beb7d7..11978961ff0b 100644 --- a/patches/build-config-android-config.gni.patch +++ b/patches/build-config-android-config.gni.patch @@ -1,9 +1,9 @@ diff --git a/build/config/android/config.gni b/build/config/android/config.gni -index 41b32719c2cf0bfc72a7416670f7eb3066a4dfce..cbecbb866f0ead369c2930268779d42e3ec0d100 100644 +index 0584179abfef1cb215e7a2c93f431d3cb0df8051..6e5b56e2ed6216622c05d16164855afd34a81eff 100644 --- a/build/config/android/config.gni +++ b/build/config/android/config.gni -@@ -7,6 +7,7 @@ - import("//build/config/chromeos/ui_mode.gni") +@@ -3,6 +3,7 @@ + # found in the LICENSE file. # This file contains common system config stuff for the Android build. +import("//brave/build/android/config.gni") diff --git a/patches/build-config-android-internal_rules.gni.patch b/patches/build-config-android-internal_rules.gni.patch index f4c24202e30e..f5cbcd3b227d 100644 --- a/patches/build-config-android-internal_rules.gni.patch +++ b/patches/build-config-android-internal_rules.gni.patch @@ -1,8 +1,8 @@ diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni -index b833e1173d839152562651fe5fc3d760a31064be..b254dd1aaebc8bad01eb60f643055a3abfae8e98 100644 +index 39499e94d3bd428a07fb4676667e93fcea175853..477590f704ba8e6f23eca10be03b816fda96fe9c 100644 --- a/build/config/android/internal_rules.gni +++ b/build/config/android/internal_rules.gni -@@ -2058,6 +2058,7 @@ if (enable_java_templates) { +@@ -1921,6 +1921,7 @@ if (enable_java_templates) { _deps = [ ":$_desugar_target" ] _previous_output_jar = _desugar_output_jar } diff --git a/patches/build-config-android-rules.gni.patch b/patches/build-config-android-rules.gni.patch index c27d4b0ee81d..cd1c1b28186a 100644 --- a/patches/build-config-android-rules.gni.patch +++ b/patches/build-config-android-rules.gni.patch @@ -1,5 +1,5 @@ diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni -index 784e39ee221e0014967b90ae6cb8dea5112afcf9..a95fc5b508ea26f75d4d8ec0b7ec1a037a9887e4 100644 +index 2b2adf64a06d87b060ee6c6d34ce68185a3fb9c6..4cc7a930f067f2042c60e9148dd100409224f99e 100644 --- a/build/config/android/rules.gni +++ b/build/config/android/rules.gni @@ -476,6 +476,7 @@ if (enable_java_templates) { @@ -16,5 +16,5 @@ index 784e39ee221e0014967b90ae6cb8dea5112afcf9..a95fc5b508ea26f75d4d8ec0b7ec1a03 template("jinja_template") { + if (defined(invoker.includes)) { invoker.includes += brave_android_manifest_includes } else { invoker.includes = brave_android_manifest_includes } action_with_pydeps(target_name) { - # TODO(crbug.com/1112471): Get this to run cleanly under Python 3. - run_under_python2 = true + forward_variables_from(invoker, TESTONLY_AND_VISIBILITY + [ "deps" ]) + inputs = [ invoker.input ] diff --git a/patches/build-config-compiler-BUILD.gn.patch b/patches/build-config-compiler-BUILD.gn.patch index 86aca04cc52e..4c68663dd8d3 100644 --- a/patches/build-config-compiler-BUILD.gn.patch +++ b/patches/build-config-compiler-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn -index 5928c561b5a367486f1d32c49c95699ace8ae4f8..c4306bb5714b343b0aa267df71c98aee4c8883e3 100644 +index 266b74b3b50ad0e94d9ea814e3f7af6f721eb67b..c91756ed92d3c52ac5a608d1162f6180ab9838ac 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn -@@ -1659,6 +1659,7 @@ config("chromium_code") { +@@ -1704,6 +1704,7 @@ config("chromium_code") { cflags += [ "-Wextra-semi" ] } } diff --git a/patches/build-toolchain-win-BUILD.gn.patch b/patches/build-toolchain-win-BUILD.gn.patch deleted file mode 100644 index 922d943d49fa..000000000000 --- a/patches/build-toolchain-win-BUILD.gn.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/build/toolchain/win/BUILD.gn b/build/toolchain/win/BUILD.gn -index be0893059aa8adc8ca0147b68466203c5e29fe85..9662054dce89e86ccb0e4bba6f012a6b76cabca6 100644 ---- a/build/toolchain/win/BUILD.gn -+++ b/build/toolchain/win/BUILD.gn -@@ -221,6 +221,7 @@ template("msvc_toolchain") { - outputs = [ "$object_subdir/{{source_name_part}}.obj" ] - - command = "$coverage_wrapper$env_wrapper$cl /nologo $show_includes $sys_include_flags{{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} /c {{source}} /Fo{{output}} /Fd\"$pdbname\"" -+ if (toolchain_args.is_clang) { command = "$coverage_wrapper$env_wrapper$cl /nologo $show_includes @../../include_imsvc {{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} /c {{source}} /Fo{{output}} /Fd\"$pdbname\"" } - } - - tool("rc") { diff --git a/patches/build-toolchain-win-setup_toolchain.py.patch b/patches/build-toolchain-win-setup_toolchain.py.patch deleted file mode 100644 index 1956e8b933ee..000000000000 --- a/patches/build-toolchain-win-setup_toolchain.py.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/build/toolchain/win/setup_toolchain.py b/build/toolchain/win/setup_toolchain.py -index 47309866ca790e6753d20cdd097cce9ee2b3f57b..99e676117f6f60ef06fb84162ecea7d0efdf614b 100644 ---- a/build/toolchain/win/setup_toolchain.py -+++ b/build/toolchain/win/setup_toolchain.py -@@ -277,6 +277,7 @@ def main(): - return s if re.match(r'^[a-zA-Z0-9._/\\:-]*$', s) else '"' + s + '"' - include_I = ' '.join([q('/I' + i) for i in include]) - include_imsvc = ' '.join([q('-imsvc' + i) for i in include]) -+ open(os.path.abspath(os.path.join(SCRIPT_DIR, '..', '..', '..', "include_imsvc")), "w").writelines([(q('-imsvc' + i) + '\n') for i in include]) - libpath_flags = ' '.join([q('-libpath:' + i) for i in lib]) - - if (environment_block_name != ''): diff --git a/patches/chrome-BUILD.gn.patch b/patches/chrome-BUILD.gn.patch index b5a59bef320f..dd4ab9f224d1 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 c28309a07dd643523e4a6d52bf90a9291a521399..1ec8e01842d71078f12c0783c59f41bcd3c134b8 100644 +index 6f386508b11746fb9d313b51642e3450bfdf2ef5..cd60c40ffe63f70e481641938c3b584da75e2bf2 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -166,6 +166,7 @@ if (!is_android && !is_mac) { +@@ -168,6 +168,7 @@ if (!is_android && !is_mac) { "common/crash_keys.cc", "common/crash_keys.h", ] @@ -10,7 +10,7 @@ index c28309a07dd643523e4a6d52bf90a9291a521399..1ec8e01842d71078f12c0783c59f41bc deps += [ ":chrome_dll", -@@ -433,11 +434,12 @@ if (is_win) { +@@ -437,11 +438,12 @@ if (is_win) { args += [ "--keystone=0" ] } } @@ -24,7 +24,7 @@ index c28309a07dd643523e4a6d52bf90a9291a521399..1ec8e01842d71078f12c0783c59f41bc extra_substitutions = [ "CHROMIUM_BUNDLE_ID=$chrome_mac_bundle_id", "CHROMIUM_SHORT_NAME=$chrome_product_short_name", -@@ -455,6 +457,7 @@ if (is_win) { +@@ -459,6 +461,7 @@ if (is_win) { "//chrome/common:buildflags", "//chrome/common:version_header", ] @@ -32,7 +32,7 @@ index c28309a07dd643523e4a6d52bf90a9291a521399..1ec8e01842d71078f12c0783c59f41bc if (enable_stripping) { # At link time, preserve the global symbols specified in the .exports -@@ -521,7 +524,7 @@ if (is_win) { +@@ -525,7 +528,7 @@ if (is_win) { args = [ "-b", @@ -41,7 +41,7 @@ index c28309a07dd643523e4a6d52bf90a9291a521399..1ec8e01842d71078f12c0783c59f41bc "-v", chrome_version_full, "-g", -@@ -590,6 +593,7 @@ if (is_win) { +@@ -594,6 +597,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 c28309a07dd643523e4a6d52bf90a9291a521399..1ec8e01842d71078f12c0783c59f41bc } } -@@ -622,9 +626,11 @@ if (is_win) { +@@ -626,9 +630,11 @@ if (is_win) { "--scm=0", ] } @@ -61,7 +61,7 @@ index c28309a07dd643523e4a6d52bf90a9291a521399..1ec8e01842d71078f12c0783c59f41bc if (is_chrome_branded) { # These entitlements are bound to the official Google Chrome signing # certificate and will not necessarily work in any other build. -@@ -645,7 +651,7 @@ if (is_win) { +@@ -649,7 +655,7 @@ if (is_win) { output_name = chrome_helper_name + invoker.helper_name_suffix @@ -70,7 +70,7 @@ index c28309a07dd643523e4a6d52bf90a9291a521399..1ec8e01842d71078f12c0783c59f41bc extra_substitutions = [ "CHROMIUM_BUNDLE_ID=$chrome_mac_bundle_id", "CHROMIUM_SHORT_NAME=$chrome_product_short_name", -@@ -1045,6 +1051,7 @@ if (is_win) { +@@ -1051,6 +1057,7 @@ if (is_win) { if (is_chrome_branded) { deps += [ ":default_apps" ] } @@ -78,7 +78,7 @@ index c28309a07dd643523e4a6d52bf90a9291a521399..1ec8e01842d71078f12c0783c59f41bc ldflags = [ "-Wl,-install_name,@executable_path/../Frameworks/$chrome_framework_name.framework/Versions/$chrome_version_full/$chrome_framework_name" ] -@@ -1206,6 +1213,7 @@ if (is_win) { +@@ -1212,6 +1219,7 @@ if (is_win) { group("browser_dependencies") { public_deps = [ @@ -86,7 +86,7 @@ index c28309a07dd643523e4a6d52bf90a9291a521399..1ec8e01842d71078f12c0783c59f41bc "//build:branding_buildflags", "//build:chromeos_buildflags", "//chrome/app:shutdown_signal_handlers", -@@ -1307,12 +1315,13 @@ group("child_dependencies") { +@@ -1313,12 +1321,13 @@ group("child_dependencies") { # this is OK because all of content is linked into one library. "//content/browser", ] @@ -101,7 +101,7 @@ index c28309a07dd643523e4a6d52bf90a9291a521399..1ec8e01842d71078f12c0783c59f41bc output = "$target_gen_dir/chrome_exe_version.rc" } -@@ -1366,6 +1375,7 @@ group("resources") { +@@ -1372,6 +1381,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 6c2437ae44d7..ba01bdb09892 100644 --- a/patches/chrome-VERSION.patch +++ b/patches/chrome-VERSION.patch @@ -1,12 +1,12 @@ diff --git a/chrome/VERSION b/chrome/VERSION -index 022efa1e001156a490a2f1eec1345cebda6ae848..1c92f150c90dedc5f82a1f09c9b097996e43ac2b 100644 +index e2b916f5f9efbab982e7bd1eb84c347ec6ba66b3..cd358992759c45df459ac208abd3d7a410e4909c 100644 --- a/chrome/VERSION +++ b/chrome/VERSION @@ -1,4 +1,4 @@ - MAJOR=89 + MAJOR=90 -MINOR=0 --BUILD=4389 --PATCH=105 +-BUILD=4430 +-PATCH=30 +MINOR=1 +BUILD=24 +PATCH=15 diff --git a/patches/chrome-android-BUILD.gn.patch b/patches/chrome-android-BUILD.gn.patch index fc551b779a59..15023c0ad9ed 100644 --- a/patches/chrome-android-BUILD.gn.patch +++ b/patches/chrome-android-BUILD.gn.patch @@ -1,16 +1,16 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn -index bdc34e6e959ed5d1b5519ccd8d82423c52a7762c..809d70d8656ba8a4eb720be1b6aeb3d94e93fdb8 100644 +index b067a3f7af514bc48632365427ba8ecffa4885df..dadadab8dd95e47bc228053bd1335cbd6d87e3b6 100644 --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn -@@ -235,6 +235,7 @@ android_resources("chrome_app_java_resources") { - "//third_party/android_deps:androidx_recyclerview_recyclerview_java", - "//third_party/android_deps:material_design_java", +@@ -236,6 +236,7 @@ android_resources("chrome_app_java_resources") { + "//third_party/androidx:androidx_preference_preference_java", + "//third_party/androidx:androidx_recyclerview_recyclerview_java", ] + deps += brave_chrome_app_java_resources_deps sources += brave_java_resources resource_overlay = true } if (enable_vr) { -@@ -542,6 +543,7 @@ android_library("chrome_java") { +@@ -551,6 +552,7 @@ android_library("chrome_java") { ] deps += feed_deps @@ -18,7 +18,7 @@ index bdc34e6e959ed5d1b5519ccd8d82423c52a7762c..809d70d8656ba8a4eb720be1b6aeb3d9 srcjar_deps = [ ":chrome_android_java_enums_srcjar", -@@ -571,6 +573,7 @@ android_library("chrome_java") { +@@ -583,6 +585,7 @@ android_library("chrome_java") { "//components/ui_metrics:ui_metrics_enums_java", "//net:effective_connection_type_java", ] @@ -26,7 +26,7 @@ index bdc34e6e959ed5d1b5519ccd8d82423c52a7762c..809d70d8656ba8a4eb720be1b6aeb3d9 # From java_sources.gni. sources = chrome_java_sources + [ app_hooks_impl ] -@@ -692,6 +695,7 @@ group("jni_headers") { +@@ -710,6 +713,7 @@ group("jni_headers") { "//chrome/browser/webauthn/android:jni_headers", "//components/media_router/browser/android:jni_headers", ] @@ -34,7 +34,7 @@ index bdc34e6e959ed5d1b5519ccd8d82423c52a7762c..809d70d8656ba8a4eb720be1b6aeb3d9 } # TODO(crbug.com/1112471): Get this to run cleanly under Python 3. -@@ -1857,6 +1861,7 @@ if (current_toolchain == default_toolchain) { +@@ -1897,6 +1901,7 @@ if (current_toolchain == default_toolchain) { ":${_variant}_locale_pak_assets", ":${_variant}_paks", ] diff --git a/patches/chrome-android-chrome_java_sources.gni.patch b/patches/chrome-android-chrome_java_sources.gni.patch index e4dde4e72a8c..60a7a014ec2a 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 9eb5293d2fd9561fc2a64e887cdfc02baec2dee5..fdb8423a6d8fabd6c7d88095069cfbce9a0b820c 100644 +index 11f55f86aeb2c7876c7c219200ce5fe8109db14d..70f86c344e78372b8558758eea2bf65ce4a730ae 100644 --- a/chrome/android/chrome_java_sources.gni +++ b/chrome/android/chrome_java_sources.gni -@@ -1516,3 +1516,4 @@ chrome_java_sources = [ +@@ -1465,3 +1465,4 @@ chrome_java_sources = [ "java/src/org/chromium/chrome/browser/webauth/authenticator/CableAuthenticatorActivity.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 b533a0d599c9..e04e14efe7f0 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 e95b16f212f47df263397445c8c297e2eab031bb..3da7ea03a215e92597633fd74cae14add6908905 100644 +index 581eff96d34c982dde7a84abd3a928530c12a522..5b5af08f78b2a599f9931bc5f72c3a5b8a453cfa 100644 --- a/chrome/android/chrome_public_apk_tmpl.gni +++ b/chrome/android/chrome_public_apk_tmpl.gni -@@ -176,6 +176,7 @@ template("chrome_public_common_apk_or_module_tmpl") { +@@ -170,6 +170,7 @@ template("chrome_public_common_apk_or_module_tmpl") { # Remove unneeded entries from material design values.xml files. resource_values_filter_rules = [ "${_material_package}:[Tt]oolbarLayout" ] @@ -10,7 +10,7 @@ index e95b16f212f47df263397445c8c297e2eab031bb..3da7ea03a215e92597633fd74cae14ad if (!_is_monochrome) { product_config_java_packages = [ "org.chromium.chrome.browser" ] -@@ -285,6 +286,7 @@ template("chrome_public_common_apk_or_module_tmpl") { +@@ -260,6 +261,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 9f654c0a8152..6404579f81e2 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 4c964bd8bb91150b1847dae55ba151d1615cf225..dbab063ba8ca9b8b2b40afe310181b98106ac74a 100644 +index efc6c2b4d4002d006f156c1039db783cd426f4b3..1e4b2629da7a2ea415703b901ec7aa91ff6e89d7 100644 --- a/chrome/android/expectations/lint-suppressions.xml +++ b/chrome/android/expectations/lint-suppressions.xml -@@ -289,4 +289,5 @@ https://chromium.googlesource.com/chromium/src/+/master/build/android/docs/lint. +@@ -270,4 +270,5 @@ https://chromium.googlesource.com/chromium/src/+/master/build/android/docs/lint. diff --git a/patches/chrome-android-features-tab_ui-BUILD.gn.patch b/patches/chrome-android-features-tab_ui-BUILD.gn.patch index bf365bfb1ff0..425fef2b5ebc 100644 --- a/patches/chrome-android-features-tab_ui-BUILD.gn.patch +++ b/patches/chrome-android-features-tab_ui-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/chrome/android/features/tab_ui/BUILD.gn b/chrome/android/features/tab_ui/BUILD.gn -index 54c04487e9d86ec9648ae9c255ba0002e0770279..636a1c36f82d3775d771d445e6abf9e88aa89907 100644 +index 2d380e041940477756f61bf09f17ecfd3a060b60..f84e2d9248a53d00e230be24c79408b43c0df388 100644 --- a/chrome/android/features/tab_ui/BUILD.gn +++ b/chrome/android/features/tab_ui/BUILD.gn @@ -189,6 +189,7 @@ android_library("java") { diff --git a/patches/chrome-android-java-AndroidManifest.xml.patch b/patches/chrome-android-java-AndroidManifest.xml.patch index 9a135341718b..b9ffc77a4c01 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 5e699b5e3dca15782ba1eaa1b5134b2dec2470d3..694cb929e89d0ca1a8211f8f993935c8f2f88c7e 100644 +index 9d44cc4f4f998dfe32e4933de20029584924877d..3224ec0f125b0a508cf7687329884bc407d1af3e 100644 --- a/chrome/android/java/AndroidManifest.xml +++ b/chrome/android/java/AndroidManifest.xml @@ -39,7 +39,9 @@ by a child template that "extends" this file. @@ -54,7 +54,7 @@ index 5e699b5e3dca15782ba1eaa1b5134b2dec2470d3..694cb929e89d0ca1a8211f8f993935c8 android:icon="@drawable/ic_launcher" android:roundIcon="@drawable/ic_launcher_round" android:label="{% block application_label %}@string/app_name{% endblock %}" -@@ -1122,6 +1133,7 @@ by a child template that "extends" this file. +@@ -1121,6 +1132,7 @@ by a child template that "extends" this file. {% endif %} @@ -62,11 +62,11 @@ index 5e699b5e3dca15782ba1eaa1b5134b2dec2470d3..694cb929e89d0ca1a8211f8f993935c8 {% block extra_application_definitions %} {% endblock %} {% endmacro %} -@@ -1204,6 +1216,7 @@ by a child template that "extends" this file. +@@ -1203,6 +1215,7 @@ by a child template that "extends" this file. -+ ++ {% endif %} 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 b0a0239bfc0c..1c9be020cf2b 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 744d444b7ff57bc99254d7d51a3a10880bbb1217..75e0880cd31889bdf265b59d10c8b21f89a7903c 100644 +index 0690d4c100246cecf4eeb2f620127a829db46a0f..f3f191595af5df82797304bc3d2ccd19001a2310 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/AppHooks.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/AppHooks.java -@@ -74,7 +74,7 @@ public abstract class AppHooks { +@@ -73,7 +73,7 @@ public abstract class AppHooks { @CalledByNative public static AppHooks get() { diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-TabbedModeTabDelegateFactory.java.patch b/patches/chrome-android-java-src-org-chromium-chrome-browser-TabbedModeTabDelegateFactory.java.patch index 67efe1c8750f..c0c6df8dda68 100644 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-TabbedModeTabDelegateFactory.java.patch +++ b/patches/chrome-android-java-src-org-chromium-chrome-browser-TabbedModeTabDelegateFactory.java.patch @@ -1,8 +1,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/TabbedModeTabDelegateFactory.java b/chrome/android/java/src/org/chromium/chrome/browser/TabbedModeTabDelegateFactory.java -index 6baa66e99db9ef06b794bcd756ff190bcbd7f499..c875a99d730cbe2a6b0d00f2d175787076bfc853 100644 +index cc26aa05ebc9165699a94917e07ddb541034e9e4..9f364d5e59f73b8d93584a67cc09e55fff25a3b2 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/TabbedModeTabDelegateFactory.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/TabbedModeTabDelegateFactory.java -@@ -59,7 +59,7 @@ public class TabbedModeTabDelegateFactory implements TabDelegateFactory { +@@ -93,7 +93,7 @@ public class TabbedModeTabDelegateFactory implements TabDelegateFactory { @Override public ExternalNavigationHandler createExternalNavigationHandler(Tab tab) { 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 9f742a3cfc08..d987870f927f 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 935d3a89990fc39b52e90dd4ae36787a22f83432..2dbe0e328dd945e2e3f1e36fd0213749f8589b28 100644 +index 4d17e48b5e5e1c04181538633aa18753bf56985c..0e4264ae528060c165f83a0cc068474495806f1f 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 -@@ -339,7 +339,7 @@ public abstract class ChromeActivity +@@ -368,7 +368,7 @@ public abstract class ChromeActivity new ArrayList<>(); protected ChromeActivity() { diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-autofill-settings-AutofillProfilesFragment.java.patch b/patches/chrome-android-java-src-org-chromium-chrome-browser-autofill-settings-AutofillProfilesFragment.java.patch index a190b91ad79e..099f90b9f39f 100644 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-autofill-settings-AutofillProfilesFragment.java.patch +++ b/patches/chrome-android-java-src-org-chromium-chrome-browser-autofill-settings-AutofillProfilesFragment.java.patch @@ -1,5 +1,5 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillProfilesFragment.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillProfilesFragment.java -index e3ac6c7b295f46916642a46154aa2ba166c44a53..b716b9a5c0573b2fd57cd0ae7eaaa9a5d782d6c2 100644 +index a2a42b2c05295ae390c27920873a1c32990bd570..c43fb10fb51dbb4eb5bbe8f8aa94add8b2970310 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillProfilesFragment.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillProfilesFragment.java @@ -35,7 +35,7 @@ import org.chromium.components.browser_ui.settings.ChromeSwitchPreference; diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-autofill-settings-AutofillServerProfileFragment.java.patch b/patches/chrome-android-java-src-org-chromium-chrome-browser-autofill-settings-AutofillServerProfileFragment.java.patch deleted file mode 100644 index aaf327bf2eb0..000000000000 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-autofill-settings-AutofillServerProfileFragment.java.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillServerProfileFragment.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillServerProfileFragment.java -index 56d353f7fc8992ddd491333f412f33ee892816f2..a56ab72341907effeb82790e3863804a9f91c906 100644 ---- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillServerProfileFragment.java -+++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillServerProfileFragment.java -@@ -21,7 +21,7 @@ import org.chromium.components.browser_ui.settings.SettingsUtils; - * Fragment for settings page that allows user to view and edit a single server-provided address. - */ - public class AutofillServerProfileFragment -- extends PreferenceFragmentCompat implements Preference.OnPreferenceClickListener { -+ extends org.chromium.chrome.browser.settings.BravePreferenceFragment implements Preference.OnPreferenceClickListener { - private String mGUID; - - private static final String PREF_SERVER_PROFILE_DESCRIPTION = "server_profile_description"; diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-native_page-NativePageFactory.java.patch b/patches/chrome-android-java-src-org-chromium-chrome-browser-native_page-NativePageFactory.java.patch index 322ff757c630..ba119d1a138a 100644 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-native_page-NativePageFactory.java.patch +++ b/patches/chrome-android-java-src-org-chromium-chrome-browser-native_page-NativePageFactory.java.patch @@ -1,5 +1,5 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageFactory.java b/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageFactory.java -index 92a53752d48e9711cc5ec914acf9008648649675..3595a396be5521dfa4440b990e86738884d20054 100644 +index c5717f16fd6aacee91eedda0fa0ff7e7a83b0ae6..68abc0c18f3f0d2351f3234a2581323319ddd61d 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageFactory.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageFactory.java @@ -86,7 +86,7 @@ public class NativePageFactory { diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-notifications-NotificationPlatformBridge.java.patch b/patches/chrome-android-java-src-org-chromium-chrome-browser-notifications-NotificationPlatformBridge.java.patch index a00821f0f643..34f724981439 100644 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-notifications-NotificationPlatformBridge.java.patch +++ b/patches/chrome-android-java-src-org-chromium-chrome-browser-notifications-NotificationPlatformBridge.java.patch @@ -1,5 +1,5 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationPlatformBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationPlatformBridge.java -index e0d6f37820d3711e9f99a2bf52138f4f9826c22a..945dece4948b04d4f2127619438437c7ee11ada8 100644 +index 6fa8b0d1833b92dc486b861d2d3a1469d814c574..954c6ac08c4d44a8fcae198788a2b07bd5079736 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationPlatformBridge.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationPlatformBridge.java @@ -81,7 +81,7 @@ public class NotificationPlatformBridge { @@ -20,7 +20,7 @@ index e0d6f37820d3711e9f99a2bf52138f4f9826c22a..945dece4948b04d4f2127619438437c7 mNativeNotificationPlatformBridge = nativeNotificationPlatformBridge; Context context = ContextUtils.getApplicationContext(); if (sNotificationManagerOverride != null) { -@@ -572,7 +572,7 @@ public class NotificationPlatformBridge { +@@ -574,7 +574,7 @@ public class NotificationPlatformBridge { }); } @@ -29,7 +29,7 @@ index e0d6f37820d3711e9f99a2bf52138f4f9826c22a..945dece4948b04d4f2127619438437c7 @NotificationType int notificationType, String origin, String scopeUrl, String profileId, boolean incognito, boolean vibrateEnabled, String title, String body, Bitmap image, Bitmap icon, Bitmap badge, int[] vibrationPattern, long timestamp, -@@ -679,7 +679,7 @@ public class NotificationPlatformBridge { +@@ -682,7 +682,7 @@ public class NotificationPlatformBridge { notificationId /* notificationTag */, PLATFORM_ID /* notificationId */)); } diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-notifications-NotificationServiceImpl.java.patch b/patches/chrome-android-java-src-org-chromium-chrome-browser-notifications-NotificationServiceImpl.java.patch index 2bc41c020968..a01bc51d7a3f 100644 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-notifications-NotificationServiceImpl.java.patch +++ b/patches/chrome-android-java-src-org-chromium-chrome-browser-notifications-NotificationServiceImpl.java.patch @@ -1,8 +1,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationServiceImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationServiceImpl.java -index 58f28a1e8f3c30bae90144b14d4614c1fd5f2364..4570f9a020202ab951a300f8d1a812c08b182a33 100644 +index 3c06d1607ea9596860a4a700c75c38849b864a24..c55867b306314329e1d31c1057b4434e8feb348f 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationServiceImpl.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationServiceImpl.java -@@ -110,7 +110,7 @@ public class NotificationServiceImpl extends NotificationService.Impl { +@@ -112,7 +112,7 @@ public class NotificationServiceImpl extends NotificationService.Impl { // Now that the browser process is initialized, we pass forward the call to the // NotificationPlatformBridge which will take care of delivering the appropriate events. diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-notifications-channels-ChromeChannelDefinitions.java.patch b/patches/chrome-android-java-src-org-chromium-chrome-browser-notifications-channels-ChromeChannelDefinitions.java.patch index a43f38f2b69e..5854eee439e7 100644 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-notifications-channels-ChromeChannelDefinitions.java.patch +++ b/patches/chrome-android-java-src-org-chromium-chrome-browser-notifications-channels-ChromeChannelDefinitions.java.patch @@ -1,5 +1,5 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java b/chrome/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java -index 9150c91338f40df308aa591c714924e6c064b4fe..cfd6f73a7f1e71c3b52113b36b27802159df9007 100644 +index bc6ad6815cf2f5fe687b871dd8019aa2ec9a785f..c92ca88fae11427fd4111b9e6d4fe7299754ca20 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java @@ -44,7 +44,7 @@ public class ChromeChannelDefinitions extends ChannelDefinitions { @@ -19,8 +19,8 @@ index 9150c91338f40df308aa591c714924e6c064b4fe..cfd6f73a7f1e71c3b52113b36b278021 ChannelId.MEDIA_PLAYBACK, ChannelId.SCREEN_CAPTURE, ChannelId.CONTENT_SUGGESTIONS, ChannelId.WEBAPP_ACTIONS, ChannelId.SITES, ChannelId.SHARING, ChannelId.UPDATES, ChannelId.COMPLETED_DOWNLOADS, ChannelId.PERMISSION_REQUESTS, -@@ -92,7 +93,7 @@ public class ChromeChannelDefinitions extends ChannelDefinitions { - String WEBRTC_CAM_AND_MIC = "webrtc_cam_and_mic"; +@@ -94,7 +95,7 @@ public class ChromeChannelDefinitions extends ChannelDefinitions { + String PRICE_DROP = "shopping_price_drop_alerts"; } - @StringDef({ChannelGroupId.GENERAL, ChannelGroupId.SITES}) @@ -28,7 +28,7 @@ index 9150c91338f40df308aa591c714924e6c064b4fe..cfd6f73a7f1e71c3b52113b36b278021 @Retention(RetentionPolicy.SOURCE) public @interface ChannelGroupId { String SITES = "sites"; -@@ -121,6 +122,7 @@ public class ChromeChannelDefinitions extends ChannelDefinitions { +@@ -123,6 +124,7 @@ public class ChromeChannelDefinitions extends ChannelDefinitions { Map map = new HashMap<>(); Set startup = new HashSet<>(); @@ -36,7 +36,7 @@ index 9150c91338f40df308aa591c714924e6c064b4fe..cfd6f73a7f1e71c3b52113b36b278021 map.put(ChannelId.BROWSER, PredefinedChannel.create(ChannelId.BROWSER, R.string.notification_category_browser, -@@ -236,6 +238,7 @@ public class ChromeChannelDefinitions extends ChannelDefinitions { +@@ -245,6 +247,7 @@ public class ChromeChannelDefinitions extends ChannelDefinitions { static final Map MAP; static { Map map = new HashMap<>(); diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-ntp-NewTabPageLayout.java.patch b/patches/chrome-android-java-src-org-chromium-chrome-browser-ntp-NewTabPageLayout.java.patch index 58e190bea810..ae82e97cbd6d 100644 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-ntp-NewTabPageLayout.java.patch +++ b/patches/chrome-android-java-src-org-chromium-chrome-browser-ntp-NewTabPageLayout.java.patch @@ -1,8 +1,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java -index e5ccd345b6095fab84af5d2f3554627955a79b85..beb45fb77e9f68e41930c46088690dcc7d0e404d 100644 +index 24cf07b79d3b2d6fb97fe062999a6611101033a2..0cf8d91289823335d2a823d7f52dd5369a82704a 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java -@@ -244,6 +244,7 @@ public class NewTabPageLayout extends LinearLayout implements TileGroup.Observer +@@ -255,6 +255,7 @@ public class NewTabPageLayout extends LinearLayout implements TileGroup.Observer /* observer = */ this, offlinePageBridge); int maxRows = 2; diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-omnibox-suggestions-DropdownItemViewInfoListBuilder.java.patch b/patches/chrome-android-java-src-org-chromium-chrome-browser-omnibox-suggestions-DropdownItemViewInfoListBuilder.java.patch index 0b7e7ce1b67d..dc1ea79792dd 100644 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-omnibox-suggestions-DropdownItemViewInfoListBuilder.java.patch +++ b/patches/chrome-android-java-src-org-chromium-chrome-browser-omnibox-suggestions-DropdownItemViewInfoListBuilder.java.patch @@ -1,13 +1,13 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/suggestions/DropdownItemViewInfoListBuilder.java b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/suggestions/DropdownItemViewInfoListBuilder.java -index 21b69d38adc7fd8415750af07681fa9c3e940f69..1d4120cc611d35b1343c0107e9ade7831a9a0a5c 100644 +index 48bf3aa294f98b7cac941ecdd1005c5c80de61f6..06687cde6229bc6107f087c8930cbce9368762b1 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/suggestions/DropdownItemViewInfoListBuilder.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/suggestions/DropdownItemViewInfoListBuilder.java -@@ -98,7 +98,7 @@ class DropdownItemViewInfoListBuilder { +@@ -96,7 +96,7 @@ class DropdownItemViewInfoListBuilder { final Supplier bookmarkSupplier = () -> mBookmarkBridge; mHeaderProcessor = new HeaderProcessor(context, host, delegate); - registerSuggestionProcessor(new EditUrlSuggestionProcessor( + registerSuggestionProcessor(new org.chromium.chrome.browser.omnibox.suggestions.editurl.BraveEditUrlSuggestionProcessor( - context, host, delegate, iconBridgeSupplier, tabSupplier, shareSupplier)); + context, host, delegate, iconBridgeSupplier, mActivityTabSupplier, shareSupplier)); registerSuggestionProcessor( new AnswerSuggestionProcessor(context, host, textProvider, imageFetcherSupplier)); 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 658fbc3d7b60..a418c1683b96 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 71e9d71c201c6dde8a82213090cb3ee09e00e21e..b9ca2482932768ae459f4aa0e498a183f05dd361 100644 +index f4d5c4024ddc8e18a5b5a1def3bcbd3ac61def56..476b806fff16252cef534ddec1be997557c086cf 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 -@@ -44,7 +44,7 @@ import org.chromium.ui.text.SpanApplier; +@@ -47,7 +47,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 71e9d71c201c6dde8a82213090cb3ee09e00e21e..b9ca2482932768ae459f4aa0e498a183 private static final String PREF_CAN_MAKE_PAYMENT = "can_make_payment"; private static final String PREF_NETWORK_PREDICTIONS = "preload_pages"; private static final String PREF_SECURE_DNS = "secure_dns"; -@@ -242,6 +242,7 @@ public class PrivacySettings +@@ -263,6 +263,7 @@ public class PrivacySettings @Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { menu.clear(); @@ -19,7 +19,7 @@ index 71e9d71c201c6dde8a82213090cb3ee09e00e21e..b9ca2482932768ae459f4aa0e498a183 MenuItem help = menu.add(Menu.NONE, R.id.menu_id_targeted_help, Menu.NONE, R.string.menu_help); help.setIcon(VectorDrawableCompat.create( -@@ -256,6 +257,6 @@ public class PrivacySettings +@@ -277,6 +278,6 @@ public class PrivacySettings null); return true; } diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-suggestions-tile-SuggestionsTileView.java.patch b/patches/chrome-android-java-src-org-chromium-chrome-browser-suggestions-tile-SuggestionsTileView.java.patch index 99ee816516be..45c56844ac6d 100644 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-suggestions-tile-SuggestionsTileView.java.patch +++ b/patches/chrome-android-java-src-org-chromium-chrome-browser-suggestions-tile-SuggestionsTileView.java.patch @@ -1,5 +1,5 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/tile/SuggestionsTileView.java b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/tile/SuggestionsTileView.java -index 219aad30b54a4cdbd9530b7f908ec07c4910b174..0da272b2d5c151302c42a61b1fe24484f4a532ea 100644 +index 8851486e8bd107f05cb1026ba268cb0256530c76..796277b07d3a21b17039e6cd6e7d835d70fb0809 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/tile/SuggestionsTileView.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/tile/SuggestionsTileView.java @@ -75,6 +75,7 @@ public class SuggestionsTileView extends TileView { @@ -8,5 +8,5 @@ index 219aad30b54a4cdbd9530b7f908ec07c4910b174..0da272b2d5c151302c42a61b1fe24484 resources.getDimensionPixelSize(R.dimen.tile_view_icon_margin_top_modern); + params.width = resources.getDimensionPixelSize(R.dimen.brave_tile_view_icon_size_modern);params.height=resources.getDimensionPixelSize(R.dimen.brave_tile_view_icon_size_modern);params.topMargin=resources.getDimensionPixelSize(R.dimen.brave_tile_view_icon_margin_top_modern); } - mIconView.setLayoutParams(params); + getIconView().setLayoutParams(params); } diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-sync-settings-AccountManagementFragment.java.patch b/patches/chrome-android-java-src-org-chromium-chrome-browser-sync-settings-AccountManagementFragment.java.patch index f3bb3200cb3b..6f2b044a3886 100644 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-sync-settings-AccountManagementFragment.java.patch +++ b/patches/chrome-android-java-src-org-chromium-chrome-browser-sync-settings-AccountManagementFragment.java.patch @@ -1,8 +1,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/AccountManagementFragment.java b/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/AccountManagementFragment.java -index 8d1b68f57f359d274cac6019e4dc06c5e3ab768f..d0d27394902c315531e081d4f7e585aa212e4ed4 100644 +index 0cc1d4a0a031f4748200b4de83ebc8d2ca818c2b..7ace7f1035ab5500434fbd4f46813413c2638017 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/AccountManagementFragment.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/AccountManagementFragment.java -@@ -62,7 +62,7 @@ import java.util.List; +@@ -61,7 +61,7 @@ import java.util.List; * * Note: This can be triggered from a web page, e.g. a GAIA sign-in page. */ diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-sync-settings-ManageSyncSettings.java.patch b/patches/chrome-android-java-src-org-chromium-chrome-browser-sync-settings-ManageSyncSettings.java.patch index 785a0bd40175..32777a8eb0ad 100644 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-sync-settings-ManageSyncSettings.java.patch +++ b/patches/chrome-android-java-src-org-chromium-chrome-browser-sync-settings-ManageSyncSettings.java.patch @@ -1,8 +1,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/ManageSyncSettings.java b/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/ManageSyncSettings.java -index 7d9d6df71f1efae725d8daee674c68aa289725af..5732e06f863054dac94343d7640c9a0564f18749 100644 +index 852faa1e27e0f1dab4b21452435e8c4252746013..deef42dcc6590bfb61e5c3c26ecdd762b19e1d6c 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/ManageSyncSettings.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/ManageSyncSettings.java -@@ -26,7 +26,7 @@ import androidx.appcompat.app.AlertDialog; +@@ -28,7 +28,7 @@ import androidx.appcompat.app.AppCompatActivity; import androidx.fragment.app.DialogFragment; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentTransaction; @@ -11,7 +11,7 @@ index 7d9d6df71f1efae725d8daee674c68aa289725af..5732e06f863054dac94343d7640c9a05 import androidx.preference.Preference; import androidx.preference.PreferenceCategory; import androidx.preference.PreferenceFragmentCompat; -@@ -367,7 +367,7 @@ public class ManageSyncSettings extends PreferenceFragmentCompat +@@ -377,7 +377,7 @@ public class ManageSyncSettings extends PreferenceFragmentCompat IdentityServicesProvider.get() .getIdentityManager(Profile.getLastUsedRegularProfile()) .getPrimaryAccountInfo(ConsentLevel.SYNC)); diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-sync-settings-SyncAndServicesSettings.java.patch b/patches/chrome-android-java-src-org-chromium-chrome-browser-sync-settings-SyncAndServicesSettings.java.patch index bd827a54ee6c..d0deed3d5360 100644 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-sync-settings-SyncAndServicesSettings.java.patch +++ b/patches/chrome-android-java-src-org-chromium-chrome-browser-sync-settings-SyncAndServicesSettings.java.patch @@ -1,10 +1,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/SyncAndServicesSettings.java b/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/SyncAndServicesSettings.java -index d61e45c197252bbf9ac6b87362e3b7244dd32de2..e2cf89068373705397b634eaf4e2fb347431d676 100644 +index 9651761b73fc891066cb42f239f275a18a2856c6..b26a3d61c13e5b33d577c55f5027a24e0a044dd8 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/SyncAndServicesSettings.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/SyncAndServicesSettings.java -@@ -76,7 +76,7 @@ import org.chromium.ui.widget.ButtonCompat; - /** - * Settings fragment to enable Sync and other services that communicate with Google. +@@ -82,7 +82,7 @@ import org.chromium.ui.widget.ButtonCompat; + * feature, this view disappears and the "Sync" and "Google services" sections are split into + * separate views, accessible directly from top-level settings. The "User" section disappears. */ -public class SyncAndServicesSettings extends PreferenceFragmentCompat +public class SyncAndServicesSettings extends org.chromium.chrome.browser.settings.BravePreferenceFragment diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-toolbar-ToolbarManager.java.patch b/patches/chrome-android-java-src-org-chromium-chrome-browser-toolbar-ToolbarManager.java.patch index ac54f9388087..79f2ac6c43b2 100644 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-toolbar-ToolbarManager.java.patch +++ b/patches/chrome-android-java-src-org-chromium-chrome-browser-toolbar-ToolbarManager.java.patch @@ -1,8 +1,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java -index 880f4a68300c0beed46cfeb3853d69b2050410c0..18e192a9acedf31c2adc9d786068a1db0a250274 100644 +index 683a208c2caf54e91e7ed7638d1780dafcb1067c..6aed58f2f4a3bd44d9aa39183ee9e9303921aa6d 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java -@@ -438,14 +438,14 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve +@@ -451,14 +451,14 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve ThemeColorProvider overviewModeThemeColorProvider = mAppThemeColorProvider; Runnable requestFocusRunnable = compositorViewHolder::requestFocus; @@ -19,9 +19,9 @@ index 880f4a68300c0beed46cfeb3853d69b2050410c0..18e192a9acedf31c2adc9d786068a1db appMenuCoordinatorSupplier, mControlsVisibilityDelegate, mWindowAndroid, (focus, type) -> setUrlBarFocus(focus, type), -@@ -835,7 +835,7 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve - IdentityDiscController identityDiscController, - OneshotSupplier startSurfaceSupplier) { +@@ -881,7 +881,7 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve + OneshotSupplier startSurfaceSupplier, boolean isGridTabSwitcherEnabled, + boolean isTabToGtsAnimationEnabled, boolean isStartSurfaceEnabled) { // clang-format off - TopToolbarCoordinator toolbar = new TopToolbarCoordinator(controlContainer, toolbarLayout, + TopToolbarCoordinator toolbar = new org.chromium.chrome.browser.toolbar.top.BraveTopToolbarCoordinator(controlContainer, toolbarLayout, diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-toolbar-top-ToolbarPhone.java.patch b/patches/chrome-android-java-src-org-chromium-chrome-browser-toolbar-top-ToolbarPhone.java.patch index f242abc88e35..a72d6a50aeee 100644 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-toolbar-top-ToolbarPhone.java.patch +++ b/patches/chrome-android-java-src-org-chromium-chrome-browser-toolbar-top-ToolbarPhone.java.patch @@ -1,8 +1,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhone.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhone.java -index 2fa77eff97ad8ef82914017528b1c8537212fa60..138fe75115cbf7c16ae2caf60b0cb53524ff5f04 100644 +index 822e62e1827ef7a0167569e24186562fa9e84f96..53c507da5cb48e23432c3a22d405adee0b2bf012 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhone.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhone.java -@@ -406,6 +406,7 @@ public class ToolbarPhone extends ToolbarLayout implements OnClickListener, TabC +@@ -408,6 +408,7 @@ public class ToolbarPhone extends ToolbarLayout implements OnClickListener, TabC if (mCurrentLocationBarColor == color) return; mCurrentLocationBarColor = color; mLocationBarBackground.setColorFilter(color, PorterDuff.Mode.SRC_IN); @@ -26,11 +26,11 @@ index 2fa77eff97ad8ef82914017528b1c8537212fa60..138fe75115cbf7c16ae2caf60b0cb535 return Math.max(mToolbarSidePadding, mToolbarButtonsContainer.getMeasuredWidth()); } -@@ -2118,6 +2121,7 @@ public class ToolbarPhone extends ToolbarLayout implements OnClickListener, TabC +@@ -2122,6 +2125,7 @@ public class ToolbarPhone extends ToolbarLayout implements OnClickListener, TabC } else { - populateUrlClearFocusingAnimatorSet(animators); + populateUrlClearExpansionAnimatorSet(animators); } -+ org.chromium.base.BraveReflectionUtil.InvokeMethod(BraveToolbarLayout.class, this, "populateUrlAnimatorSet", boolean.class, hasFocus, int.class, URL_FOCUS_TOOLBAR_BUTTONS_DURATION_MS, int.class, URL_CLEAR_FOCUS_TABSTACK_DELAY_MS, List.class, animators); ++ org.chromium.base.BraveReflectionUtil.InvokeMethod(BraveToolbarLayout.class, this, "populateUrlAnimatorSet", boolean.class, showExpandedState, int.class, URL_FOCUS_TOOLBAR_BUTTONS_DURATION_MS, int.class, URL_CLEAR_FOCUS_TABSTACK_DELAY_MS, List.class, animators); mUrlFocusLayoutAnimator = new AnimatorSet(); mUrlFocusLayoutAnimator.playTogether(animators); diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-toolbar-top-ToolbarTablet.java.patch b/patches/chrome-android-java-src-org-chromium-chrome-browser-toolbar-top-ToolbarTablet.java.patch index a709109c9deb..6d97e4b415ea 100644 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-toolbar-top-ToolbarTablet.java.patch +++ b/patches/chrome-android-java-src-org-chromium-chrome-browser-toolbar-top-ToolbarTablet.java.patch @@ -1,17 +1,17 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarTablet.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarTablet.java -index 4df848db4a3dbf1cf41a4f2d529b6a42bfe9bea4..83d345588ad6dc9122dc7ae1b7d2ba51d5846c75 100644 +index 9b7bfb89b7352aec772c04e71d078f5bc61f4ac0..696c7729d60380e9f42cea77ae04e91025910334 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarTablet.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarTablet.java -@@ -58,7 +58,7 @@ import java.util.Collection; +@@ -60,7 +60,7 @@ import java.util.Collection; * The Toolbar object for Tablet screens. */ @SuppressLint("Instantiatable") -public class ToolbarTablet extends ToolbarLayout +public class ToolbarTablet extends BraveToolbarLayout implements OnClickListener, View.OnLongClickListener, TabCountObserver { - // The number of toolbar buttons that can be hidden at small widths (reload, back, forward). - public static final int HIDEABLE_BUTTON_COUNT = 3; -@@ -316,10 +316,12 @@ public class ToolbarTablet extends ToolbarLayout + private HomeButton mHomeButton; + private ImageButton mBackButton; +@@ -315,10 +315,12 @@ public class ToolbarTablet extends ToolbarLayout DownloadUtils.downloadOfflinePage(getContext(), getToolbarDataProvider().getTab()); RecordUserAction.record("MobileToolbarDownloadPage"); } @@ -24,7 +24,7 @@ index 4df848db4a3dbf1cf41a4f2d529b6a42bfe9bea4..83d345588ad6dc9122dc7ae1b7d2ba51 String description = null; Context context = getContext(); Resources resources = context.getResources(); -@@ -385,6 +387,7 @@ public class ToolbarTablet extends ToolbarLayout +@@ -384,6 +386,7 @@ public class ToolbarTablet extends ToolbarLayout textBoxColor, PorterDuff.Mode.SRC_IN); mLocationBar.updateVisualsForState(); diff --git a/patches/chrome-android-java_sources.gni.patch b/patches/chrome-android-java_sources.gni.patch index b946fbd92a7c..dad28f50c767 100644 --- a/patches/chrome-android-java_sources.gni.patch +++ b/patches/chrome-android-java_sources.gni.patch @@ -1,8 +1,8 @@ diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni -index 01620861902eaeb77af5d8c8abef07559d21218d..566909368a9344198a07682a912a8f500e0bab15 100644 +index e1790a280c43501d8785eda46ceef57633bde28c..c7d313ae0587cfa15d112f07e66f148de15d87bf 100644 --- a/chrome/android/java_sources.gni +++ b/chrome/android/java_sources.gni -@@ -21,6 +21,7 @@ import("//components/omnibox/browser/test_java_sources.gni") +@@ -22,6 +22,7 @@ import("//components/omnibox/browser/test_java_sources.gni") import("//device/vr/buildflags/buildflags.gni") chrome_java_sources += public_autofill_assistant_java_sources diff --git a/patches/chrome-app-BUILD.gn.patch b/patches/chrome-app-BUILD.gn.patch index 24adf56ddc84..8e39a4570b59 100644 --- a/patches/chrome-app-BUILD.gn.patch +++ b/patches/chrome-app-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/chrome/app/BUILD.gn b/chrome/app/BUILD.gn -index 999ac3c02fab78211423f378c726a04ffea790a7..496a2e391c61460d7bbc24e1ef6689a259be78d5 100644 +index 19a8c138c42ecd85db409978a27d0adb54de093a..f1b54f34e1eb376565d700ce90f59c3c9c54c179 100644 --- a/chrome/app/BUILD.gn +++ b/chrome/app/BUILD.gn -@@ -78,6 +78,8 @@ grit("generated_resources") { +@@ -75,6 +75,8 @@ grit("generated_resources") { if (is_android) { outputs += android_generated_java_resources } @@ -11,7 +11,7 @@ index 999ac3c02fab78211423f378c726a04ffea790a7..496a2e391c61460d7bbc24e1ef6689a2 } if (is_android) { -@@ -100,7 +102,7 @@ grit("google_chrome_strings") { +@@ -97,7 +99,7 @@ grit("google_chrome_strings") { } grit("chromium_strings") { diff --git a/patches/chrome-app-chrome_crash_reporter_client.cc.patch b/patches/chrome-app-chrome_crash_reporter_client.cc.patch index 5aacb3945d69..d523fc7a8bdc 100644 --- a/patches/chrome-app-chrome_crash_reporter_client.cc.patch +++ b/patches/chrome-app-chrome_crash_reporter_client.cc.patch @@ -1,5 +1,5 @@ diff --git a/chrome/app/chrome_crash_reporter_client.cc b/chrome/app/chrome_crash_reporter_client.cc -index b3a7aebffa224c360e3760f816887cb979999c57..e56f309c199b87d63b32c33effb5e08017224f7f 100644 +index abacf224d9ee08ae8732df71e54ce63fc20a4e69..0e58172e68c0f403887e6cff1f6a4f262c8fc3f5 100644 --- a/chrome/app/chrome_crash_reporter_client.cc +++ b/chrome/app/chrome_crash_reporter_client.cc @@ -154,7 +154,7 @@ bool ChromeCrashReporterClient::IsRunningUnattended() { diff --git a/patches/chrome-browser-BUILD.gn.patch b/patches/chrome-browser-BUILD.gn.patch index 994e9b1d82b5..5f92c5fdada8 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 2ace902f57a7a91124d316c1ad5df0e977e0a6d5..e478eb3dbc5d2d9bbc47b54a6f9f81dfd5c72fc3 100644 +index b20b829650c3bc744ac0494fd98585ecc03c2cbf..5763f4ad4a3f2901542f5a153c84a187d91c6694 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 e287a394a8d2..afd53b0d211a 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 1f7e7ced6a98abf40e45688dc3e318483afb9a16..e3e49f18a98ae6b10c2068f2b809c4e6e774e2d5 100644 +index 3cdc0475f87d95fe030a75d72e930d2157ce9d20..9d9a35dd61ae7ffd39ba8f19ba4fa352309ef906 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -306,14 +306,14 @@ const FeatureEntry::Choice kTouchTextSelectionStrategyChoices[] = { +@@ -307,14 +307,14 @@ const FeatureEntry::Choice kTouchTextSelectionStrategyChoices[] = { const FeatureEntry::Choice kTraceUploadURL[] = { {flags_ui::kGenericExperimentChoiceDisabled, "", ""}, {flag_descriptions::kTraceUploadUrlChoiceOther, switches::kTraceUploadURL, @@ -21,7 +21,7 @@ index 1f7e7ced6a98abf40e45688dc3e318483afb9a16..e3e49f18a98ae6b10c2068f2b809c4e6 const FeatureEntry::Choice kPassiveListenersChoices[] = { {flags_ui::kGenericExperimentChoiceDefault, "", ""}, -@@ -7088,6 +7088,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -7269,6 +7269,7 @@ const FeatureEntry kFeatureEntries[] = { // "LoginCustomFlags" in tools/metrics/histograms/enums.xml. See "Flag // Histograms" in tools/metrics/histograms/README.md (run the // AboutFlagsHistogramTest unit test to verify this process). diff --git a/patches/chrome-browser-android-browsing_data-browsing_data_bridge.cc.patch b/patches/chrome-browser-android-browsing_data-browsing_data_bridge.cc.patch index b3325f62b167..ee19f6d9b9eb 100644 --- a/patches/chrome-browser-android-browsing_data-browsing_data_bridge.cc.patch +++ b/patches/chrome-browser-android-browsing_data-browsing_data_bridge.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/android/browsing_data/browsing_data_bridge.cc b/chrome/browser/android/browsing_data/browsing_data_bridge.cc -index 77aab64b9b42cdb13c5ce297dc38f01fceefb86a..aeabe315f662d5fbcafb097f1fc2d13ba736afc9 100644 +index 2feee9ec0bb4fe234d70009e0c218118728ae017..2a4bfb3ec5fba49706f7405bb3aa642a6a1a4c67 100644 --- a/chrome/browser/android/browsing_data/browsing_data_bridge.cc +++ b/chrome/browser/android/browsing_data/browsing_data_bridge.cc -@@ -124,6 +124,7 @@ static void JNI_BrowsingDataBridge_ClearBrowsingData( +@@ -126,6 +126,7 @@ static void JNI_BrowsingDataBridge_ClearBrowsingData( remove_mask |= chrome_browsing_data_remover::DATA_TYPE_CONTENT_SETTINGS; break; case browsing_data::BrowsingDataType::DOWNLOADS: diff --git a/patches/chrome-browser-browser_process_impl.h.patch b/patches/chrome-browser-browser_process_impl.h.patch index 18938715f062..9125077037a8 100644 --- a/patches/chrome-browser-browser_process_impl.h.patch +++ b/patches/chrome-browser-browser_process_impl.h.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_process_impl.h -index 1d3c566cc59b8a515122e16f573ffed23a65a6f0..43646914d83bad11aee31801b044efff0fcc5d51 100644 +index b4ceefbccd083c608dcc5543c186cd884c44a75f..a9e94670547bc8fbc5ac24be312b14e442d8c581 100644 --- a/chrome/browser/browser_process_impl.h +++ b/chrome/browser/browser_process_impl.h -@@ -200,6 +200,7 @@ class BrowserProcessImpl : public BrowserProcess, +@@ -205,6 +205,7 @@ class BrowserProcessImpl : public BrowserProcess, static void RegisterPrefs(PrefRegistrySimple* registry); private: 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 index e5bec587c387..87929659fd79 100644 --- 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 @@ -1,8 +1,8 @@ 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 821b1f25c7387d8fd7fabd030fd905e9af39f813..8bf5455090728fceeb29f3440708909e1c7fec3f 100644 +index 64f330f6d2eab0099b263d0cf9135bd66d0f0db2..24bcbe900aab4033893131da6a266ce3f158ae2a 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 -@@ -108,5 +108,5 @@ ChromeBrowsingDataRemoverDelegateFactory::GetBrowserContextToUse( +@@ -100,5 +100,5 @@ ChromeBrowsingDataRemoverDelegateFactory::GetBrowserContextToUse( KeyedService* ChromeBrowsingDataRemoverDelegateFactory::BuildServiceInstanceFor( content::BrowserContext* context) const { diff --git a/patches/chrome-browser-chrome_content_browser_client.h.patch b/patches/chrome-browser-chrome_content_browser_client.h.patch index f514f047b874..9aef155a07cd 100644 --- a/patches/chrome-browser-chrome_content_browser_client.h.patch +++ b/patches/chrome-browser-chrome_content_browser_client.h.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/chrome_content_browser_client.h b/chrome/browser/chrome_content_browser_client.h -index d6e0a910ef96d2d7d6b0f5434717346b515577e5..7312bc3b4b1517ef62d2dcd5b68f1d5af03e82fa 100644 +index 792e69483a893ae28e45edf74a354f2c070cfc98..6e07b680b73b784322df04ed6a3c0b0199417ad8 100644 --- a/chrome/browser/chrome_content_browser_client.h +++ b/chrome/browser/chrome_content_browser_client.h -@@ -755,6 +755,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { +@@ -760,6 +760,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { } private: diff --git a/patches/chrome-browser-content_settings-host_content_settings_map_factory.cc.patch b/patches/chrome-browser-content_settings-host_content_settings_map_factory.cc.patch index 27590b3195ea..6b93d5b672eb 100644 --- a/patches/chrome-browser-content_settings-host_content_settings_map_factory.cc.patch +++ b/patches/chrome-browser-content_settings-host_content_settings_map_factory.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/content_settings/host_content_settings_map_factory.cc b/chrome/browser/content_settings/host_content_settings_map_factory.cc -index cf62b79358e14c90dab5a1e68cec7055c0cce39f..3a6f8c0ea0368b627fc5477163858f028a45ebc1 100644 +index c1e6c77a57267f9540c8bd984db570026719f03f..34460c7dc6cf2a51009d4e32b7dc81473b1fc9a4 100644 --- a/chrome/browser/content_settings/host_content_settings_map_factory.cc +++ b/chrome/browser/content_settings/host_content_settings_map_factory.cc -@@ -87,6 +87,7 @@ scoped_refptr +@@ -89,6 +89,7 @@ scoped_refptr scoped_refptr settings_map(new HostContentSettingsMap( profile->GetPrefs(), diff --git a/patches/chrome-browser-devtools-devtools_ui_bindings.h.patch b/patches/chrome-browser-devtools-devtools_ui_bindings.h.patch index f26ab6fc4775..93c17650dfde 100644 --- a/patches/chrome-browser-devtools-devtools_ui_bindings.h.patch +++ b/patches/chrome-browser-devtools-devtools_ui_bindings.h.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/devtools/devtools_ui_bindings.h b/chrome/browser/devtools/devtools_ui_bindings.h -index ddd17d16457c7da9c573f971b4afaedf859088e1..7323ba0c7af0f910ab580b8f837e0ee3a45d9bb0 100644 +index a4987fd55d676d3e8a1914bfb1acd041efbd6bc6..ff8ef6b5f0cc7836e24d0773f24a0d2fae7abd51 100644 --- a/chrome/browser/devtools/devtools_ui_bindings.h +++ b/chrome/browser/devtools/devtools_ui_bindings.h @@ -93,6 +93,9 @@ class DevToolsUIBindings : public DevToolsEmbedderMessageDispatcher::Delegate, diff --git a/patches/chrome-browser-extensions-BUILD.gn.patch b/patches/chrome-browser-extensions-BUILD.gn.patch index a0cb93dbd770..bca6b9b46a93 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 b7365d5cea219dd38387ff35bd41f89d74890ab7..47776d3314330341fdef431fb844500f57056c88 100644 +index d4435c818602265a09967e5a8afbc3e416796633..1b9bd42a76381f2953b8ddfa9ebc92af065a73d7 100644 --- a/chrome/browser/extensions/BUILD.gn +++ b/chrome/browser/extensions/BUILD.gn -@@ -1286,6 +1286,7 @@ static_library("extensions") { +@@ -1287,6 +1287,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 e088738888f4..2e4d8d966282 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,5 +1,5 @@ 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 b00dc45ec1dac27fb885941fa441350ef30b32f1..2488b91f6fd5372c053851c8c898728122b7180f 100644 +index 6ea8182f40899efefed029da199236d95641b57e..2a2b0b4394a961ecd08010364852c87eb821438d 100644 --- a/chrome/browser/extensions/api/developer_private/extension_info_generator.cc +++ b/chrome/browser/extensions/api/developer_private/extension_info_generator.cc @@ -615,6 +615,7 @@ void ExtensionInfoGenerator::CreateExtensionInfoHelper( diff --git a/patches/chrome-browser-extensions-api-webrtc_logging_private-webrtc_logging_private_api.cc.patch b/patches/chrome-browser-extensions-api-webrtc_logging_private-webrtc_logging_private_api.cc.patch index 89ff077c060d..497a8226c29e 100644 --- a/patches/chrome-browser-extensions-api-webrtc_logging_private-webrtc_logging_private_api.cc.patch +++ b/patches/chrome-browser-extensions-api-webrtc_logging_private-webrtc_logging_private_api.cc.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc b/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc -index e0a0322126230516c61972184eb0d04923e0846c..fc9be21023aed80515d1734cff7f4c5133e354e4 100644 +index 3f1decf1d8c49fc4cfb788400b2f1333579a194f..4b113fe7bedf7a7cba8ee9c625a5a13169a574b2 100644 --- a/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc +++ b/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc @@ -89,6 +89,7 @@ content::RenderProcessHost* WebrtcLoggingPrivateFunction::RphFromRequest( diff --git a/patches/chrome-browser-extensions-chrome_component_extension_resource_manager.cc.patch b/patches/chrome-browser-extensions-chrome_component_extension_resource_manager.cc.patch index 4cb7808ed262..201995bddf6f 100644 --- a/patches/chrome-browser-extensions-chrome_component_extension_resource_manager.cc.patch +++ b/patches/chrome-browser-extensions-chrome_component_extension_resource_manager.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/extensions/chrome_component_extension_resource_manager.cc b/chrome/browser/extensions/chrome_component_extension_resource_manager.cc -index 7f7767a72bee3b604870ba4ebe1337185606cb2b..6843432cd5823af4f1ab96011861c609323351dd 100644 +index 011c1491fe0f075c4726857ffa7981a2580b31d7..8fe21b0483eb17d7d1098ae48eb7be2975689290 100644 --- a/chrome/browser/extensions/chrome_component_extension_resource_manager.cc +++ b/chrome/browser/extensions/chrome_component_extension_resource_manager.cc -@@ -158,6 +158,7 @@ ChromeComponentExtensionResourceManager::Data::Data() { +@@ -159,6 +159,7 @@ ChromeComponentExtensionResourceManager::Data::Data() { std::move(pdf_viewer_replacements); } #endif diff --git a/patches/chrome-browser-extensions-component_loader.h.patch b/patches/chrome-browser-extensions-component_loader.h.patch index 5a147ccaac41..cb4e2063c3ea 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 1d7591379e5252ea8edd7737d26f068c801bbb1f..99aa94dc64185a7838da5edfc6e9a1b5f62fd435 100644 +index 6cc84e5ab2e16448e3cf56d4432bce106f3d544c..3c89dafef3ae6840918db1efc7f2b6ccd36e0537 100644 --- a/chrome/browser/extensions/component_loader.h +++ b/chrome/browser/extensions/component_loader.h @@ -81,7 +81,7 @@ class ComponentLoader { diff --git a/patches/chrome-browser-extensions-extension_management.cc.patch b/patches/chrome-browser-extensions-extension_management.cc.patch index fcf5706aa29f..2d757ee4c945 100644 --- a/patches/chrome-browser-extensions-extension_management.cc.patch +++ b/patches/chrome-browser-extensions-extension_management.cc.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/extensions/extension_management.cc b/chrome/browser/extensions/extension_management.cc -index ea74541fc6c9fb3f821870d6717a0ca6db1dc542..82a27275d694be5db543f9a23abeb492e8d92660 100644 +index a4ac2264d34ecda35dd69df0fb88ebce8f613371..0e2a724e51ade09f11889c8fd17aec696b57a502 100644 --- a/chrome/browser/extensions/extension_management.cc +++ b/chrome/browser/extensions/extension_management.cc @@ -720,6 +720,7 @@ KeyedService* ExtensionManagementFactory::BuildServiceInstanceFor( diff --git a/patches/chrome-browser-extensions-extension_service.h.patch b/patches/chrome-browser-extensions-extension_service.h.patch index 49363f5dcd83..37962f3043ce 100644 --- a/patches/chrome-browser-extensions-extension_service.h.patch +++ b/patches/chrome-browser-extensions-extension_service.h.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/extensions/extension_service.h b/chrome/browser/extensions/extension_service.h -index 6ccde6ed5448160bba6a9a2179a397676a9fc6e1..e6a5fd4dc614f384074c9bf219eef9b1f849c65f 100644 +index f86268b678f6699626b76c79f119b23c58343a53..2ddb1ad35b416281fd296aca27b080eaecd397c6 100644 --- a/chrome/browser/extensions/extension_service.h +++ b/chrome/browser/extensions/extension_service.h -@@ -455,6 +455,7 @@ class ExtensionService : public ExtensionServiceInterface, +@@ -461,6 +461,7 @@ class ExtensionService : public ExtensionServiceInterface, static base::AutoReset DisableExternalUpdatesForTesting(); private: diff --git a/patches/chrome-browser-extensions-extension_tab_util.cc.patch b/patches/chrome-browser-extensions-extension_tab_util.cc.patch index 014b3ff9027b..7e2e21a754c8 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 a2781105fc4fa28cf7992712f0b9bc7688a70441..e37bc2567fa0a4316e03b42454ef522e2ec68479 100644 +index 3622b811fa78e4a3313308b7a37e586dd6bba1df..97f81c3e48aa27d41d812dcffacb2001d8e3918c 100644 --- a/chrome/browser/extensions/extension_tab_util.cc +++ b/chrome/browser/extensions/extension_tab_util.cc -@@ -784,6 +784,7 @@ bool ExtensionTabUtil::IsKillURL(const GURL& url) { +@@ -789,6 +789,7 @@ bool ExtensionTabUtil::IsKillURL(const GURL& url) { }; if (!url.SchemeIs(content::kChromeUIScheme)) diff --git a/patches/chrome-browser-extensions-updater-chrome_update_client_config.h.patch b/patches/chrome-browser-extensions-updater-chrome_update_client_config.h.patch index 057177f3022e..1e7d76c69f05 100644 --- a/patches/chrome-browser-extensions-updater-chrome_update_client_config.h.patch +++ b/patches/chrome-browser-extensions-updater-chrome_update_client_config.h.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/extensions/updater/chrome_update_client_config.h b/chrome/browser/extensions/updater/chrome_update_client_config.h -index ffd5bac32e90200a600bfce68b44b665c2c3dfa1..29a25a118d90e2df4ee90d1724b1a0f80f96588d 100644 +index 63354b13b22b8258295e46fe2fa4e5dfecce04a2..f9dace4c2767e79f4a95eb687ac0f8711802ef16 100644 --- a/chrome/browser/extensions/updater/chrome_update_client_config.h +++ b/chrome/browser/extensions/updater/chrome_update_client_config.h @@ -76,6 +76,7 @@ class ChromeUpdateClientConfig : public update_client::Configurator { diff --git a/patches/chrome-browser-flags-android-chrome_feature_list.cc.patch b/patches/chrome-browser-flags-android-chrome_feature_list.cc.patch index ca445996f651..6fdabf622b2e 100644 --- a/patches/chrome-browser-flags-android-chrome_feature_list.cc.patch +++ b/patches/chrome-browser-flags-android-chrome_feature_list.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc -index 7a6c4dd179b1877139b00f8fca97c2c9df6de71d..162741f5f2a46fb9e7786be540f6c55ad15b9037 100644 +index a90538884b473d493c22bfa5621704d106a76ad2..65e51d9b91bba750d55ebf451e128f912410ee49 100644 --- a/chrome/browser/flags/android/chrome_feature_list.cc +++ b/chrome/browser/flags/android/chrome_feature_list.cc -@@ -308,6 +308,7 @@ const base::Feature* kFeaturesExposedToJava[] = { +@@ -313,6 +313,7 @@ const base::Feature* kFeaturesExposedToJava[] = { }; const base::Feature* FindFeatureExposedToJava(const std::string& feature_name) { diff --git a/patches/chrome-browser-global_keyboard_shortcuts_mac.mm.patch b/patches/chrome-browser-global_keyboard_shortcuts_mac.mm.patch index 5e1dafc674a8..a40e2ebfc790 100644 --- a/patches/chrome-browser-global_keyboard_shortcuts_mac.mm.patch +++ b/patches/chrome-browser-global_keyboard_shortcuts_mac.mm.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/global_keyboard_shortcuts_mac.mm b/chrome/browser/global_keyboard_shortcuts_mac.mm -index 8b57a30961fa9c2dc12fd8812c3d51f643ce9179..54d4446460fa6db285c63c0824b6fb4605f2e1d4 100644 +index 78529f120e857da58a69c3e00e3ba6c651d3f9c9..7908b1107ff9fc226086ee069e1c6e30f966bcfa 100644 --- a/chrome/browser/global_keyboard_shortcuts_mac.mm +++ b/chrome/browser/global_keyboard_shortcuts_mac.mm -@@ -170,6 +170,7 @@ const std::vector& GetShortcutsNotPresentInMainMenu() { +@@ -172,6 +172,7 @@ const std::vector& GetShortcutsNotPresentInMainMenu() { {true, false, false, true, kVK_DownArrow, IDC_FOCUS_NEXT_PANE}, {true, false, false, true, kVK_UpArrow, IDC_FOCUS_PREVIOUS_PANE}, diff --git a/patches/chrome-browser-importer-importer_list.cc.patch b/patches/chrome-browser-importer-importer_list.cc.patch index 294eb5df71b7..9af0379c0c43 100644 --- a/patches/chrome-browser-importer-importer_list.cc.patch +++ b/patches/chrome-browser-importer-importer_list.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/importer/importer_list.cc b/chrome/browser/importer/importer_list.cc -index 82408b7334fb37b7f957d417f9c7ee8cbfc50b55..6f47de7e0dab91ee0fdcd01846e06baf284c6a0f 100644 +index 662e491afeeb5dedc68b91e7de96ffc82d688245..38074a369fa54d3bea2659c793afc7a583e64f39 100644 --- a/chrome/browser/importer/importer_list.cc +++ b/chrome/browser/importer/importer_list.cc -@@ -156,20 +156,30 @@ std::vector DetectSourceProfilesWorker( +@@ -165,20 +165,30 @@ std::vector DetectSourceProfilesWorker( if (shell_integration::IsFirefoxDefaultBrowser()) { DetectFirefoxProfiles(locale, &profiles); DetectBuiltinWindowsProfiles(&profiles); diff --git a/patches/chrome-browser-net-proxy_config_monitor.cc.patch b/patches/chrome-browser-net-proxy_config_monitor.cc.patch index 53fb825a0237..8082cc2a9b8d 100644 --- a/patches/chrome-browser-net-proxy_config_monitor.cc.patch +++ b/patches/chrome-browser-net-proxy_config_monitor.cc.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/net/proxy_config_monitor.cc b/chrome/browser/net/proxy_config_monitor.cc -index 08a7a0260f6a2e3053e6da39b394eb90fa132bf9..c54e80fca678200109ce1dd24cdbffdf77914a21 100644 +index 55cc762b92193ed3f65b4d0b562202869530e1ac..d3cf6c87b3fd96ddb3895081fd49d2e4c1b97ca7 100644 --- a/chrome/browser/net/proxy_config_monitor.cc +++ b/chrome/browser/net/proxy_config_monitor.cc @@ -51,6 +51,7 @@ ProxyConfigMonitor::ProxyConfigMonitor(Profile* profile) { 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 015ce3c1084e..ef6f9c3bfa06 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 1075f22db31a35c9f64c3a4519b6e6a62045a0a5..dc3e3671a23cac4acc64f3f91a2e441214c28777 100644 +index c15186c8bd7892e8b1f351d6efc4cb1074b76417..4650f3caabc837e56e78cdaf1d759af3712ece7c 100644 --- a/chrome/browser/net/system_network_context_manager.cc +++ b/chrome/browser/net/system_network_context_manager.cc -@@ -224,7 +224,7 @@ class SystemNetworkContextManager::URLLoaderFactoryForSystem +@@ -223,7 +223,7 @@ class SystemNetworkContextManager::URLLoaderFactoryForSystem if (!manager_) return; manager_->GetURLLoaderFactory()->CreateLoaderAndStart( diff --git a/patches/chrome-browser-notifications-notification_display_service_impl.cc.patch b/patches/chrome-browser-notifications-notification_display_service_impl.cc.patch index e8dd3b08bd67..33bea8ee7218 100644 --- a/patches/chrome-browser-notifications-notification_display_service_impl.cc.patch +++ b/patches/chrome-browser-notifications-notification_display_service_impl.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/notifications/notification_display_service_impl.cc b/chrome/browser/notifications/notification_display_service_impl.cc -index f82d310e49b5ea33283330b521d3ed2e07ef8992..e85e0b32ee5dd87e4a05bdc2de868e1658fa7696 100644 +index 60018ca3e11392af2d1c398caee1f87d5703be51..7443189c884f0f734505bea49830666a5a002b85 100644 --- a/chrome/browser/notifications/notification_display_service_impl.cc +++ b/chrome/browser/notifications/notification_display_service_impl.cc -@@ -120,6 +120,7 @@ NotificationDisplayServiceImpl::NotificationDisplayServiceImpl(Profile* profile) +@@ -122,6 +122,7 @@ NotificationDisplayServiceImpl::NotificationDisplayServiceImpl(Profile* profile) std::make_unique()); } #endif diff --git a/patches/chrome-browser-notifications-notification_platform_bridge_mac.mm.patch b/patches/chrome-browser-notifications-notification_platform_bridge_mac.mm.patch index 3150465be9d7..4b2faeac82f9 100644 --- a/patches/chrome-browser-notifications-notification_platform_bridge_mac.mm.patch +++ b/patches/chrome-browser-notifications-notification_platform_bridge_mac.mm.patch @@ -1,16 +1,8 @@ diff --git a/chrome/browser/notifications/notification_platform_bridge_mac.mm b/chrome/browser/notifications/notification_platform_bridge_mac.mm -index 9e8fcb9f9f91cb33a60c22704619dbd02024a06e..d359fea0d6626802c2b1b7b09f46739bc114d1ca 100644 +index ba8ae96bc6ae6c0dd9cfdf2c0c02418d4c6cc721..2beb3491fb0d122aaf14347a5b672e192ac23519 100644 --- a/chrome/browser/notifications/notification_platform_bridge_mac.mm +++ b/chrome/browser/notifications/notification_platform_bridge_mac.mm -@@ -91,6 +91,7 @@ bool IsPersistentNotification( - // an expensive call. Instead use NotificationPlatformBridgeMac::SupportsAlerts - // which caches this value. - bool SupportsAlertsImpl() { -+ BRAVE_SUPPORTSALERTSIMPL_ - int32_t major, minor, bugfix; - base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix); - // Allow alerts on all versions except 10.15.0, 10.15.1 & 10.15.2. -@@ -239,6 +240,7 @@ void NotificationPlatformBridgeMac::Display( +@@ -188,6 +188,7 @@ void NotificationPlatformBridgeMac::Display( } else { NSUserNotification* toast = [builder buildUserNotification]; [notification_center_ deliverNotification:toast]; diff --git a/patches/chrome-browser-notifications-notification_platform_bridge_mac_utils.mm.patch b/patches/chrome-browser-notifications-notification_platform_bridge_mac_utils.mm.patch new file mode 100644 index 000000000000..9b0b417bbadb --- /dev/null +++ b/patches/chrome-browser-notifications-notification_platform_bridge_mac_utils.mm.patch @@ -0,0 +1,12 @@ +diff --git a/chrome/browser/notifications/notification_platform_bridge_mac_utils.mm b/chrome/browser/notifications/notification_platform_bridge_mac_utils.mm +index e6c14e8ff6ef14c96c79d4f9cdd560d4dc5606cf..6afd680337a26fac864df0bf67a0f21617894ac4 100644 +--- a/chrome/browser/notifications/notification_platform_bridge_mac_utils.mm ++++ b/chrome/browser/notifications/notification_platform_bridge_mac_utils.mm +@@ -59,6 +59,7 @@ void DoProcessMacNotificationResponse( + // call this method directly as SysInfo::OperatingSystemVersionNumbers might be + // an expensive call. Instead use SupportsAlerts which caches this value. + bool MacOSSupportsXPCAlertsImpl() { ++ BRAVE_SUPPORTSALERTSIMPL_ + int32_t major, minor, bugfix; + base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix); + // Allow alerts on all versions except 10.15.0, 10.15.1 & 10.15.2. diff --git a/patches/chrome-browser-prefs-browser_prefs.cc.patch b/patches/chrome-browser-prefs-browser_prefs.cc.patch index 358284986cba..72a151172ab0 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 7a08a79434987695792dcc76f565a3685b481e53..a119f6b6477e772c4b61b1549291c183a80aac22 100644 +index 853eff92d2105eddb745999951eadabdf5f38400..dd410d463a232617237e0cc7cfd77f63b06337e1 100644 --- a/chrome/browser/prefs/browser_prefs.cc +++ b/chrome/browser/prefs/browser_prefs.cc -@@ -823,6 +823,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) { +@@ -878,6 +878,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) { #if defined(TOOLKIT_VIEWS) RegisterBrowserViewLocalPrefs(registry); #endif @@ -10,7 +10,7 @@ index 7a08a79434987695792dcc76f565a3685b481e53..a119f6b6477e772c4b61b1549291c183 // This is intentionally last. RegisterLocalStatePrefsForMigration(registry); -@@ -1098,6 +1099,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, +@@ -1158,6 +1159,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 61b4b0090506..5b732d81af6e 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 c5999dc92fdcb148e9f813892b59b2bf398b799c..a0b5ba74a64eb3d8e1483663259fe8cbc661e36a 100644 +index 8e8a7abdcf1746a1eb04a5a776afc488827ef334..da37943fae7f8c0b0884e2e0e1b494b7fd6d5d43 100644 --- a/chrome/browser/profiles/profile.cc +++ b/chrome/browser/profiles/profile.cc @@ -90,6 +90,7 @@ bool Profile::OTRProfileID::AllowsBrowserWindows() const { @@ -10,7 +10,7 @@ index c5999dc92fdcb148e9f813892b59b2bf398b799c..a0b5ba74a64eb3d8e1483663259fe8cb base::StartsWith(profile_id_, kDevToolsOTRProfileIDPrefix, base::CompareCase::SENSITIVE) || base::StartsWith(profile_id_, kMediaRouterOTRProfileIDPrefix, -@@ -248,7 +249,7 @@ const char Profile::kProfileKey[] = "__PROFILE__"; +@@ -247,7 +248,7 @@ const char Profile::kProfileKey[] = "__PROFILE__"; void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { registry->RegisterBooleanPref( prefs::kSearchSuggestEnabled, diff --git a/patches/chrome-browser-profiles-profile_avatar_icon_util.cc.patch b/patches/chrome-browser-profiles-profile_avatar_icon_util.cc.patch index cc519c972237..0e60069a69f4 100644 --- a/patches/chrome-browser-profiles-profile_avatar_icon_util.cc.patch +++ b/patches/chrome-browser-profiles-profile_avatar_icon_util.cc.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/profiles/profile_avatar_icon_util.cc b/chrome/browser/profiles/profile_avatar_icon_util.cc -index 5ca9abf317a8ca06c2686a1a900eccb51dfb63f9..a550b94b2ecc5c5f73dc0edba56f9f835bf0cc9b 100644 +index 84ea1a7d3b4405276963c1d7e4c6b842824ccbbd..2e20f8073bc5438a09b7a535817a40873270ba94 100644 --- a/chrome/browser/profiles/profile_avatar_icon_util.cc +++ b/chrome/browser/profiles/profile_avatar_icon_util.cc @@ -345,7 +345,7 @@ constexpr size_t kDefaultAvatarIconsCount = 1; @@ -11,7 +11,7 @@ index 5ca9abf317a8ca06c2686a1a900eccb51dfb63f9..a550b94b2ecc5c5f73dc0edba56f9f83 #endif #if !defined(OS_ANDROID) -@@ -477,6 +477,7 @@ size_t GetPlaceholderAvatarIndex() { +@@ -478,6 +478,7 @@ size_t GetPlaceholderAvatarIndex() { size_t GetModernAvatarIconStartIndex() { #if !BUILDFLAG(IS_CHROMEOS_ASH) && !defined(OS_ANDROID) @@ -19,7 +19,7 @@ index 5ca9abf317a8ca06c2686a1a900eccb51dfb63f9..a550b94b2ecc5c5f73dc0edba56f9f83 return GetPlaceholderAvatarIndex() + 1; #else // Only use the placeholder avatar on ChromeOS and Android. -@@ -510,6 +511,7 @@ std::string GetPlaceholderAvatarIconUrl() { +@@ -511,6 +512,7 @@ std::string GetPlaceholderAvatarIconUrl() { const IconResourceInfo* GetDefaultAvatarIconResourceInfo(size_t index) { CHECK_LT(index, kDefaultAvatarIconsCount); diff --git a/patches/chrome-browser-profiles-profile_impl.cc.patch b/patches/chrome-browser-profiles-profile_impl.cc.patch index 399ec8878700..2b51eabc8fe0 100644 --- a/patches/chrome-browser-profiles-profile_impl.cc.patch +++ b/patches/chrome-browser-profiles-profile_impl.cc.patch @@ -1,13 +1,13 @@ diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc -index 4db0fc51825935913e87ce46c27c58f71d30fb0e..e3b35d654660af517d4d5f816f78628ca2a33992 100644 +index e33b9cff88277425838d52e09c2fafbb37d5e762..daa4df6bb79ae7fcfe11e9c8f6999be37c7ad2c0 100644 --- a/chrome/browser/profiles/profile_impl.cc +++ b/chrome/browser/profiles/profile_impl.cc -@@ -402,7 +402,7 @@ std::unique_ptr Profile::CreateProfile(const base::FilePath& path, +@@ -400,7 +400,7 @@ std::unique_ptr Profile::CreateProfile(const base::FilePath& path, NOTREACHED(); } - std::unique_ptr profile = base::WrapUnique(new ProfileImpl( + std::unique_ptr profile = base::WrapUnique(new BraveProfileImpl( path, delegate, create_mode, creation_time, io_task_runner)); - #if BUILDFLAG(ENABLE_SUPERVISED_USERS) && !defined(OS_ANDROID) && \ - !BUILDFLAG(IS_CHROMEOS_ASH) + return profile; + } diff --git a/patches/chrome-browser-profiles-profile_impl.h.patch b/patches/chrome-browser-profiles-profile_impl.h.patch index 2bc8b7b81cd1..0c4b4cdbf9de 100644 --- a/patches/chrome-browser-profiles-profile_impl.h.patch +++ b/patches/chrome-browser-profiles-profile_impl.h.patch @@ -1,12 +1,12 @@ diff --git a/chrome/browser/profiles/profile_impl.h b/chrome/browser/profiles/profile_impl.h -index 0697c9525f9e149945b8cf699c71912eeceb5b48..456fccbff40d8741ed8130a2f3409bd5e61c0968 100644 +index d21cd79384ec19fb41850e19d60d60dab633a484..adb7aa882fad79eea60fbbadfc8a5a85af80091f 100644 --- a/chrome/browser/profiles/profile_impl.h +++ b/chrome/browser/profiles/profile_impl.h -@@ -172,6 +172,7 @@ class ProfileImpl : public Profile { +@@ -165,6 +165,7 @@ class ProfileImpl : public Profile { void OnLogin() override; void InitChromeOSPreferences() override; #endif // BUILDFLAG(IS_CHROMEOS_ASH) + BRAVE_PROFILE_IMPL_H_ - void SetCreationTimeForTesting(base::Time creation_time) override; - void RecordMainFrameNavigation() override {} + bool IsNewProfile() const override; + diff --git a/patches/chrome-browser-profiles-profile_manager.h.patch b/patches/chrome-browser-profiles-profile_manager.h.patch index 90c09ce19955..70ec224dd4f3 100644 --- a/patches/chrome-browser-profiles-profile_manager.h.patch +++ b/patches/chrome-browser-profiles-profile_manager.h.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/profiles/profile_manager.h b/chrome/browser/profiles/profile_manager.h -index 69840a8d8e2f055b5c7c79d160ebf77459c637ba..5cf3bba624c26f9bdb8a4a7e6818f8bcc8c4e28d 100644 +index 743dccc6ddf4a06bc58436a1176e61135023c5e4..9cc9b2c72c19b8da36f2ed581610e0bfc8bf4cc5 100644 --- a/chrome/browser/profiles/profile_manager.h +++ b/chrome/browser/profiles/profile_manager.h -@@ -297,6 +297,7 @@ class ProfileManager : public content::NotificationObserver, +@@ -294,6 +294,7 @@ class ProfileManager : public content::NotificationObserver, void set_do_final_services_init(bool do_final_services_init) { do_final_services_init_ = do_final_services_init; } 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 497ba373b979..8f9ffc3c243e 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 57f7d7d9762300757c1a38d5d5a19baae13e7fd5..bc369298325e3fbf9eee41ac2fad0205adf542ae 100644 +index c7216d3988fb631a2ab03898846f4d1307d2f935..376e9936b06ab56c22d1810d7bb74de69f12f0f4 100644 --- a/chrome/browser/profiles/profile_shortcut_manager_win.cc +++ b/chrome/browser/profiles/profile_shortcut_manager_win.cc @@ -744,7 +744,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 1828b9bb3d75..00e2c7ea4e61 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 822c2e34203b49d78d0ea18bf9c625a22d578999..6286d48b69d713fda4bb021aec6364433d33e490 100644 +index b88a6eabbfed4462d524023ec52665a021ed2c05..7ec96b0e60ec90363b67907e9a60c59ad1a38c37 100644 --- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc +++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc -@@ -1655,6 +1655,7 @@ void RenderViewContextMenu::AppendSearchProvider() { +@@ -1675,6 +1675,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 3b54c691831c..5a4df2e57506 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,5 +1,5 @@ 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 9e8a0b54b79032e64b174d106c6c53c4f81403f7..3eef8d1705ef50a3bd13a28292b7fe234e282d7d 100644 +index 25f331b10b0132f5f59a3bfa78a7db4fc0182fdf..428e5adfd0f55e7ad2774e7df2a54dd635b06736 100644 --- a/chrome/browser/renderer_context_menu/render_view_context_menu.h +++ b/chrome/browser/renderer_context_menu/render_view_context_menu.h @@ -117,6 +117,7 @@ class RenderViewContextMenu : public RenderViewContextMenuBase { diff --git a/patches/chrome-browser-resources-bookmarks-toolbar.js.patch b/patches/chrome-browser-resources-bookmarks-toolbar.js.patch index 025b93a1568e..d2f2999cb17f 100644 --- a/patches/chrome-browser-resources-bookmarks-toolbar.js.patch +++ b/patches/chrome-browser-resources-bookmarks-toolbar.js.patch @@ -1,13 +1,13 @@ diff --git a/chrome/browser/resources/bookmarks/toolbar.js b/chrome/browser/resources/bookmarks/toolbar.js -index ea0ec8712710d19509f39fc218817dc2e68657e0..2b85ecc56921af457abe4e7047a3b349e22936b6 100644 +index 1969d05e733cd8571297523ad48c87ff62456b74..7da7ebc56e8308bd3c0f42051128826198421ad6 100644 --- a/chrome/browser/resources/bookmarks/toolbar.js +++ b/chrome/browser/resources/bookmarks/toolbar.js @@ -3,7 +3,7 @@ // found in the LICENSE file. import 'chrome://resources/cr_elements/cr_icon_button/cr_icon_button.m.js'; --import 'chrome://resources/cr_elements/cr_toolbar/cr_toolbar.m.js'; +-import 'chrome://resources/cr_elements/cr_toolbar/cr_toolbar.js'; +import 'chrome://brave-resources/br_elements/br_toolbar/br_toolbar.m.js'; import 'chrome://resources/cr_elements/cr_toolbar/cr_toolbar_search_field.m.js'; - import 'chrome://resources/cr_elements/cr_toolbar/cr_toolbar_selection_overlay.m.js'; + import 'chrome://resources/cr_elements/cr_toolbar/cr_toolbar_selection_overlay.js'; import 'chrome://resources/cr_elements/icons.m.js'; diff --git a/patches/chrome-browser-resources-downloads-toolbar.js.patch b/patches/chrome-browser-resources-downloads-toolbar.js.patch index 9492143c8206..9cd83d5dfffc 100644 --- a/patches/chrome-browser-resources-downloads-toolbar.js.patch +++ b/patches/chrome-browser-resources-downloads-toolbar.js.patch @@ -1,12 +1,12 @@ diff --git a/chrome/browser/resources/downloads/toolbar.js b/chrome/browser/resources/downloads/toolbar.js -index 9d6413739b71440ad88eb3bd57b0f415d425299c..8aecba85bed4c7d3461f2ec7f04734c1eeab0ff9 100644 +index 49290544679d9a044ec2066dfd83f1494424263b..8aecba85bed4c7d3461f2ec7f04734c1eeab0ff9 100644 --- a/chrome/browser/resources/downloads/toolbar.js +++ b/chrome/browser/resources/downloads/toolbar.js @@ -4,7 +4,7 @@ import 'chrome://resources/cr_elements/cr_action_menu/cr_action_menu.m.js'; import 'chrome://resources/cr_elements/cr_icon_button/cr_icon_button.m.js'; --import 'chrome://resources/cr_elements/cr_toolbar/cr_toolbar.m.js'; +-import 'chrome://resources/cr_elements/cr_toolbar/cr_toolbar.js'; +import 'chrome://brave-resources/br_elements/br_toolbar/br_toolbar.m.js'; import 'chrome://resources/cr_elements/hidden_style_css.m.js'; import 'chrome://resources/cr_elements/icons.m.js'; diff --git a/patches/chrome-browser-resources-extensions-BUILD.gn.patch b/patches/chrome-browser-resources-extensions-BUILD.gn.patch index 3846f215546c..0748e8e67a1c 100644 --- a/patches/chrome-browser-resources-extensions-BUILD.gn.patch +++ b/patches/chrome-browser-resources-extensions-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/extensions/BUILD.gn b/chrome/browser/resources/extensions/BUILD.gn -index 83764adfda9629c6ca291dff11720afee8e31491..0bfe5618d73288ae31ed869a0c746e46f4735aed 100644 +index d75482bdfbfa963daac8d96415634c79ede10a54..c11924a00d179daa9287f10d3c7c80229ae8c25a 100644 --- a/chrome/browser/resources/extensions/BUILD.gn +++ b/chrome/browser/resources/extensions/BUILD.gn @@ -34,6 +34,7 @@ if (optimize_webui) { diff --git a/patches/chrome-browser-resources-extensions-manager.js.patch b/patches/chrome-browser-resources-extensions-manager.js.patch index 49a37bebea1e..e42e26e6941b 100644 --- a/patches/chrome-browser-resources-extensions-manager.js.patch +++ b/patches/chrome-browser-resources-extensions-manager.js.patch @@ -1,12 +1,12 @@ diff --git a/chrome/browser/resources/extensions/manager.js b/chrome/browser/resources/extensions/manager.js -index 271dfba94a3cbd6b53b17f99ba94634c1bbc3b1a..1dd5c561924f4aed399836b70de51b00fe1ca0c7 100644 +index 3bef81eb86f46bddd44fee7a3f27a9d68c5e5546..1dd5c561924f4aed399836b70de51b00fe1ca0c7 100644 --- a/chrome/browser/resources/extensions/manager.js +++ b/chrome/browser/resources/extensions/manager.js @@ -5,7 +5,6 @@ import 'chrome://resources/cr_elements/cr_drawer/cr_drawer.m.js'; import 'chrome://resources/cr_elements/cr_lazy_render/cr_lazy_render.m.js'; import 'chrome://resources/cr_elements/cr_toast/cr_toast_manager.m.js'; --import 'chrome://resources/cr_elements/cr_toolbar/cr_toolbar.m.js'; +-import 'chrome://resources/cr_elements/cr_toolbar/cr_toolbar.js'; import 'chrome://resources/cr_elements/cr_view_manager/cr_view_manager.m.js'; import 'chrome://resources/cr_elements/hidden_style_css.m.js'; import 'chrome://resources/cr_elements/shared_vars_css.m.js'; diff --git a/patches/chrome-browser-resources-extensions-toolbar.js.patch b/patches/chrome-browser-resources-extensions-toolbar.js.patch index 246f74bdef13..8e11f4d8ec06 100644 --- a/patches/chrome-browser-resources-extensions-toolbar.js.patch +++ b/patches/chrome-browser-resources-extensions-toolbar.js.patch @@ -1,12 +1,12 @@ diff --git a/chrome/browser/resources/extensions/toolbar.js b/chrome/browser/resources/extensions/toolbar.js -index f67703752bbfcbe3e15a8b7e46a462834775803a..00647f14600d61b39f4f329b865cb80d2568648d 100644 +index 25a38b7082bb22450aff1560843ef8c67e9bd405..00647f14600d61b39f4f329b865cb80d2568648d 100644 --- a/chrome/browser/resources/extensions/toolbar.js +++ b/chrome/browser/resources/extensions/toolbar.js @@ -4,7 +4,7 @@ import 'chrome://resources/cr_elements/cr_button/cr_button.m.js'; import 'chrome://resources/cr_elements/cr_toggle/cr_toggle.m.js'; --import 'chrome://resources/cr_elements/cr_toolbar/cr_toolbar.m.js'; +-import 'chrome://resources/cr_elements/cr_toolbar/cr_toolbar.js'; +import 'chrome://brave-resources/br_elements/br_toolbar/br_toolbar.m.js'; import 'chrome://resources/cr_elements/hidden_style_css.m.js'; import 'chrome://resources/cr_elements/policy/cr_tooltip_icon.m.js'; diff --git a/patches/chrome-browser-resources-history-history_item.html.patch b/patches/chrome-browser-resources-history-history_item.html.patch index d8cb8c8eda5c..33e9d6568b39 100644 --- a/patches/chrome-browser-resources-history-history_item.html.patch +++ b/patches/chrome-browser-resources-history-history_item.html.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/history/history_item.html b/chrome/browser/resources/history/history_item.html -index 9a62b0c0f359026eb0e54abccd4d2c889197b8c9..d44b693879722bc03a8a206bc0aa2336dcf009b3 100644 +index 3f93cc2c17ea31016bb580ee3bceed3ad92c3bf8..5a65b819d3a6579a40c7e7f20eb2116508d577b5 100644 --- a/chrome/browser/resources/history/history_item.html +++ b/chrome/browser/resources/history/history_item.html @@ -1,4 +1,4 @@ diff --git a/patches/chrome-browser-resources-history-history_toolbar.js.patch b/patches/chrome-browser-resources-history-history_toolbar.js.patch index da4c39a4f62b..a32e6567a403 100644 --- a/patches/chrome-browser-resources-history-history_toolbar.js.patch +++ b/patches/chrome-browser-resources-history-history_toolbar.js.patch @@ -1,12 +1,12 @@ diff --git a/chrome/browser/resources/history/history_toolbar.js b/chrome/browser/resources/history/history_toolbar.js -index c7c81ad026834767938ba994cf4d23945af5b96a..37a9bcf669d2242aabd5b3513308ff4485e0fda2 100644 +index b32eebcf69cd42e72ad7231c4623209c188de23e..37a9bcf669d2242aabd5b3513308ff4485e0fda2 100644 --- a/chrome/browser/resources/history/history_toolbar.js +++ b/chrome/browser/resources/history/history_toolbar.js @@ -3,7 +3,7 @@ // found in the LICENSE file. import 'chrome://resources/cr_elements/cr_lazy_render/cr_lazy_render.m.js'; --import 'chrome://resources/cr_elements/cr_toolbar/cr_toolbar.m.js'; +-import 'chrome://resources/cr_elements/cr_toolbar/cr_toolbar.js'; +import 'chrome://brave-resources/br_elements/br_toolbar/br_toolbar.m.js' import './shared_style.js'; import './strings.js'; diff --git a/patches/chrome-browser-resources-pdf-manifest.json.patch b/patches/chrome-browser-resources-pdf-manifest.json.patch index 43be3152df97..32df29b268d6 100644 --- a/patches/chrome-browser-resources-pdf-manifest.json.patch +++ b/patches/chrome-browser-resources-pdf-manifest.json.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/pdf/manifest.json b/chrome/browser/resources/pdf/manifest.json -index 6c3b296b945034786037f26342fd92b0826ca400..09d2424c4d9be6fe1efd1f08090d0875a2d16ccc 100644 +index bd9d36beddbde98d349fd121fe3a95d11f5e68f3..fc4e94967a1f68ee168226497bb88316e1c82ed7 100644 --- a/chrome/browser/resources/pdf/manifest.json +++ b/chrome/browser/resources/pdf/manifest.json @@ -8,6 +8,7 @@ @@ -14,7 +14,7 @@ index 6c3b296b945034786037f26342fd92b0826ca400..09d2424c4d9be6fe1efd1f08090d0875 "mime_types": [ "application/pdf" ], -- "content_security_policy": "script-src 'self' 'wasm-eval' blob: filesystem: chrome://resources; object-src * blob: externalfile: file: filesystem: data:; plugin-types application/x-google-chrome-pdf", -+ "content_security_policy": "script-src 'self' 'wasm-eval' blob: filesystem: chrome://brave-resources chrome://resources; object-src * blob: externalfile: file: filesystem: data:; plugin-types application/x-google-chrome-pdf", +- "content_security_policy": "script-src 'self' 'wasm-eval' blob: filesystem: chrome://resources; object-src * blob: externalfile: file: filesystem: data:", ++ "content_security_policy": "script-src 'self' 'wasm-eval' blob: filesystem: chrome://brave-resources chrome://resources; object-src * blob: externalfile: file: filesystem: data:", "mime_types_handler": "index.html" } diff --git a/patches/chrome-browser-resources-settings-BUILD.gn.patch b/patches/chrome-browser-resources-settings-BUILD.gn.patch index daa1840d6555..66071bf155b0 100644 --- a/patches/chrome-browser-resources-settings-BUILD.gn.patch +++ b/patches/chrome-browser-resources-settings-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/settings/BUILD.gn b/chrome/browser/resources/settings/BUILD.gn -index 130164102f62d897802dfec76eab9bafdb363b80..c3a233865fb55453983ad48fbd747b51f02bc040 100644 +index b752f26146d90c86475be28fe2a5da68e0358749..64fbf76dfbed0a52a173e63cf34d71dc81971c74 100644 --- a/chrome/browser/resources/settings/BUILD.gn +++ b/chrome/browser/resources/settings/BUILD.gn @@ -46,6 +46,7 @@ if (optimize_webui) { 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 5e61770afd76..9073db795522 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 8dbac3f62cacbcec57340ed728acbe41ba93e4b3..92eb3353098aaf61c676ececbdff5e668b318ee5 100644 +index aa41922b9cd2b17327b3d418b02064938eadcbb2..980fdbcf4ff5691692f02bc40504c66aa1864b12 100644 --- a/chrome/browser/resources/settings/privacy_page/privacy_page.html +++ b/chrome/browser/resources/settings/privacy_page/privacy_page.html @@ -29,6 +29,7 @@ @@ -10,7 +10,7 @@ index 8dbac3f62cacbcec57340ed728acbe41ba93e4b3..92eb3353098aaf61c676ececbdff5e66 @@ -18,7 +18,7 @@ index 8dbac3f62cacbcec57340ed728acbe41ba93e4b3..92eb3353098aaf61c676ececbdff5e66 @@ -26,7 +26,7 @@ index 8dbac3f62cacbcec57340ed728acbe41ba93e4b3..92eb3353098aaf61c676ececbdff5e66 diff --git a/patches/chrome-browser-resources-settings-privacy_page-privacy_page.js.patch b/patches/chrome-browser-resources-settings-privacy_page-privacy_page.js.patch index d9039b3988a3..7595894602c3 100644 --- a/patches/chrome-browser-resources-settings-privacy_page-privacy_page.js.patch +++ b/patches/chrome-browser-resources-settings-privacy_page-privacy_page.js.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.js b/chrome/browser/resources/settings/privacy_page/privacy_page.js -index 4d489414e5fefc117e71bb477d51a21d190135a5..db94b7534f85987919a52d61ddc7637fdbadcc5f 100644 +index 5480679df73f36da15015667e5b0b9d3cf06acf7..3cc9006da60b67d98a58d631bddd4ccd24eae26c 100644 --- a/chrome/browser/resources/settings/privacy_page/privacy_page.js +++ b/chrome/browser/resources/settings/privacy_page/privacy_page.js @@ -18,6 +18,7 @@ import '../site_settings/settings_category_default_radio_group.js'; diff --git a/patches/chrome-browser-resources-settings-settings.js.patch b/patches/chrome-browser-resources-settings-settings.js.patch index bf257ef0a857..40113ceb58b0 100644 --- a/patches/chrome-browser-resources-settings-settings.js.patch +++ b/patches/chrome-browser-resources-settings-settings.js.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/settings/settings.js b/chrome/browser/resources/settings/settings.js -index 37a14280b46f555d20cc4028164dcf18f316e4aa..9a13c082a51f1b3ee94b30442a8ceb335b339bf2 100644 +index 6eab3208062ea0852e065ca1488c45f0348f9deb..a370c4423c21f8310b9fd41160d65370f74e1ea0 100644 --- a/chrome/browser/resources/settings/settings.js +++ b/chrome/browser/resources/settings/settings.js @@ -2,6 +2,7 @@ diff --git a/patches/chrome-browser-resources-settings-settings_ui-settings_ui.js.patch b/patches/chrome-browser-resources-settings-settings_ui-settings_ui.js.patch index aa16ed90cbdd..a8434940d8b9 100644 --- a/patches/chrome-browser-resources-settings-settings_ui-settings_ui.js.patch +++ b/patches/chrome-browser-resources-settings-settings_ui-settings_ui.js.patch @@ -1,12 +1,12 @@ diff --git a/chrome/browser/resources/settings/settings_ui/settings_ui.js b/chrome/browser/resources/settings/settings_ui/settings_ui.js -index d013270ffc416652f0597d7e70c80548ed8531ea..95e38d61bbafbab7d62e1f8c6b7c0bfd57c7e0f1 100644 +index 05560e75967d8033d66181168a6d68032d2e57be..95e38d61bbafbab7d62e1f8c6b7c0bfd57c7e0f1 100644 --- a/chrome/browser/resources/settings/settings_ui/settings_ui.js +++ b/chrome/browser/resources/settings/settings_ui/settings_ui.js @@ -12,7 +12,7 @@ */ import 'chrome://resources/cr_elements/cr_drawer/cr_drawer.m.js'; import 'chrome://resources/cr_elements/cr_page_host_style_css.m.js'; --import 'chrome://resources/cr_elements/cr_toolbar/cr_toolbar.m.js'; +-import 'chrome://resources/cr_elements/cr_toolbar/cr_toolbar.js'; +import 'chrome://brave-resources/br_elements/br_toolbar/br_toolbar.m.js'; import 'chrome://resources/cr_elements/icons.m.js'; import 'chrome://resources/cr_elements/shared_vars_css.m.js'; diff --git a/patches/chrome-browser-resources-settings-site_settings-site_details.html.patch b/patches/chrome-browser-resources-settings-site_settings-site_details.html.patch index e47635275fa6..0d33d17faa35 100644 --- a/patches/chrome-browser-resources-settings-site_settings-site_details.html.patch +++ b/patches/chrome-browser-resources-settings-site_settings-site_details.html.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/settings/site_settings/site_details.html b/chrome/browser/resources/settings/site_settings/site_details.html -index cf100e2d142e73016c57c088898cd2b609dc3535..d32fcb554bad9caaf69df269991d46f6cb3a0c38 100644 +index 43c5837ff628f9c2609fb09376cebacd3608dab1..9028403ecaabc48315576ab04a8f277b9469441b 100644 --- a/chrome/browser/resources/settings/site_settings/site_details.html +++ b/chrome/browser/resources/settings/site_settings/site_details.html @@ -186,6 +186,11 @@ 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 new file mode 100644 index 000000000000..deeee5361b42 --- /dev/null +++ b/patches/chrome-browser-resources-signin-profile_picker-profile_creation_flow-local_profile_customization.html.patch @@ -0,0 +1,12 @@ +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 429b10a04532c4396002e74ff4693241a6a0cf85..4e34cad1382dd943957015ea499cd496bf22c330 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 +@@ -152,6 +152,7 @@ + #doneButton { + width : 32px; + } ++ .banner { visibility: hidden; } + + @media (prefers-color-scheme: dark) { + #nameInput { diff --git a/patches/chrome-browser-resources-signin-profile_picker-profile_picker_main_view.js.patch b/patches/chrome-browser-resources-signin-profile_picker-profile_picker_main_view.js.patch new file mode 100644 index 000000000000..3030fe0b3f2f --- /dev/null +++ b/patches/chrome-browser-resources-signin-profile_picker-profile_picker_main_view.js.patch @@ -0,0 +1,12 @@ +diff --git a/chrome/browser/resources/signin/profile_picker/profile_picker_main_view.js b/chrome/browser/resources/signin/profile_picker/profile_picker_main_view.js +index f1c5345ec0b62325e5829325723c90b6a5de30c1..6b392a9882925c09fde10ce45e8db41d96fee11b 100644 +--- a/chrome/browser/resources/signin/profile_picker/profile_picker_main_view.js ++++ b/chrome/browser/resources/signin/profile_picker/profile_picker_main_view.js +@@ -87,6 +87,7 @@ Polymer({ + + this.manageProfilesBrowserProxy_ = + ManageProfilesBrowserProxyImpl.getInstance(); ++ this.$$('#addProfile').style.borderRadius = '8px'; + }, + + /** @override */ diff --git a/patches/chrome-browser-resources-tools-rollup_plugin.js.patch b/patches/chrome-browser-resources-tools-rollup_plugin.js.patch index ccfc0a32156f..16924820e271 100644 --- a/patches/chrome-browser-resources-tools-rollup_plugin.js.patch +++ b/patches/chrome-browser-resources-tools-rollup_plugin.js.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/resources/tools/rollup_plugin.js b/chrome/browser/resources/tools/rollup_plugin.js -index ca1db0d08aa98e75e18ca5f46e8e23dc09df71d5..144402c5b0aac4b4929eff80d74bbba251ad7616 100644 +index 16216595d5a8a7e064365301f2b560274007ca9e..0aa5862ef40e6b73fb4447c260a32f67a5bf5772 100644 --- a/chrome/browser/resources/tools/rollup_plugin.js +++ b/chrome/browser/resources/tools/rollup_plugin.js -@@ -81,6 +81,7 @@ export default function plugin(rootPath, hostUrl, excludes, externalPaths) { +@@ -83,6 +83,7 @@ export default function plugin(rootPath, hostUrl, excludes, externalPaths) { if (origin) { origin = normalizeSlashes(origin); } diff --git a/patches/chrome-browser-resources_util.cc.patch b/patches/chrome-browser-resources_util.cc.patch index 354419c3b60c..2b5ee04f2c40 100644 --- a/patches/chrome-browser-resources_util.cc.patch +++ b/patches/chrome-browser-resources_util.cc.patch @@ -1,12 +1,12 @@ diff --git a/chrome/browser/resources_util.cc b/chrome/browser/resources_util.cc -index 88e0b09142bd973658d4c7a4e77a92b7dfa6b6bf..de67ae17e7385e6a53d100bd0ff34fddc02beebf 100644 +index 5c15c999788f6ecc421b7766ebbeac95a96a4ac9..5ce35d92b52739bcd42d8cd745db48e005652cf4 100644 --- a/chrome/browser/resources_util.cc +++ b/chrome/browser/resources_util.cc @@ -50,6 +50,7 @@ class ThemeMap { for (size_t i = 0; i < kUiResourcesSize; ++i) { - storage.emplace_back(kUiResources[i].name, kUiResources[i].value); + storage.emplace_back(kUiResources[i].path, kUiResources[i].id); } + BRAVE_RESOURCES_UTIL #if BUILDFLAG(IS_CHROMEOS_ASH) for (size_t i = 0; i < kUiChromeosResourcesSize; ++i) { - storage.emplace_back(kUiChromeosResources[i].name, + storage.emplace_back(kUiChromeosResources[i].path, 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 cf6440555ee2..5f0c8e3f337d 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 fdd00658f55fe6e7db0ed107fa9e9341aebf7aca..f8868594c10cde468579e214b110b79b291b55c7 100644 +index ebbf00be803573b1056426b7e1cd39710a628667..5ad041b8d828a4d74aa4236122b18575b19621b9 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 @@ -328,6 +328,7 @@ void CheckClientDownloadRequestBase::OnRequestBuilt( diff --git a/patches/chrome-browser-sync-profile_sync_service_factory.cc.patch b/patches/chrome-browser-sync-profile_sync_service_factory.cc.patch index e14cc4a82fd1..5c5acef8ff9a 100644 --- a/patches/chrome-browser-sync-profile_sync_service_factory.cc.patch +++ b/patches/chrome-browser-sync-profile_sync_service_factory.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/sync/profile_sync_service_factory.cc b/chrome/browser/sync/profile_sync_service_factory.cc -index 84da168241e6fcdc7f77e2e492a4af7d6d48291f..71d26f009c3dab752a3aa90af7f3f842bd853390 100644 +index 89e796cc53fc107597838419f7ce0c00db05c518..6265dcd01a9c4d803f2c57e02f3fe8e11ecc6b39 100644 --- a/chrome/browser/sync/profile_sync_service_factory.cc +++ b/chrome/browser/sync/profile_sync_service_factory.cc -@@ -276,7 +276,7 @@ KeyedService* ProfileSyncServiceFactory::BuildServiceInstanceFor( +@@ -264,7 +264,7 @@ KeyedService* ProfileSyncServiceFactory::BuildServiceInstanceFor( } auto pss = diff --git a/patches/chrome-browser-ui-BUILD.gn.patch b/patches/chrome-browser-ui-BUILD.gn.patch index 9c173d135264..f5c862c93e91 100644 --- a/patches/chrome-browser-ui-BUILD.gn.patch +++ b/patches/chrome-browser-ui-BUILD.gn.patch @@ -1,16 +1,16 @@ diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn -index ae28f5ea7dbbdc38080f63333af538a949f44f12..90ba47d7db21e7ec1178067163ad5106e775d64d 100644 +index c9220d6a60396bc0a9a553e63f7bbcd83655f685..66594e219279ff9ca9e6e7e05a268cde18488b28 100644 --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn -@@ -587,6 +587,7 @@ static_library("ui") { +@@ -598,6 +598,7 @@ static_library("ui") { "//ui/webui/resources/cr_components/customize_themes:mojom", "//v8:v8_version", ] + deps+= [ "//brave/browser/ui" ] - allow_circular_includes_from += - [ "//chrome/browser/ui/webui/bluetooth_internals" ] -@@ -3289,10 +3290,13 @@ static_library("ui") { + # TODO(crbug/925153): Remove this circular dependency. + allow_circular_includes_from = [ +@@ -3315,10 +3316,13 @@ static_library("ui") { ] deps += [ "//google_update" ] } else { diff --git a/patches/chrome-browser-ui-android-appmenu-internal-BUILD.gn.patch b/patches/chrome-browser-ui-android-appmenu-internal-BUILD.gn.patch index 6b57d366a0f4..692af0716eea 100644 --- a/patches/chrome-browser-ui-android-appmenu-internal-BUILD.gn.patch +++ b/patches/chrome-browser-ui-android-appmenu-internal-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/ui/android/appmenu/internal/BUILD.gn b/chrome/browser/ui/android/appmenu/internal/BUILD.gn -index a677a598fc874690a4c40f260162126c5a686930..10ccf5a71816f916a2a0b21807feeb5eb80aeb69 100644 +index c6e18f19c1492a339ece492cbd90855147743137..1c3baabc78f76de00d150c8e4e296d62d10c7667 100644 --- a/chrome/browser/ui/android/appmenu/internal/BUILD.gn +++ b/chrome/browser/ui/android/appmenu/internal/BUILD.gn @@ -21,6 +21,7 @@ android_library("java") { diff --git a/patches/chrome-browser-ui-android-appmenu-internal-java-src-org-chromium-chrome-browser-ui-appmenu-AppMenu.java.patch b/patches/chrome-browser-ui-android-appmenu-internal-java-src-org-chromium-chrome-browser-ui-appmenu-AppMenu.java.patch index cf515e9233bf..2944006eb963 100644 --- a/patches/chrome-browser-ui-android-appmenu-internal-java-src-org-chromium-chrome-browser-ui-appmenu-AppMenu.java.patch +++ b/patches/chrome-browser-ui-android-appmenu-internal-java-src-org-chromium-chrome-browser-ui-appmenu-AppMenu.java.patch @@ -1,10 +1,10 @@ diff --git a/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/chrome/browser/ui/appmenu/AppMenu.java b/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/chrome/browser/ui/appmenu/AppMenu.java -index 82bea4eba71170f51649eddc6f9cc1e64f0fc30c..5675c073678e1aa589a22c7d4c40495efb278c41 100644 +index 8195ba51211467d3a987c3915412ab500e745ce5..e7fd504035747b4f600f771038bab54200949593 100644 --- a/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/chrome/browser/ui/appmenu/AppMenu.java +++ b/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/chrome/browser/ui/appmenu/AppMenu.java -@@ -217,6 +217,7 @@ class AppMenu implements OnItemClickListener, OnKeyListener, AppMenuClickHandler - mPopup.setBackgroundDrawable(ApiCompatibilityUtils.getDrawable( - context.getResources(), R.drawable.popup_bg_tinted)); +@@ -220,6 +220,7 @@ class AppMenu implements OnItemClickListener, OnKeyListener, AppMenuClickHandler + mPopup.setOutsideTouchable(true); + if (!isByPermanentButton) mPopup.setAnimationStyle(R.style.OverflowMenuAnim); + if (!isByPermanentButton) mPopup.setAnimationStyle(BraveAppMenu.getAnimationStyle()); diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-toolbar-ToolbarColors.java.patch b/patches/chrome-browser-ui-android-theme-java-src-org-chromium-chrome-browser-theme-ThemeUtils.java.patch similarity index 51% rename from patches/chrome-android-java-src-org-chromium-chrome-browser-toolbar-ToolbarColors.java.patch rename to patches/chrome-browser-ui-android-theme-java-src-org-chromium-chrome-browser-theme-ThemeUtils.java.patch index 00c258df3568..a026111dd3ad 100644 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-toolbar-ToolbarColors.java.patch +++ b/patches/chrome-browser-ui-android-theme-java-src-org-chromium-chrome-browser-theme-ThemeUtils.java.patch @@ -1,8 +1,8 @@ -diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarColors.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarColors.java -index 08955b2f5a90b4d5dcfda253fd410bd4724557fe..4fa28fa9f8153af8869e7864fa0d62ec8804db85 100644 ---- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarColors.java -+++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarColors.java -@@ -56,6 +56,7 @@ public class ToolbarColors { +diff --git a/chrome/browser/ui/android/theme/java/src/org/chromium/chrome/browser/theme/ThemeUtils.java b/chrome/browser/ui/android/theme/java/src/org/chromium/chrome/browser/theme/ThemeUtils.java +index b4bfb43ec3a856c15e0c9ca50b3003171160124e..24ca6f19e490da30803ff136da0c6a03b85147f0 100644 +--- a/chrome/browser/ui/android/theme/java/src/org/chromium/chrome/browser/theme/ThemeUtils.java ++++ b/chrome/browser/ui/android/theme/java/src/org/chromium/chrome/browser/theme/ThemeUtils.java +@@ -74,6 +74,7 @@ public class ThemeUtils { Resources res, @ColorInt int color, boolean isIncognito) { // Text box color on default toolbar background in incognito mode is a pre-defined // color. We calculate the equivalent opaque color from the pre-defined translucent color. diff --git a/patches/chrome-browser-ui-android-toolbar-BUILD.gn.patch b/patches/chrome-browser-ui-android-toolbar-BUILD.gn.patch index 01494e2c096b..8412f360f03c 100644 --- a/patches/chrome-browser-ui-android-toolbar-BUILD.gn.patch +++ b/patches/chrome-browser-ui-android-toolbar-BUILD.gn.patch @@ -1,9 +1,9 @@ diff --git a/chrome/browser/ui/android/toolbar/BUILD.gn b/chrome/browser/ui/android/toolbar/BUILD.gn -index abd6f292fd90d245a499a6227b2b40a1c2939b19..4ef5c825677f7c5776de9556104fd7ed35b36c3e 100644 +index 55c37bed11334204f80f9a55ce7bf5de35724145..45e42f20ffa931d6259169b583a8eb48329f44cc 100644 --- a/chrome/browser/ui/android/toolbar/BUILD.gn +++ b/chrome/browser/ui/android/toolbar/BUILD.gn -@@ -30,6 +30,7 @@ android_library("java") { - "java/src/org/chromium/chrome/browser/toolbar/top/ToolbarActionModeCallback.java", +@@ -60,6 +60,7 @@ android_library("java") { + "java/src/org/chromium/chrome/browser/toolbar/top/TopToolbarSceneLayer.java", "java/src/org/chromium/chrome/browser/toolbar/top/ViewShiftingActionBarDelegate.java", ] + sources += brave_browser_ui_android_toolbar_sources diff --git a/patches/chrome-browser-ui-browser.cc.patch b/patches/chrome-browser-ui-browser.cc.patch index 49a10e1eb44d..1f9880c8f9da 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 409f908148b3d2885216a12048fc3f2e3ea47c89..7fd7cde18b84749ca7c4146e46d35e89460b4448 100644 +index 2f2862c426124556e1109dd243475d8514c814d8..d004e4e662564d9c3693fc6ed25f5e56504e4054 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc -@@ -431,6 +431,7 @@ Browser::CreationStatus Browser::GetCreationStatusForProfile(Profile* profile) { +@@ -429,6 +429,7 @@ Browser::CreationStatus Browser::GetCreationStatusForProfile(Profile* profile) { // static Browser* Browser::Create(const CreateParams& params) { CHECK_EQ(CreationStatus::kOk, GetCreationStatusForProfile(params.profile)); @@ -10,7 +10,7 @@ index 409f908148b3d2885216a12048fc3f2e3ea47c89..7fd7cde18b84749ca7c4146e46d35e89 return new Browser(params); } -@@ -442,7 +443,7 @@ Browser::Browser(const CreateParams& params) +@@ -440,7 +441,7 @@ Browser::Browser(const CreateParams& params) tab_strip_model_delegate_( std::make_unique(this)), tab_strip_model_( diff --git a/patches/chrome-browser-ui-browser.h.patch b/patches/chrome-browser-ui-browser.h.patch index f58e5ebb45e0..a113a10aae15 100644 --- a/patches/chrome-browser-ui-browser.h.patch +++ b/patches/chrome-browser-ui-browser.h.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h -index 1ccab44183bf3d47762cff2198231e3fda9c53fc..5b395427090e79fb1fa0bbd32134a811c8e4ac33 100644 +index 3a0202c2139b3a6d62f10d9ce965e689dc96bf4a..415c4e503392698fc4c5222acf976b459f071daa 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h -@@ -697,6 +697,7 @@ class Browser : public TabStripModelObserver, +@@ -703,6 +703,7 @@ class Browser : public TabStripModelObserver, StatusBubble* GetStatusBubbleForTesting(); diff --git a/patches/chrome-browser-ui-browser_navigator.cc.patch b/patches/chrome-browser-ui-browser_navigator.cc.patch index db240fe914fa..501014b3ab80 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 4bf854459b2ca8c73c5fb559266d8682d6999d52..340224731d68ed1eaf42cce251ea1d4759de4d48 100644 +index 019834353c0280109a5598c8b1920d703849fcc7..1e84cc6e768e550a266acc6499a0f076d82755be 100644 --- a/chrome/browser/ui/browser_navigator.cc +++ b/chrome/browser/ui/browser_navigator.cc -@@ -487,6 +487,7 @@ void Navigate(NavigateParams* params) { +@@ -488,6 +488,7 @@ void Navigate(NavigateParams* params) { // Block any navigation requests in locked fullscreen mode. return; } @@ -10,7 +10,7 @@ index 4bf854459b2ca8c73c5fb559266d8682d6999d52..340224731d68ed1eaf42cce251ea1d47 // Open System Apps in their standalone window if necessary. // TODO(crbug.com/1096345): Remove this code after we integrate with intent -@@ -758,6 +759,7 @@ void Navigate(NavigateParams* params) { +@@ -752,6 +753,7 @@ void 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-chrome_pages.cc.patch b/patches/chrome-browser-ui-chrome_pages.cc.patch index e421644fc1ef..94788b8d31b7 100644 --- a/patches/chrome-browser-ui-chrome_pages.cc.patch +++ b/patches/chrome-browser-ui-chrome_pages.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/chrome_pages.cc b/chrome/browser/ui/chrome_pages.cc -index 5246dbb25678df449300bdc1ec00fbf2b8f5611c..ecfa3d9fbb4a8b7236d1beab969403ba7d9e0ca2 100644 +index 4cc51634446256d59b2c8b13903c014d67081618..7d0ba9c605c92646abc58bd382056c10791dd19d 100644 --- a/chrome/browser/ui/chrome_pages.cc +++ b/chrome/browser/ui/chrome_pages.cc -@@ -300,7 +300,7 @@ void ShowSlow(Browser* browser) { +@@ -307,7 +307,7 @@ void ShowSlow(Browser* browser) { #endif } diff --git a/patches/chrome-browser-ui-cocoa-main_menu_builder.mm.patch b/patches/chrome-browser-ui-cocoa-main_menu_builder.mm.patch index 2948d40db179..8cef2e150264 100644 --- a/patches/chrome-browser-ui-cocoa-main_menu_builder.mm.patch +++ b/patches/chrome-browser-ui-cocoa-main_menu_builder.mm.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/cocoa/main_menu_builder.mm b/chrome/browser/ui/cocoa/main_menu_builder.mm -index ceb7da90363cbf5b5cde7442fd7ae43f95ddf21b..3b7180e3cdfe810a40e7f8f7e76e2000b1ef017c 100644 +index 613fb241c2c83b2431316bf65e33a6a9c0f133d5..a80069fb800e8c9976ccfb892a3130085bbd5a33 100644 --- a/chrome/browser/ui/cocoa/main_menu_builder.mm +++ b/chrome/browser/ui/cocoa/main_menu_builder.mm -@@ -106,6 +106,7 @@ base::scoped_nsobject BuildFileMenu( +@@ -107,6 +107,7 @@ base::scoped_nsobject BuildFileMenu( Item(IDS_NEW_INCOGNITO_WINDOW_MAC) .command_id(IDC_NEW_INCOGNITO_WINDOW) .remove_if(is_pwa), @@ -10,7 +10,7 @@ index ceb7da90363cbf5b5cde7442fd7ae43f95ddf21b..3b7180e3cdfe810a40e7f8f7e76e2000 Item(IDS_REOPEN_CLOSED_TABS_MAC) .command_id(IDC_RESTORE_TAB) .remove_if(is_pwa), -@@ -473,6 +474,7 @@ base::scoped_nsobject BuildHelpMenu( +@@ -476,6 +477,7 @@ base::scoped_nsobject BuildHelpMenu( #if BUILDFLAG(GOOGLE_CHROME_BRANDING) Item(IDS_FEEDBACK_MAC).command_id(IDC_FEEDBACK), #endif 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 f0f27728eddc..1ee9cdc9cc38 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,5 +1,5 @@ diff --git a/chrome/browser/ui/extensions/extension_action_view_controller.cc b/chrome/browser/ui/extensions/extension_action_view_controller.cc -index 7c00f25811fa41badd45c26930f34cc0f2c1cce3..f9d71e194560e95726b76ec7db5eafcd0c14bf3d 100644 +index 43b2117ff3b33f9218c48ce60411319a0e4e5251..790307ee419c19e83295291547a9143947681187 100644 --- a/chrome/browser/ui/extensions/extension_action_view_controller.cc +++ b/chrome/browser/ui/extensions/extension_action_view_controller.cc @@ -61,7 +61,6 @@ ExtensionActionViewController::ExtensionActionViewController( 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 7d02778797ac..914d50a0e386 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 a6f4dd0677bc45921618b48c7ff4d4c781a75f34..7304aa2be0345bc236972cfee5b34a126ce25ffc 100644 +index f4b05907c672aa40febf46391aaad76c99038980..37deb6ee7e0b809918411944e35394d2cd264426 100644 --- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc +++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc -@@ -336,6 +336,7 @@ void StartupBrowserCreatorImpl::DetermineURLsAndLaunch( +@@ -338,6 +338,7 @@ void StartupBrowserCreatorImpl::DetermineURLsAndLaunch( #if !BUILDFLAG(IS_CHROMEOS_ASH) welcome_enabled = welcome::IsEnabled(profile_) && welcome::HasModulesToShow(profile_); diff --git a/patches/chrome-browser-ui-startup-startup_tab_provider.cc.patch b/patches/chrome-browser-ui-startup-startup_tab_provider.cc.patch index 95337f368734..6562fc8b382a 100644 --- a/patches/chrome-browser-ui-startup-startup_tab_provider.cc.patch +++ b/patches/chrome-browser-ui-startup-startup_tab_provider.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/startup/startup_tab_provider.cc b/chrome/browser/ui/startup/startup_tab_provider.cc -index b16e6b9deb6c951007ab6932f028982ca7c74671..833666f7469189cb319ea7f1a5fb00ce182972d0 100644 +index 30374a1f9611cf8a4875169cb77b43a6d377a1fe..79e81552bb82b0d439b16b28d38ef6fba247f0d8 100644 --- a/chrome/browser/ui/startup/startup_tab_provider.cc +++ b/chrome/browser/ui/startup/startup_tab_provider.cc -@@ -144,6 +144,7 @@ StartupTabs StartupTabProviderImpl::GetExtensionCheckupTabs( +@@ -145,6 +145,7 @@ StartupTabs StartupTabProviderImpl::GetExtensionCheckupTabs( bool StartupTabProviderImpl::CanShowWelcome(bool is_signin_allowed, bool is_supervised_user, bool is_force_signin_enabled) { diff --git a/patches/chrome-browser-ui-tab_helpers.cc.patch b/patches/chrome-browser-ui-tab_helpers.cc.patch index f8736e84390d..fcfaa428ba5e 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 12c5a73b9c487e42593cbc8689cdfacd57715626..5bc1bb91528e0afed6b9a5410971545729e58fcb 100644 +index 1d8f6ee93fe8cc67405053e09845b7b8c700c027..153d553e8d7b847fcaed0b95eb324584325fe32e 100644 --- a/chrome/browser/ui/tab_helpers.cc +++ b/chrome/browser/ui/tab_helpers.cc -@@ -494,4 +494,5 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { +@@ -498,4 +498,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-views-bookmarks-bookmark_bar_view.cc.patch b/patches/chrome-browser-ui-views-bookmarks-bookmark_bar_view.cc.patch index 74d0adea3bd7..12190c363863 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 fed20e1702504c1a655bbe35c338cb94dcbcd731..f7cd591ef4af31df62dd6644f9ec54d0ac7a8547 100644 +index 8de3a60632b24c2c8006f5c9fc4b9c67c0c3c704..7a45dddcc3127f9a8f9a9447ae8a6f92655ecca5 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc +++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc -@@ -854,6 +854,7 @@ void BookmarkBarView::Layout() { +@@ -856,6 +856,7 @@ void BookmarkBarView::Layout() { x = next_x; } } diff --git a/patches/chrome-browser-ui-views-download-download_item_view.h.patch b/patches/chrome-browser-ui-views-download-download_item_view.h.patch index 3a4ce26037a4..863950e187b1 100644 --- a/patches/chrome-browser-ui-views-download-download_item_view.h.patch +++ b/patches/chrome-browser-ui-views-download-download_item_view.h.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/views/download/download_item_view.h b/chrome/browser/ui/views/download/download_item_view.h -index 536f6f2b853c37dce0f705a3de46bdf462a376c6..d809a7243c6ccd42e4cc2e05a338a67d87d33898 100644 +index dff79a4cc6b0c9d6661535285ecf0f9fe534abab..acf63aefd2681280e0a43151d907f395b41ecbb7 100644 --- a/chrome/browser/ui/views/download/download_item_view.h +++ b/chrome/browser/ui/views/download/download_item_view.h -@@ -112,6 +112,7 @@ class DownloadItemView : public views::View, +@@ -115,6 +115,7 @@ class DownloadItemView : public views::View, void OnPaintBackground(gfx::Canvas* canvas) override; void OnPaint(gfx::Canvas* canvas) override; void OnThemeChanged() override; diff --git a/patches/chrome-browser-ui-views-extensions-extension_popup.cc.patch b/patches/chrome-browser-ui-views-extensions-extension_popup.cc.patch index 19f1a21aafc9..a8a9a4b5b6bd 100644 --- a/patches/chrome-browser-ui-views-extensions-extension_popup.cc.patch +++ b/patches/chrome-browser-ui-views-extensions-extension_popup.cc.patch @@ -1,12 +1,12 @@ diff --git a/chrome/browser/ui/views/extensions/extension_popup.cc b/chrome/browser/ui/views/extensions/extension_popup.cc -index a3f23f681a5a63009d6d25a1f63479e8585e59e6..e9ea080103ad82bc91266205d2e7e3cb8a0d4da8 100644 +index 36284fc6e88fb565f178430a71b7420082782600..d8bd6ffedbe5c0b741d231d87baf1b6eeee21d5f 100644 --- a/chrome/browser/ui/views/extensions/extension_popup.cc +++ b/chrome/browser/ui/views/extensions/extension_popup.cc -@@ -77,7 +77,7 @@ gfx::Size ExtensionPopup::CalculatePreferredSize() const { +@@ -78,7 +78,7 @@ gfx::Size ExtensionPopup::CalculatePreferredSize() const { void ExtensionPopup::AddedToWidget() { BubbleDialogDelegateView::AddedToWidget(); -- const int radius = GetBubbleFrameView()->corner_radius(); +- const int radius = GetBubbleFrameView()->GetCornerRadius(); + BRAVE_ADDED_TO_WIDGET const bool contents_has_rounded_corners = extension_view_->holder()->SetCornerRadii(gfx::RoundedCornersF(radius)); diff --git a/patches/chrome-browser-ui-views-frame-browser_view.h.patch b/patches/chrome-browser-ui-views-frame-browser_view.h.patch index f89b189b5988..3be7cb0d3c82 100644 --- a/patches/chrome-browser-ui-views-frame-browser_view.h.patch +++ b/patches/chrome-browser-ui-views-frame-browser_view.h.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h -index 986798357dbc0e8ce6d2ebd0848d8d6a42d844f7..a45794380fb580db6474bacf079f8e334cef2245 100644 +index e4955ccbb929e90aa9de4494ec90f70e35ae0a44..400700dc87acee4de92de459c0c8fa7ca26eb9a2 100644 --- a/chrome/browser/ui/views/frame/browser_view.h +++ b/chrome/browser/ui/views/frame/browser_view.h -@@ -621,6 +621,7 @@ class BrowserView : public BrowserWindow, +@@ -617,6 +617,7 @@ class BrowserView : public BrowserWindow, return accessibility_focus_highlight_.get(); } 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 ace0403b7cac..6e211c3883c0 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 96fd701d89aa36532c3335c76ba13ad6a60a892a..57ccadc88c60418f7d7e7dc69f57dfa861074290 100644 +index 938538e8dc5b0697774ddb60065fa9fa4f9f9ff1..639ed74e6f7c37a46e9ceefa92f8a1b4c88848c8 100644 --- a/chrome/browser/ui/views/location_bar/location_bar_view.cc +++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc -@@ -571,6 +571,7 @@ void LocationBarView::Layout() { +@@ -582,6 +582,7 @@ void LocationBarView::Layout() { } }; diff --git a/patches/chrome-browser-ui-views-location_bar-location_bar_view.h.patch b/patches/chrome-browser-ui-views-location_bar-location_bar_view.h.patch index cbbb6139a891..07714cac7779 100644 --- a/patches/chrome-browser-ui-views-location_bar-location_bar_view.h.patch +++ b/patches/chrome-browser-ui-views-location_bar-location_bar_view.h.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.h b/chrome/browser/ui/views/location_bar/location_bar_view.h -index 5d10fd718e746345ea2f1e33cfa6cebd0db3ed2e..cdfb1d8112244a19750a9b936ffa88cb993b75a8 100644 +index b5b8cb92f116c95604b1d10ed4b4de32f21ab2b9..0be154dae3a947863741fafca1240ae9f955f1d0 100644 --- a/chrome/browser/ui/views/location_bar/location_bar_view.h +++ b/chrome/browser/ui/views/location_bar/location_bar_view.h -@@ -105,6 +105,7 @@ class LocationBarView : public LocationBar, +@@ -110,6 +110,7 @@ class LocationBarView : public LocationBar, int GetBorderRadius() const; // Initializes the LocationBarView. @@ -10,7 +10,7 @@ index 5d10fd718e746345ea2f1e33cfa6cebd0db3ed2e..cdfb1d8112244a19750a9b936ffa88cb void Init(); // True if this instance has been initialized by calling Init, which can only -@@ -162,6 +163,7 @@ class LocationBarView : public LocationBar, +@@ -167,6 +168,7 @@ class LocationBarView : public LocationBar, // Updates the controller, and, if |contents| is non-null, restores saved // state that the tab holds. @@ -18,7 +18,7 @@ index 5d10fd718e746345ea2f1e33cfa6cebd0db3ed2e..cdfb1d8112244a19750a9b936ffa88cb void Update(content::WebContents* contents); // Clears the location bar's state for |contents|. -@@ -229,6 +231,7 @@ class LocationBarView : public LocationBar, +@@ -238,6 +240,7 @@ class LocationBarView : public LocationBar, security_state::SecurityLevel security_level) const override; ui::ImageModel GetLocationIcon(LocationIconView::Delegate::IconFetchedCallback on_icon_fetched) const override; diff --git a/patches/chrome-browser-ui-views-location_bar-location_icon_view.cc.patch b/patches/chrome-browser-ui-views-location_bar-location_icon_view.cc.patch index 9643eb495485..26414343bb07 100644 --- a/patches/chrome-browser-ui-views-location_bar-location_icon_view.cc.patch +++ b/patches/chrome-browser-ui-views-location_bar-location_icon_view.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/views/location_bar/location_icon_view.cc b/chrome/browser/ui/views/location_bar/location_icon_view.cc -index de836abcf94a550687d47894ecf19c6df1428b32..665df7d24b95bc7d9bfc19044c953c2bb954a745 100644 +index 8c38af079abb479d358fa295b109593bd5266a8d..e171915cf7d27930e2990443e34a3a52f8f4257f 100644 --- a/chrome/browser/ui/views/location_bar/location_icon_view.cc +++ b/chrome/browser/ui/views/location_bar/location_icon_view.cc -@@ -134,6 +134,7 @@ bool LocationIconView::ShouldShowText() const { +@@ -134,6 +134,7 @@ bool LocationIconView::GetShowText() const { const auto* location_bar_model = delegate_->GetLocationBarModel(); const GURL& url = location_bar_model->GetURL(); if (url.SchemeIs(content::kChromeUIScheme) || diff --git a/patches/chrome-browser-ui-views-permission_bubble-permission_prompt_bubble_view.cc.patch b/patches/chrome-browser-ui-views-permission_bubble-permission_prompt_bubble_view.cc.patch index b2316869c5a1..d58a17520cc3 100644 --- a/patches/chrome-browser-ui-views-permission_bubble-permission_prompt_bubble_view.cc.patch +++ b/patches/chrome-browser-ui-views-permission_bubble-permission_prompt_bubble_view.cc.patch @@ -1,11 +1,11 @@ diff --git a/chrome/browser/ui/views/permission_bubble/permission_prompt_bubble_view.cc b/chrome/browser/ui/views/permission_bubble/permission_prompt_bubble_view.cc -index 9d6a49a56c95ef9f9636f7aa8f5b22eefba3c168..01bdc8f36f733deebbfea478a114310f7843fe63 100644 +index 3feddc53c20ef5c90e0c135fba3897204d8586d9..444f4bdc9fdfa9f09f39e05114e9805891b41fc5 100644 --- a/chrome/browser/ui/views/permission_bubble/permission_prompt_bubble_view.cc +++ b/chrome/browser/ui/views/permission_bubble/permission_prompt_bubble_view.cc -@@ -135,6 +135,7 @@ PermissionPromptBubbleView::PermissionPromptBubbleView( +@@ -134,6 +134,7 @@ PermissionPromptBubbleView::PermissionPromptBubbleView( - for (permissions::PermissionRequest* request : visible_requests_) - AddPermissionRequestLine(request); + for (permissions::PermissionRequest* request : GetVisibleRequests()) + AddRequestLine(request); + BRAVE_PERMISSION_PROMPT_BUBBLE_VIEW base::Optional extra_text = GetExtraText(); 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 0e43120a43b4..74c068e92a43 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 16c7c3ee48cdd7fb7c54fb292889c6a930a0e44d..877b5ff33968f8e9f31245101824a425dbd51038 100644 +index 43b8d86c36cd164b515b0ab7345955a491437dd0..f78f2d5689e1e3a93a4e991ace5a94a53f0c14ad 100644 --- a/chrome/browser/ui/views/profiles/profile_menu_view_base.h +++ b/chrome/browser/ui/views/profiles/profile_menu_view_base.h -@@ -168,6 +168,7 @@ class ProfileMenuViewBase : public content::WebContentsDelegate, +@@ -169,6 +169,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-tabs-alert_indicator.h.patch b/patches/chrome-browser-ui-views-tabs-alert_indicator.h.patch index 18506ff0e116..06f5bbd71a42 100644 --- a/patches/chrome-browser-ui-views-tabs-alert_indicator.h.patch +++ b/patches/chrome-browser-ui-views-tabs-alert_indicator.h.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/views/tabs/alert_indicator.h b/chrome/browser/ui/views/tabs/alert_indicator.h -index 24bdc32e6f67b91495812efe6a251f8d28c62aa8..91852813b4791c71d51c659fdaa236e040e50fe5 100644 +index 364fef52f0e8ade9a9099cc879de0e0db132204e..b0f781db92edca41ec6275bd65f10dddfccc66af 100644 --- a/chrome/browser/ui/views/tabs/alert_indicator.h +++ b/chrome/browser/ui/views/tabs/alert_indicator.h -@@ -48,6 +48,7 @@ class AlertIndicator : public views::ImageView { +@@ -50,6 +50,7 @@ class AlertIndicator : public views::ImageView { View* GetTooltipHandlerForPoint(const gfx::Point& point) override; private: diff --git a/patches/chrome-browser-ui-views-tabs-tab_hover_card_bubble_view.h.patch b/patches/chrome-browser-ui-views-tabs-tab_hover_card_bubble_view.h.patch index d852c460fb62..2402657d7620 100644 --- a/patches/chrome-browser-ui-views-tabs-tab_hover_card_bubble_view.h.patch +++ b/patches/chrome-browser-ui-views-tabs-tab_hover_card_bubble_view.h.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.h b/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.h -index cf92c20dd5db10698c00a469db3907e516ef34d7..6a4ee1b178326927baa271c57ce45fded94afabc 100644 +index 76aedb9ff3a51fc41649a16b4731cb0a98035e01..9cd973cbb4e9ee455f867007ba592f91c9b259b8 100644 --- a/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.h +++ b/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.h -@@ -61,6 +61,7 @@ class TabHoverCardBubbleView : public views::BubbleDialogDelegateView { +@@ -72,6 +72,7 @@ class TabHoverCardBubbleView : public views::BubbleDialogDelegateView { last_mouse_exit_timestamp_ = last_mouse_exit_timestamp; } diff --git a/patches/chrome-browser-ui-views-tabs-tab_icon.cc.patch b/patches/chrome-browser-ui-views-tabs-tab_icon.cc.patch index 34f449914318..28f3967cb4ab 100644 --- a/patches/chrome-browser-ui-views-tabs-tab_icon.cc.patch +++ b/patches/chrome-browser-ui-views-tabs-tab_icon.cc.patch @@ -1,13 +1,13 @@ diff --git a/chrome/browser/ui/views/tabs/tab_icon.cc b/chrome/browser/ui/views/tabs/tab_icon.cc -index ff46096cb62b343d1d5f716ab88bd971906ecafb..47f49e6ff14a684e4eeab07036696ba18b201196 100644 +index 8829e1b7a1c4529cb244216f5caf39ebb9724c0c..1124a2d73775cbcf29849f08074d9aad92857f68 100644 --- a/chrome/browser/ui/views/tabs/tab_icon.cc +++ b/chrome/browser/ui/views/tabs/tab_icon.cc -@@ -365,7 +365,7 @@ void TabIcon::SetIcon(const GURL& url, const gfx::ImageSkia& icon) { +@@ -367,7 +367,7 @@ void TabIcon::SetIcon(const GURL& url, const gfx::ImageSkia& icon) { favicon_ = icon; -- if (!HasNonDefaultFavicon() || ShouldThemifyFaviconForUrl(url)) { -+ if (!HasNonDefaultFavicon() || BraveShouldThemifyFaviconForUrl(url)) { +- if (!GetNonDefaultFavicon() || ShouldThemifyFaviconForUrl(url)) { ++ if (!GetNonDefaultFavicon() || BraveShouldThemifyFaviconForUrl(url)) { themed_favicon_ = ThemeImage(icon); } else { themed_favicon_ = gfx::ImageSkia(); 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 219ec86a6023..12b42b21a477 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 70a785095a9dfe7227134d736b1b2c21d27570a1..708f489fe8ea76052e7ac3da963a6e4a4e2a6885 100644 +index 2055a0d14bb2d1b66c6b41a5d7ce46b187f9cee6..b6479c7fcefebdb628d1665e54aff160b7a872d5 100644 --- a/chrome/browser/ui/views/tabs/tab_style_views.cc +++ b/chrome/browser/ui/views/tabs/tab_style_views.cc @@ -67,6 +67,7 @@ class GM2TabStyle : public TabStyleViews { diff --git a/patches/chrome-browser-ui-views-toolbar-browser_actions_container.h.patch b/patches/chrome-browser-ui-views-toolbar-browser_actions_container.h.patch index 8a441ab77420..d081b248475c 100644 --- a/patches/chrome-browser-ui-views-toolbar-browser_actions_container.h.patch +++ b/patches/chrome-browser-ui-views-toolbar-browser_actions_container.h.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/views/toolbar/browser_actions_container.h b/chrome/browser/ui/views/toolbar/browser_actions_container.h -index c48a0f45febd38254cd157467d3b5697bcadb26b..17263d3b821b8cdf3788dc507f990deb7da42b0d 100644 +index 82b54ed855ff670d558e55cd686106ace88128eb..a5e88d9715baa3abd58bec57d3fb57dc3ae82e8f 100644 --- a/chrome/browser/ui/views/toolbar/browser_actions_container.h +++ b/chrome/browser/ui/views/toolbar/browser_actions_container.h -@@ -260,6 +260,7 @@ class BrowserActionsContainer : public views::View, +@@ -262,6 +262,7 @@ class BrowserActionsContainer : public views::View, static views::FlexRule GetFlexRule(); protected: 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 af1a663b35eb..0de37e414134 100644 --- a/patches/chrome-browser-ui-views-toolbar-toolbar_view.cc.patch +++ b/patches/chrome-browser-ui-views-toolbar-toolbar_view.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/views/toolbar/toolbar_view.cc b/chrome/browser/ui/views/toolbar/toolbar_view.cc -index ae3fc740beca6ad5491c04783bd9c2212abcf636..910b5f7a58fd58375704f11fff0978ca17347a01 100644 +index 54ba2047729f1f0432bef0309730d891e42b3087..b6ba052bf500d96114d2f3ae6bb52e7034979246 100644 --- a/chrome/browser/ui/views/toolbar/toolbar_view.cc +++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc -@@ -295,7 +295,7 @@ void ToolbarView::Init() { +@@ -301,7 +301,7 @@ void ToolbarView::Init() { } else { // TODO(crbug.com/932818): Remove this once the // |kAutofillEnableToolbarStatusChip| is fully launched. diff --git a/patches/chrome-browser-ui-views-toolbar-toolbar_view.h.patch b/patches/chrome-browser-ui-views-toolbar-toolbar_view.h.patch index 8b133c953786..6d36a4dbe988 100644 --- a/patches/chrome-browser-ui-views-toolbar-toolbar_view.h.patch +++ b/patches/chrome-browser-ui-views-toolbar-toolbar_view.h.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/ui/views/toolbar/toolbar_view.h b/chrome/browser/ui/views/toolbar/toolbar_view.h -index eb70bf974c76e0c8c0b86d316b007781495990bb..dbe8f62c627509f842c2db2346606f477c982ef3 100644 +index 0b3492e045424e56b0cce1bafdfd9006629e2776..1a9e8521fd81b9c9f5597c10e49903bb9a90c51b 100644 --- a/chrome/browser/ui/views/toolbar/toolbar_view.h +++ b/chrome/browser/ui/views/toolbar/toolbar_view.h @@ -94,12 +94,14 @@ class ToolbarView : public views::AccessiblePaneView, @@ -25,7 +25,7 @@ index eb70bf974c76e0c8c0b86d316b007781495990bb..dbe8f62c627509f842c2db2346606f47 void ShowBookmarkBubble(const GURL& url, bool already_bookmarked, bookmarks::BookmarkBubbleObserver* observer); -@@ -193,6 +196,7 @@ class ToolbarView : public views::AccessiblePaneView, +@@ -196,6 +199,7 @@ class ToolbarView : public views::AccessiblePaneView, void ChildPreferredSizeChanged(views::View* child) override; protected: @@ -33,7 +33,7 @@ index eb70bf974c76e0c8c0b86d316b007781495990bb..dbe8f62c627509f842c2db2346606f47 // This controls Toolbar, LocationBar and CustomTabBar visibility. // If we don't set all three, tab navigation from the app menu breaks // on Chrome OS. -@@ -244,6 +248,7 @@ class ToolbarView : public views::AccessiblePaneView, +@@ -247,6 +251,7 @@ class ToolbarView : public views::AccessiblePaneView, void OnChromeLabsPrefChanged(); // Loads the images for all the child views. diff --git a/patches/chrome-browser-ui-views-translate-translate_bubble_view.cc.patch b/patches/chrome-browser-ui-views-translate-translate_bubble_view.cc.patch index 7e52feaeba0d..4760dbe9756f 100644 --- a/patches/chrome-browser-ui-views-translate-translate_bubble_view.cc.patch +++ b/patches/chrome-browser-ui-views-translate-translate_bubble_view.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/views/translate/translate_bubble_view.cc b/chrome/browser/ui/views/translate/translate_bubble_view.cc -index c1d6ebf1d65e9d0663a2655296ff16a88950ae57..7ce52fd675376c380890b6d3b7659be3c0eb5c16 100644 +index 18346e33e9280b56cf369d41dddb9e99feb02f61..8a74861300058355bb2f2a93358d518057916afe 100644 --- a/chrome/browser/ui/views/translate/translate_bubble_view.cc +++ b/chrome/browser/ui/views/translate/translate_bubble_view.cc -@@ -176,7 +176,7 @@ views::Widget* TranslateBubbleView::ShowBubble( +@@ -183,7 +183,7 @@ views::Widget* TranslateBubbleView::ShowBubble( source_language, target_language)); std::unique_ptr model( new TranslateBubbleModelImpl(step, std::move(ui_delegate))); diff --git a/patches/chrome-browser-ui-views-translate-translate_bubble_view.h.patch b/patches/chrome-browser-ui-views-translate-translate_bubble_view.h.patch index 35c487acf238..840b98ab6c27 100644 --- a/patches/chrome-browser-ui-views-translate-translate_bubble_view.h.patch +++ b/patches/chrome-browser-ui-views-translate-translate_bubble_view.h.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/ui/views/translate/translate_bubble_view.h b/chrome/browser/ui/views/translate/translate_bubble_view.h -index 65ded91989e7e96709dec8ca40a6a435398d7eb7..14469b5510c04a0b5b16b83d554c26c10303bda7 100644 +index 22ad5145ffdbee32f2a2d5a10aab294cedd06c05..066ab765b97e4fbfc68137f17dcbd51acd57046d 100644 --- a/chrome/browser/ui/views/translate/translate_bubble_view.h +++ b/chrome/browser/ui/views/translate/translate_bubble_view.h @@ -95,6 +95,7 @@ class TranslateBubbleView : public LocationBarBubbleDelegateView, diff --git a/patches/chrome-browser-ui-views-update_recommended_message_box.h.patch b/patches/chrome-browser-ui-views-update_recommended_message_box.h.patch index dbe1a5c7573c..a18256237dc3 100644 --- a/patches/chrome-browser-ui-views-update_recommended_message_box.h.patch +++ b/patches/chrome-browser-ui-views-update_recommended_message_box.h.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/ui/views/update_recommended_message_box.h b/chrome/browser/ui/views/update_recommended_message_box.h -index 312a9a4c781eeb646f84bb2d8ff3db6287af67e0..3c0f75b2827c74a2d59e8ba37490fce50afac3f2 100644 +index adcef966dd879d608222569b83cadca01c2452ab..da13fc19533d02425bafca208250d080caf0d9ec 100644 --- a/chrome/browser/ui/views/update_recommended_message_box.h +++ b/chrome/browser/ui/views/update_recommended_message_box.h @@ -20,6 +20,8 @@ class UpdateRecommendedMessageBox : public views::DialogDelegate { 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 cc919dfad527..7b535ea40f50 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 2dbd378c56383aea0f521f09e4d0461a0ba5f07c..1b743ef81ee9b44cfd75e6371f87ce3b830c60d0 100644 +index 96a009f80e18a62566c47513b3dabe606b636d9d..d2f60e616c195d3fad5daf260acf58fe0dc837d1 100644 --- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc +++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc -@@ -1077,6 +1077,7 @@ void ChromeWebUIControllerFactory::GetFaviconForURL( +@@ -1101,6 +1101,7 @@ void ChromeWebUIControllerFactory::GetFaviconForURL( // static ChromeWebUIControllerFactory* ChromeWebUIControllerFactory::GetInstance() { diff --git a/patches/chrome-browser-ui-webui-downloads-downloads_ui.cc.patch b/patches/chrome-browser-ui-webui-downloads-downloads_ui.cc.patch index 56fb915d5caf..dc5a07fe8cf9 100644 --- a/patches/chrome-browser-ui-webui-downloads-downloads_ui.cc.patch +++ b/patches/chrome-browser-ui-webui-downloads-downloads_ui.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/webui/downloads/downloads_ui.cc b/chrome/browser/ui/webui/downloads/downloads_ui.cc -index f87fdcb1987c499987ad89045859b4fba97cd3f2..100a743e45b8c4581c21aa6257da9cded4060f6b 100644 +index e545f734772c4a140e06a3c44c9c06782cff6348..7bc511e1834cc20f607922a3adc52a7b39b1ba3a 100644 --- a/chrome/browser/ui/webui/downloads/downloads_ui.cc +++ b/chrome/browser/ui/webui/downloads/downloads_ui.cc -@@ -56,6 +56,7 @@ namespace { +@@ -59,6 +59,7 @@ namespace { content::WebUIDataSource* CreateDownloadsUIHTMLSource(Profile* profile) { content::WebUIDataSource* source = content::WebUIDataSource::Create(chrome::kChromeUIDownloadsHost); 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 86d076e1163b..e159b6ef20f7 100644 --- a/patches/chrome-browser-ui-webui-extensions-extensions_ui.cc.patch +++ b/patches/chrome-browser-ui-webui-extensions-extensions_ui.cc.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/ui/webui/extensions/extensions_ui.cc b/chrome/browser/ui/webui/extensions/extensions_ui.cc -index 5a0a19b10b985d63eae236ba609e4a6fe7bd7f23..3237638eba9980e70d18dbcf16d676ba4d6f6447 100644 +index 043c4dd63257da4bfa26f9364738643705217e23..d7782bbb0f5f66ca6f2eb06de5cf6b2a6a0d8230 100644 --- a/chrome/browser/ui/webui/extensions/extensions_ui.cc +++ b/chrome/browser/ui/webui/extensions/extensions_ui.cc @@ -343,6 +343,8 @@ content::WebUIDataSource* CreateMdExtensionsSource(Profile* profile, diff --git a/patches/chrome-browser-ui-webui-history-history_ui.cc.patch b/patches/chrome-browser-ui-webui-history-history_ui.cc.patch index dd6cbec0dc96..0f079e45796b 100644 --- a/patches/chrome-browser-ui-webui-history-history_ui.cc.patch +++ b/patches/chrome-browser-ui-webui-history-history_ui.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/ui/webui/history/history_ui.cc b/chrome/browser/ui/webui/history/history_ui.cc -index 4986ef5293f0f64c786871d200ad635b6311796f..436563928c58e9bf688fec537c23c1648de1c907 100644 +index bc0219651739efe5aba136935501845ded8b2680..68e56aafda5754501e3b48f6c510132e0e9f8de9 100644 --- a/chrome/browser/ui/webui/history/history_ui.cc +++ b/chrome/browser/ui/webui/history/history_ui.cc -@@ -54,6 +54,7 @@ content::WebUIDataSource* CreateHistoryUIHTMLSource(Profile* profile) { +@@ -55,6 +55,7 @@ content::WebUIDataSource* CreateHistoryUIHTMLSource(Profile* profile) { content::WebUIDataSource* source = content::WebUIDataSource::Create(chrome::kChromeUIHistoryHost); 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 fa4b6ca8d4f5..c1bc22cc33ee 100644 --- a/patches/chrome-browser-ui-webui-settings-people_handler.cc.patch +++ b/patches/chrome-browser-ui-webui-settings-people_handler.cc.patch @@ -1,29 +1,28 @@ diff --git a/chrome/browser/ui/webui/settings/people_handler.cc b/chrome/browser/ui/webui/settings/people_handler.cc -index 5da199f1bea9c4a53ce5db2ab88a7fb3c7f2e66f..74d66968eab76ffba31b2bb327d2a0a2cb9247d2 100644 +index eb6cf74a3c1c41a8181f812bbcbf26159a206307..d34894f5420bcae7f5369d0879385c52ca7faddb 100644 --- a/chrome/browser/ui/webui/settings/people_handler.cc +++ b/chrome/browser/ui/webui/settings/people_handler.cc -@@ -854,7 +854,7 @@ void PeopleHandler::OnStateChanged(syncer::SyncService* sync) { +@@ -854,6 +854,7 @@ void PeopleHandler::OnStateChanged(syncer::SyncService* sync) { void PeopleHandler::BeforeUnloadDialogCancelled() { // The before unload dialog is only shown during the first sync setup. -- DCHECK(IdentityManagerFactory::GetForProfile(profile_)->HasPrimaryAccount()); -+ // DCHECK(IdentityManagerFactory::GetForProfile(profile_)->HasPrimaryAccount()); ++ if (false) + DCHECK(IdentityManagerFactory::GetForProfile(profile_)->HasPrimaryAccount( + signin::ConsentLevel::kSync)); syncer::SyncService* service = GetSyncService(); - DCHECK(service && service->IsSetupInProgress() && - !service->GetUserSettings()->IsFirstSetupComplete()); -@@ -902,6 +902,7 @@ std::unique_ptr PeopleHandler::GetSyncStatusDictionary() +@@ -905,6 +906,7 @@ std::unique_ptr PeopleHandler::GetSyncStatusDictionary() service && !disallowed_by_policy && service->IsSetupInProgress() && !service->GetUserSettings()->IsFirstSetupComplete() && - identity_manager->HasPrimaryAccount()); + identity_manager->HasPrimaryAccount(signin::ConsentLevel::kSync)); + BRAVE_GET_SYNC_STATUS_DICTIONARY const sync_ui_util::StatusLabels status_labels = sync_ui_util::GetStatusLabels(profile_); -@@ -1052,6 +1053,7 @@ void PeopleHandler::MaybeMarkSyncConfiguring() { +@@ -1057,6 +1059,7 @@ void PeopleHandler::MaybeMarkSyncConfiguring() { } bool PeopleHandler::IsProfileAuthNeededOrHasErrors() { + return false; - return !IdentityManagerFactory::GetForProfile(profile_) - ->HasPrimaryAccount() || + return !IdentityManagerFactory::GetForProfile(profile_)->HasPrimaryAccount( + signin::ConsentLevel::kSync) || SigninErrorControllerFactory::GetForProfile(profile_)->HasError(); 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 659ac1cb0a9a..e8e16f1a7332 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 e7a2dc3bea70ad4b5e7bc2382eee7daa4116ee36..aeca8b4fb60084a382acc35d84571eed2ed78a72 100644 +index f384bc355db03f53d107cdab7ab8695e76962fa8..b613a994cd046fd9a1b6bb8992a82df8f1489167 100644 --- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc +++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc -@@ -2467,6 +2467,7 @@ void AddLocalizedStrings(content::WebUIDataSource* html_source, +@@ -2555,6 +2555,7 @@ void AddLocalizedStrings(content::WebUIDataSource* html_source, policy_indicator::AddLocalizedStrings(html_source); AddSecurityKeysStrings(html_source); diff --git a/patches/chrome-browser-webauthn-chrome_authenticator_request_delegate.cc.patch b/patches/chrome-browser-webauthn-chrome_authenticator_request_delegate.cc.patch index a321e35e742d..6ab7c5d3fb4a 100644 --- a/patches/chrome-browser-webauthn-chrome_authenticator_request_delegate.cc.patch +++ b/patches/chrome-browser-webauthn-chrome_authenticator_request_delegate.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/webauthn/chrome_authenticator_request_delegate.cc b/chrome/browser/webauthn/chrome_authenticator_request_delegate.cc -index 32934f246afbeaa2db31768bd2a6996283bff6c2..652784853a52f2ae136f5a04d2351050f3cfe054 100644 +index 195c192aa77fd4abe12424c9daf0b2a2bd98db4a..6ae1267d62bc6bbb36800260c9b440ef504dc722 100644 --- a/chrome/browser/webauthn/chrome_authenticator_request_delegate.cc +++ b/chrome/browser/webauthn/chrome_authenticator_request_delegate.cc -@@ -465,6 +465,7 @@ std::string TouchIdMetadataSecret(Profile* profile) { +@@ -482,6 +482,7 @@ std::string TouchIdMetadataSecret(Profile* profile) { ChromeAuthenticatorRequestDelegate::TouchIdAuthenticatorConfig ChromeAuthenticatorRequestDelegate::TouchIdAuthenticatorConfigForProfile( Profile* profile) { diff --git a/patches/chrome-chrome_proxy-chrome_proxy_main_win.cc.patch b/patches/chrome-chrome_proxy-chrome_proxy_main_win.cc.patch index 24f24d19f536..c5c07a7180db 100644 --- a/patches/chrome-chrome_proxy-chrome_proxy_main_win.cc.patch +++ b/patches/chrome-chrome_proxy-chrome_proxy_main_win.cc.patch @@ -1,5 +1,5 @@ diff --git a/chrome/chrome_proxy/chrome_proxy_main_win.cc b/chrome/chrome_proxy/chrome_proxy_main_win.cc -index 6d79dd32ff183ce06a556b3e7ec60bd53ff4f917..6cb9d7083d893677f11c1df8b501823e0638b6e6 100644 +index bdb02d140cf891e387d1f566e6f39692e0ebf35e..2f31a0505f017ba614738a5d9fd7d11b2388af92 100644 --- a/chrome/chrome_proxy/chrome_proxy_main_win.cc +++ b/chrome/chrome_proxy/chrome_proxy_main_win.cc @@ -13,7 +13,10 @@ diff --git a/patches/chrome-common-BUILD.gn.patch b/patches/chrome-common-BUILD.gn.patch index bb72e4a2695a..71628022f826 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 737d5ea55058d068a8cec6dd0d198b04c7807cac..4626cfc06c5949d5b35fe3802f3cf5554868bb3e 100644 +index a99755c47d431245053e79324989d39dfa059e2f..06015524f4f8f5f1d4cf68af44044d85281df89e 100644 --- a/chrome/common/BUILD.gn +++ b/chrome/common/BUILD.gn @@ -65,6 +65,7 @@ source_set("channel_info") { @@ -18,7 +18,7 @@ index 737d5ea55058d068a8cec6dd0d198b04c7807cac..4626cfc06c5949d5b35fe3802f3cf555 ":available_offline_content_mojom", ":buildflags", ":channel_info", -@@ -542,6 +544,7 @@ static_library("non_code_constants") { +@@ -543,6 +545,7 @@ static_library("non_code_constants") { "//printing/buildflags", "//ui/base:buildflags", ] diff --git a/patches/chrome-common-extensions-chrome_extensions_client.cc.patch b/patches/chrome-common-extensions-chrome_extensions_client.cc.patch index df397a7fd575..fc0182b9232b 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 db156f06c84b74361bed5b0e8b848b33aa72e072..6cf4db463ae3380c7718b3355c2a5d3ae89a4ec3 100644 +index 8e0a06316edc946b6c2aa36294ecf5ae42f4f9dd..b9630df74c4d30b403fd5443db902c0342df0e10 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-gcapi-gcapi.cc.patch b/patches/chrome-installer-gcapi-gcapi.cc.patch index b45aed77fb5e..32068ef88587 100644 --- a/patches/chrome-installer-gcapi-gcapi.cc.patch +++ b/patches/chrome-installer-gcapi-gcapi.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/installer/gcapi/gcapi.cc b/chrome/installer/gcapi/gcapi.cc -index e502b40a78791c65cee30ff0e1ef041eb011d9b2..e6d099259af45174a9d9a0e1011f7ea76a4a105f 100644 +index d115d6f43abbaee4b4142591d77a233f294fba58..82346778d92143a6a452987aa859da1cf5ef7117 100644 --- a/chrome/installer/gcapi/gcapi.cc +++ b/chrome/installer/gcapi/gcapi.cc -@@ -57,6 +57,16 @@ using Microsoft::WRL::ComPtr; +@@ -56,6 +56,16 @@ using Microsoft::WRL::ComPtr; namespace { @@ -19,7 +19,7 @@ index e502b40a78791c65cee30ff0e1ef041eb011d9b2..e6d099259af45174a9d9a0e1011f7ea7 const wchar_t kGCAPITempKey[] = L"Software\\Google\\GCAPITemp"; const wchar_t kChromeRegVersion[] = L"pv"; -@@ -66,6 +76,7 @@ const wchar_t kNoChromeOfferUntil[] = +@@ -65,6 +75,7 @@ const wchar_t kNoChromeOfferUntil[] = const wchar_t kC1FPendingKey[] = L"Software\\Google\\Common\\Rlz\\Events\\C"; const wchar_t kC1FSentKey[] = L"Software\\Google\\Common\\Rlz\\StatefulEvents\\C"; diff --git a/patches/chrome-installer-gcapi-google_update_util.cc.patch b/patches/chrome-installer-gcapi-google_update_util.cc.patch index ed04183c07df..6055d754fd74 100644 --- a/patches/chrome-installer-gcapi-google_update_util.cc.patch +++ b/patches/chrome-installer-gcapi-google_update_util.cc.patch @@ -1,5 +1,5 @@ diff --git a/chrome/installer/gcapi/google_update_util.cc b/chrome/installer/gcapi/google_update_util.cc -index 53a42d799992b4530c8a78513350cf501bcd0e97..ca86637e93e635c6e251e3e24a5e13731aec0eca 100644 +index e927c346623b3be564778d12d2ef28aa9f450365..1319910bc4eed406cd7dd7eca9ce5395155fbf37 100644 --- a/chrome/installer/gcapi/google_update_util.cc +++ b/chrome/installer/gcapi/google_update_util.cc @@ -11,6 +11,17 @@ @@ -27,4 +27,4 @@ index 53a42d799992b4530c8a78513350cf501bcd0e97..ca86637e93e635c6e251e3e24a5e1373 +#endif // Mirror the strategy used by GoogleUpdateSettings::GetBrand. - bool GetBrand(base::string16* value) { + bool GetBrand(std::wstring* value) { diff --git a/patches/chrome-installer-launcher_support-chrome_launcher_support.cc.patch b/patches/chrome-installer-launcher_support-chrome_launcher_support.cc.patch index b7e80c9f5245..db13f4c3cefc 100644 --- a/patches/chrome-installer-launcher_support-chrome_launcher_support.cc.patch +++ b/patches/chrome-installer-launcher_support-chrome_launcher_support.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/installer/launcher_support/chrome_launcher_support.cc b/chrome/installer/launcher_support/chrome_launcher_support.cc -index 36afdc96da27a8fa5e3d1ed798b89edd845b3107..0f0b9fae49dd19aac9f00ddb8389da3094f8d766 100644 +index 6657390e3c31e81624c37a881639bf042563c6bc..d4232553512386d9b0b622744635b81f6a7c63f9 100644 --- a/chrome/installer/launcher_support/chrome_launcher_support.cc +++ b/chrome/installer/launcher_support/chrome_launcher_support.cc -@@ -26,12 +26,22 @@ const wchar_t kUpdateClientsRegKey[] = L"Software\\Google\\Update\\Clients"; +@@ -27,12 +27,22 @@ const wchar_t kUpdateClientsRegKey[] = L"Software\\Google\\Update\\Clients"; // Copied from google_chrome_install_modes.cc. const wchar_t kBrowserAppGuid[] = L"{8A69D345-D564-463c-AFF1-A69D9E530F96}"; const wchar_t kSxSBrowserAppGuid[] = L"{4ea16ac7-fd5a-47c3-875b-dbf4a2008c20}"; @@ -25,7 +25,7 @@ index 36afdc96da27a8fa5e3d1ed798b89edd845b3107..0f0b9fae49dd19aac9f00ddb8389da30 const wchar_t kUninstallStringField[] = L"UninstallString"; const wchar_t kVersionStringField[] = L"pv"; -@@ -95,7 +105,7 @@ base::FilePath GetSetupExeFromRegistry(InstallationLevel level, +@@ -96,7 +106,7 @@ base::FilePath GetSetupExeFromRegistry(InstallationLevel level, // Returns the path to an existing setup.exe at the specified level, if it can // be found via the registry. base::FilePath GetSetupExeForInstallationLevel(InstallationLevel level) { @@ -34,7 +34,7 @@ index 36afdc96da27a8fa5e3d1ed798b89edd845b3107..0f0b9fae49dd19aac9f00ddb8389da30 // Look in the registry for Chrome. return GetSetupExeFromRegistry(level, kBrowserAppGuid); #else -@@ -131,7 +141,7 @@ base::FilePath FindExeRelativeToSetupExe(const base::FilePath setup_exe_path, +@@ -132,7 +142,7 @@ base::FilePath FindExeRelativeToSetupExe(const base::FilePath setup_exe_path, base::FilePath GetChromePathForInstallationLevel(InstallationLevel level, bool is_sxs) { if (is_sxs) { diff --git a/patches/chrome-installer-linux-debian-update_dist_package_versions.py.patch b/patches/chrome-installer-linux-debian-update_dist_package_versions.py.patch index 94e3495daf75..5518dabcd0b4 100644 --- a/patches/chrome-installer-linux-debian-update_dist_package_versions.py.patch +++ b/patches/chrome-installer-linux-debian-update_dist_package_versions.py.patch @@ -1,5 +1,5 @@ diff --git a/chrome/installer/linux/debian/update_dist_package_versions.py b/chrome/installer/linux/debian/update_dist_package_versions.py -index 00bccb4cc7e13290f04af322e3868131567a16b1..44cd896b1a0129e1669432d20b553f28d0357cde 100755 +index 90a32b8e2418da86efe019ccf6e2c23da4205213..d0acee31a30c708f40bb202528b36f610b48e481 100755 --- a/chrome/installer/linux/debian/update_dist_package_versions.py +++ b/chrome/installer/linux/debian/update_dist_package_versions.py @@ -42,6 +42,7 @@ PACKAGE_FILTER = set([ @@ -10,7 +10,7 @@ index 00bccb4cc7e13290f04af322e3868131567a16b1..44cd896b1a0129e1669432d20b553f28 "libcups2", "libdbus-1-3", "libdrm2", -@@ -73,6 +74,7 @@ PACKAGE_FILTER = set([ +@@ -72,6 +73,7 @@ PACKAGE_FILTER = set([ "libxshmfence1", "libxss1", "libxtst6", diff --git a/patches/chrome-installer-linux-rpm-update_package_provides.py.patch b/patches/chrome-installer-linux-rpm-update_package_provides.py.patch index d56c95514de9..a05b91394129 100644 --- a/patches/chrome-installer-linux-rpm-update_package_provides.py.patch +++ b/patches/chrome-installer-linux-rpm-update_package_provides.py.patch @@ -1,5 +1,5 @@ diff --git a/chrome/installer/linux/rpm/update_package_provides.py b/chrome/installer/linux/rpm/update_package_provides.py -index f6ea0bfbf8692a4c67ac542de22206c472b04f74..8abdeed98b1c9085ac341d484ceb538943741f5d 100755 +index 5225e3ef93dd137e6a8a12329d9aac49cc8b51e8..cd509fd3e2103c8015f36bb0817e156f3bfd63d9 100755 --- a/chrome/installer/linux/rpm/update_package_provides.py +++ b/chrome/installer/linux/rpm/update_package_provides.py @@ -33,6 +33,7 @@ LIBRARY_FILTER = set([ @@ -10,7 +10,7 @@ index f6ea0bfbf8692a4c67ac542de22206c472b04f74..8abdeed98b1c9085ac341d484ceb5389 "libcups.so", "libdbus-1.so", "libdrm.so.2", -@@ -53,7 +54,10 @@ LIBRARY_FILTER = set([ +@@ -52,7 +53,10 @@ LIBRARY_FILTER = set([ "libnssutil3.so", "libpango-1.0.so", "libpangocairo-1.0.so", @@ -21,7 +21,7 @@ index f6ea0bfbf8692a4c67ac542de22206c472b04f74..8abdeed98b1c9085ac341d484ceb5389 "librt.so", "libsmime3.so", "libstdc++.so", -@@ -62,6 +66,7 @@ LIBRARY_FILTER = set([ +@@ -61,6 +65,7 @@ LIBRARY_FILTER = set([ "libxcb-dri3.so.0", "libxkbcommon.so.0", "libxshmfence.so.1", diff --git a/patches/chrome-installer-mini_installer-BUILD.gn.patch b/patches/chrome-installer-mini_installer-BUILD.gn.patch index d9910a1bf0b4..474de267d524 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 5f5cb1c752f28724ca0aceb1613a3d512356c565..8b73715176589e5708e0b5b8c7107a641c56d188 100644 +index ae43217ef207534924957deadd5147b746b55d67..3af7a4c38750763f582a0da13c0e36908b55edf9 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-util-google_update_settings.cc.patch b/patches/chrome-installer-util-google_update_settings.cc.patch index 3ba433f4eeeb..c356514153f0 100644 --- a/patches/chrome-installer-util-google_update_settings.cc.patch +++ b/patches/chrome-installer-util-google_update_settings.cc.patch @@ -1,5 +1,5 @@ diff --git a/chrome/installer/util/google_update_settings.cc b/chrome/installer/util/google_update_settings.cc -index c67b11cc6f53fe3493e483b993da717a71db37e3..44d8d6cf55bb2f22b2820228179f726240414d05 100644 +index 5b17407c19f04aedac10f8e984cf3decd96a4da8..5db1755379c9db7856c68b821aabffe6fd1a4a79 100644 --- a/chrome/installer/util/google_update_settings.cc +++ b/chrome/installer/util/google_update_settings.cc @@ -30,7 +30,11 @@ using base::win::RegKey; diff --git a/patches/chrome-installer-util-shell_util.cc.patch b/patches/chrome-installer-util-shell_util.cc.patch index 8e791f6107bc..97a66ac8312c 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 bba833d2f3abeb8f0a6fefa59ace416db3dc2b63..956f251527c4728ae51d934b46e64cb6d20ff3f2 100644 +index d33b1bcb081c2fc2952455012a07d593687308b8..f31de7a11686a4eec809f9760baff92a22192425 100644 --- a/chrome/installer/util/shell_util.cc +++ b/chrome/installer/util/shell_util.cc -@@ -748,6 +748,7 @@ base::string16 GetTargetForDefaultAppsSettings(const wchar_t* protocol) { +@@ -746,6 +746,7 @@ std::wstring GetTargetForDefaultAppsSettings(const wchar_t* protocol) { return base::StringPrintf(kSystemSettingsDefaultAppsFormat, L"Browser"); if (base::EqualsCaseInsensitiveASCII(protocol, L"mailto")) return base::StringPrintf(kSystemSettingsDefaultAppsFormat, L"Email"); @@ -10,7 +10,7 @@ index bba833d2f3abeb8f0a6fefa59ace416db3dc2b63..956f251527c4728ae51d934b46e64cb6 return L"SettingsPageAppsDefaultsProtocolView"; } -@@ -1619,8 +1620,10 @@ const wchar_t* ShellUtil::kPotentialFileAssociations[] = { +@@ -1615,8 +1616,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 6add8ef6cfa2..4e50452fd6d4 100644 --- a/patches/chrome-renderer-BUILD.gn.patch +++ b/patches/chrome-renderer-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/chrome/renderer/BUILD.gn b/chrome/renderer/BUILD.gn -index 4e18b86882eeec2034805bd2d3222f68c3c97555..493af74772658c10a4a9b0717517721998f2b29d 100644 +index a69e547cdaa14d4d8deec964648c475a12599228..c4347573f2ac783ca1298d7acf00f88b4c7c3114 100644 --- a/chrome/renderer/BUILD.gn +++ b/chrome/renderer/BUILD.gn -@@ -222,6 +222,7 @@ static_library("renderer") { +@@ -225,6 +225,7 @@ static_library("renderer") { "//v8", ] diff --git a/patches/chrome-renderer-chrome_content_renderer_client.cc.patch b/patches/chrome-renderer-chrome_content_renderer_client.cc.patch index e3d1a2035656..6273c342c36b 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 0e417d912d488a4615a584a8fc193f292da832d5..4d37ff3934c0640c3fa05f895e1f2854d3582547 100644 +index b6fe493a6ddcbeec0fc56ac7976edf425f8edc07..84f8680f5dd3657638918d0a115e95e04a643c6e 100644 --- a/chrome/renderer/chrome_content_renderer_client.cc +++ b/chrome/renderer/chrome_content_renderer_client.cc -@@ -484,7 +484,7 @@ void ChromeContentRendererClient::RenderFrameCreated( +@@ -478,7 +478,7 @@ void ChromeContentRendererClient::RenderFrameCreated( ChromeExtensionsRendererClient::GetInstance()->extension_dispatcher()); #endif content_settings::ContentSettingsAgentImpl* content_settings = diff --git a/patches/chrome-renderer-chrome_content_renderer_client.h.patch b/patches/chrome-renderer-chrome_content_renderer_client.h.patch index 74033f32e8ff..3ba1ce0d1d4a 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 30718f6b057fcca8eef7516cb48720c4137c3cb4..14b4588ba36b27bd1a1c1454c1d35ce96671e0bf 100644 +index 4a6fff63e13a454646e8fe3bb66c98357bbc2ba1..d5072d75547a24accc7f94b7158475581e9ce8f9 100644 --- a/chrome/renderer/chrome_content_renderer_client.h +++ b/chrome/renderer/chrome_content_renderer_client.h -@@ -228,6 +228,7 @@ class ChromeContentRendererClient +@@ -222,6 +222,7 @@ class ChromeContentRendererClient #endif private: diff --git a/patches/chrome-renderer-worker_content_settings_client.h.patch b/patches/chrome-renderer-worker_content_settings_client.h.patch index 7b76fd34a30e..fa3b1a400d1d 100644 --- a/patches/chrome-renderer-worker_content_settings_client.h.patch +++ b/patches/chrome-renderer-worker_content_settings_client.h.patch @@ -1,8 +1,8 @@ diff --git a/chrome/renderer/worker_content_settings_client.h b/chrome/renderer/worker_content_settings_client.h -index a0f4e0db463ef34a3790da84d9cb960ef0a731f7..41f3e365e7127b07a9408b1e6027db1f12e9574c 100644 +index 9829059249489c6f6fdd8c176061ce4b4ef6ee2b..00eefd3c2e833412ec8b6e80052771deef6649a8 100644 --- a/chrome/renderer/worker_content_settings_client.h +++ b/chrome/renderer/worker_content_settings_client.h -@@ -35,6 +35,7 @@ class WorkerContentSettingsClient : public blink::WebContentSettingsClient { +@@ -37,6 +37,7 @@ class WorkerContentSettingsClient : public blink::WebContentSettingsClient { bool AllowScriptFromSource(bool enabled_per_settings, const blink::WebURL& script_url) override; bool ShouldAutoupgradeMixedContent() override; diff --git a/patches/chrome-test-BUILD.gn.patch b/patches/chrome-test-BUILD.gn.patch index 688e234d3d29..898296fe7ec0 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 131d9de1dd40e5b87bf01ca099f3dcf555623e42..76e2305d1ee073ee3a8084b14107e968aeb65edf 100644 +index c54a73fbdba1314320f01f0338f33d8bb1a4d24d..fe4d95acf9cca8df3513ac523793dd5baf787a44 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -878,6 +878,7 @@ if (!is_android) { +@@ -899,6 +899,7 @@ if (!is_android) { "//v8", ] diff --git a/patches/chrome-utility-BUILD.gn.patch b/patches/chrome-utility-BUILD.gn.patch index 60954f9502df..ba8f1a9716c2 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 9cba6c988a4026bf5561b53cb6fb85db9439f907..ad05f92d5fc006fe6ef6c709e556044d678ae266 100644 +index 3c1c93059d71ce27125a67d49624cdadaf3078c8..0ea1995b1ef4b804c2be07556dad744895306556 100644 --- a/chrome/utility/BUILD.gn +++ b/chrome/utility/BUILD.gn @@ -29,6 +29,7 @@ static_library("utility") { diff --git a/patches/chrome-utility-services.cc.patch b/patches/chrome-utility-services.cc.patch index b4185814f9ad..10156732802b 100644 --- a/patches/chrome-utility-services.cc.patch +++ b/patches/chrome-utility-services.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/utility/services.cc b/chrome/utility/services.cc -index ca37d66d3c4203270158854628636f7b6c616171..94fd58b9083d974a2563ed025336e5a4dab3da8c 100644 +index ebda0b60ba128e7d4cb5c2c6abda80215cb2edb3..a67f37c060697561de8045e5509bf90d937d4593 100644 --- a/chrome/utility/services.cc +++ b/chrome/utility/services.cc -@@ -356,6 +356,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& services) { +@@ -395,6 +395,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& services) { services.Add(RunAssistantAudioDecoder); #endif #endif diff --git a/patches/components-browser_ui-site_settings-android-BUILD.gn.patch b/patches/components-browser_ui-site_settings-android-BUILD.gn.patch index 05ae88a61214..d7e2be7d3312 100644 --- a/patches/components-browser_ui-site_settings-android-BUILD.gn.patch +++ b/patches/components-browser_ui-site_settings-android-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/components/browser_ui/site_settings/android/BUILD.gn b/components/browser_ui/site_settings/android/BUILD.gn -index dfa022b435420426eb856c4e1ca967c76fee9717..648dda790a0378980cc572225efd6f86816c0cf7 100644 +index c419975c291a2ffedb87a8b6d30fb0beda2b1d3f..221ff19f5423a8514922a0fe3845deddb9ab945c 100644 --- a/components/browser_ui/site_settings/android/BUILD.gn +++ b/components/browser_ui/site_settings/android/BUILD.gn @@ -73,6 +73,7 @@ android_library("java") { diff --git a/patches/components-browser_ui-site_settings-android-java-src-org-chromium-components-browser_ui-site_settings-SiteSettings.java.patch b/patches/components-browser_ui-site_settings-android-java-src-org-chromium-components-browser_ui-site_settings-SiteSettings.java.patch index 09d0d6cb195d..f58e9131aaf8 100644 --- a/patches/components-browser_ui-site_settings-android-java-src-org-chromium-components-browser_ui-site_settings-SiteSettings.java.patch +++ b/patches/components-browser_ui-site_settings-android-java-src-org-chromium-components-browser_ui-site_settings-SiteSettings.java.patch @@ -1,5 +1,5 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettings.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettings.java -index a056976a73c031db1a78c95358fddbb1a859abcc..c0426690a6396283669e630ae9d4a857dfc2ad09 100644 +index 3a3019fddf6168107ffa121edb892e1ea4b7e1ae..60ca66002e28e3e5731ed9afe4afdb5bf64074e6 100644 --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettings.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettings.java @@ -24,7 +24,7 @@ import org.chromium.components.user_prefs.UserPrefs; diff --git a/patches/components-browser_ui-widget-android-java-res-values-dimens.xml.patch b/patches/components-browser_ui-widget-android-java-res-values-dimens.xml.patch index 0fb06665a18e..004a13d9c433 100644 --- a/patches/components-browser_ui-widget-android-java-res-values-dimens.xml.patch +++ b/patches/components-browser_ui-widget-android-java-res-values-dimens.xml.patch @@ -1,5 +1,5 @@ diff --git a/components/browser_ui/widget/android/java/res/values/dimens.xml b/components/browser_ui/widget/android/java/res/values/dimens.xml -index 2e157961d97470872662df4a1add195b4ea7f674..13c5a13b097917a67e6b48ed5c741fdfb6be927b 100644 +index 8a1db9d096142efec7f400acb2fdb4aab5564cd0..ae53d00a78cc0bc8ffc7da6e3e3b5ecf1c2d3c4f 100644 --- a/components/browser_ui/widget/android/java/res/values/dimens.xml +++ b/components/browser_ui/widget/android/java/res/values/dimens.xml @@ -63,7 +63,7 @@ diff --git a/patches/components-component_updater-component_updater_service.h.patch b/patches/components-component_updater-component_updater_service.h.patch index 8b116bedafcd..ae91bcb5e590 100644 --- a/patches/components-component_updater-component_updater_service.h.patch +++ b/patches/components-component_updater-component_updater_service.h.patch @@ -1,8 +1,8 @@ diff --git a/components/component_updater/component_updater_service.h b/components/component_updater/component_updater_service.h -index 9de20a64577ba39d467207ef28058a03bc7fb218..c4722f9f899a39209da887df6b603db102d3fc55 100644 +index d87906676548af1ef77303ef03cf7fc709ed2f6e..1ecf36794cc3bd1f81d6a0221c2cd8741809aab1 100644 --- a/components/component_updater/component_updater_service.h +++ b/components/component_updater/component_updater_service.h -@@ -150,6 +150,7 @@ class ComponentUpdateService { +@@ -143,6 +143,7 @@ class ComponentUpdateService { friend class speech::SodaInstallerImpl; friend class ::ComponentsHandler; @@ -10,7 +10,7 @@ index 9de20a64577ba39d467207ef28058a03bc7fb218..c4722f9f899a39209da887df6b603db1 FRIEND_TEST_ALL_PREFIXES(ComponentInstallerTest, RegisterComponent); }; -@@ -163,6 +164,7 @@ class OnDemandUpdater { +@@ -156,6 +157,7 @@ class OnDemandUpdater { enum class Priority { BACKGROUND = 0, FOREGROUND = 1 }; virtual ~OnDemandUpdater() = default; diff --git a/patches/components-content_settings-core-browser-BUILD.gn.patch b/patches/components-content_settings-core-browser-BUILD.gn.patch index fb2aaca85972..ef44d77c3745 100644 --- a/patches/components-content_settings-core-browser-BUILD.gn.patch +++ b/patches/components-content_settings-core-browser-BUILD.gn.patch @@ -1,9 +1,9 @@ diff --git a/components/content_settings/core/browser/BUILD.gn b/components/content_settings/core/browser/BUILD.gn -index ef410e799aff8363450ca2122f282a68309b8ce7..39cc5f5cf9c44d3ce54db99e9a88408c83e4efbb 100644 +index 764c726b9889e39787d6fdf53db5d9fd450341b5..dcbb79371a0e5204a2c1bc165bf2ac4dd9a33a1f 100644 --- a/components/content_settings/core/browser/BUILD.gn +++ b/components/content_settings/core/browser/BUILD.gn -@@ -62,6 +62,7 @@ static_library("browser") { - "//services/preferences/public/cpp", +@@ -63,6 +63,7 @@ static_library("browser") { + "//services/tracing/public/cpp", "//url", ] + deps += [ "//brave/components/content_settings/core/browser" ] diff --git a/patches/components-content_settings-core-browser-content_settings_default_provider.cc.patch b/patches/components-content_settings-core-browser-content_settings_default_provider.cc.patch index 82ad0aebb82a..679352ceb8d9 100644 --- a/patches/components-content_settings-core-browser-content_settings_default_provider.cc.patch +++ b/patches/components-content_settings-core-browser-content_settings_default_provider.cc.patch @@ -1,11 +1,11 @@ diff --git a/components/content_settings/core/browser/content_settings_default_provider.cc b/components/content_settings/core/browser/content_settings_default_provider.cc -index 301e38ca2337c5596a197c6d512a52cf0644cfb2..4ede6dd3dda2f6ea78ad514e8242760fa6e9b47a 100644 +index 4b4c23346ec51e15ea949442d1ba82b6dc36624c..4e631dc8d86433150c80d4ed5a86fe8a58a395ba 100644 --- a/components/content_settings/core/browser/content_settings_default_provider.cc +++ b/components/content_settings/core/browser/content_settings_default_provider.cc -@@ -431,6 +431,7 @@ void DefaultProvider::DiscardOrMigrateObsoletePreferences() { - } - prefs_->ClearPref(kDeprecatedNativeFileSystemWriteGuardDefaultPref); +@@ -388,6 +388,7 @@ void DefaultProvider::DiscardOrMigrateObsoletePreferences() { + prefs_->ClearPref(kObsoletePluginsDataDefaultPref); #endif // !defined(OS_ANDROID) + #endif // !defined(OS_IOS) +BRAVE_DISCARD_OR_MIGRATE_OBSOLETE_PREFERENCES } 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 b1343e7844e4..9c645f9b5c92 100644 --- a/patches/components-content_settings-core-common-content_settings.cc.patch +++ b/patches/components-content_settings-core-common-content_settings.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/content_settings/core/common/content_settings.cc b/components/content_settings/core/common/content_settings.cc -index b76c3410b56f117d12d4639af48280a81765b7d3..aa572ffd561d78cb6bdcf2d83617105d3456fad7 100644 +index 51f992cd3d168feb4670d0c9e42683d9a696b56e..aa00a147e716696a49f3581222481d9c1b5ed36a 100644 --- a/components/content_settings/core/common/content_settings.cc +++ b/components/content_settings/core/common/content_settings.cc -@@ -94,6 +94,7 @@ constexpr HistogramValue kHistogramValue[] = { +@@ -93,6 +93,7 @@ constexpr HistogramValue kHistogramValue[] = { {ContentSettingsType::PERMISSION_AUTOREVOCATION_DATA, 72}, {ContentSettingsType::FILE_SYSTEM_LAST_PICKED_DIRECTORY, 73}, {ContentSettingsType::DISPLAY_CAPTURE, 74}, @@ -10,7 +10,7 @@ index b76c3410b56f117d12d4639af48280a81765b7d3..aa572ffd561d78cb6bdcf2d83617105d }; } // namespace -@@ -180,6 +181,7 @@ bool RendererContentSettingRules::IsRendererContentSetting( +@@ -179,6 +180,7 @@ bool RendererContentSettingRules::IsRendererContentSetting( content_type == ContentSettingsType::JAVASCRIPT || content_type == ContentSettingsType::CLIENT_HINTS || content_type == ContentSettingsType::POPUPS || diff --git a/patches/components-crash-core-app-crash_reporter_client.cc.patch b/patches/components-crash-core-app-crash_reporter_client.cc.patch index f912198d3bb4..6a59c21fe02a 100644 --- a/patches/components-crash-core-app-crash_reporter_client.cc.patch +++ b/patches/components-crash-core-app-crash_reporter_client.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/crash/core/app/crash_reporter_client.cc b/components/crash/core/app/crash_reporter_client.cc -index 1d0fb4f2a633fa5ddbe232ce19d716c22be78a37..19c3e6216c1d42463b6ea53684d3c9fea593de2d 100644 +index 89b4bfccd5d3278231726184547378805fb30ed5..b54616737c115eb3c96bb3e406412aa0047c4fea 100644 --- a/components/crash/core/app/crash_reporter_client.cc +++ b/components/crash/core/app/crash_reporter_client.cc -@@ -189,6 +189,7 @@ void CrashReporterClient::GetSanitizationInformation( +@@ -188,6 +188,7 @@ void CrashReporterClient::GetSanitizationInformation( #endif std::string CrashReporterClient::GetUploadUrl() { diff --git a/patches/components-external_intents-android-BUILD.gn.patch b/patches/components-external_intents-android-BUILD.gn.patch index aa0e2aa30650..a6a9d8e62945 100644 --- a/patches/components-external_intents-android-BUILD.gn.patch +++ b/patches/components-external_intents-android-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/components/external_intents/android/BUILD.gn b/components/external_intents/android/BUILD.gn -index 2eccc0ef9a0add5185cb474d8803b0588519c817..82a87d900968a1b8764fe192e67ca62f85c84d42 100644 +index 4eac51b0811d9632099dafb3fa5d2c09a685bb26..a1701dba5a49897aa8ff568b52c7dce3d1d3796c 100644 --- a/components/external_intents/android/BUILD.gn +++ b/components/external_intents/android/BUILD.gn @@ -64,6 +64,7 @@ static_library("android") { diff --git a/patches/components-feed-features.gni.patch b/patches/components-feed-features.gni.patch deleted file mode 100644 index 6f78b056f062..000000000000 --- a/patches/components-feed-features.gni.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/components/feed/features.gni b/components/feed/features.gni -index 1d2d7e3a50cdfc5de0323724801ade7bedb1adc8..b0152c4a1a244fa6ce151f4bbaf059191a6f9b2d 100644 ---- a/components/feed/features.gni -+++ b/components/feed/features.gni -@@ -30,5 +30,5 @@ declare_args() { - - if (is_android && android_channel != "default") { - # You probably don't want to build without either version in a Clank release. -- assert(enable_feed_v1 || enable_feed_v2) -+ # assert(enable_feed_v1 || enable_feed_v2) - } diff --git a/patches/components-infobars-core-infobar_delegate.h.patch b/patches/components-infobars-core-infobar_delegate.h.patch index fbfbba95f924..7e716078f75c 100644 --- a/patches/components-infobars-core-infobar_delegate.h.patch +++ b/patches/components-infobars-core-infobar_delegate.h.patch @@ -1,10 +1,10 @@ diff --git a/components/infobars/core/infobar_delegate.h b/components/infobars/core/infobar_delegate.h -index 912272db6edec27d5dbd6466f4f3d60c5f03833f..bba82223567f4e9b66476c10b4d827a7a1d3adea 100644 +index 98922a3e36f5cf2b88a470dd163571fa52681408..2a2ba2d552235d8876a520d91f7f2a3554907ea6 100644 --- a/components/infobars/core/infobar_delegate.h +++ b/components/infobars/core/infobar_delegate.h @@ -173,6 +173,7 @@ class InfoBarDelegate { ROSETTA_REQUIRED_INFOBAR_DELEGATE = 103, - WEBID_PERMISSION_INFOBAR_DELEGATE = 104, + // Removed: WEBID_PERMISSION_INFOBAR_DELEGATE = 104, AUTOFILL_OFFER_NOTIFICATION_INFOBAR_DELEGATE = 105, + BRAVE_INFOBAR_DELEGATE_IDENTIFIERS }; diff --git a/patches/components-omnibox-browser-BUILD.gn.patch b/patches/components-omnibox-browser-BUILD.gn.patch index 9f89e3928dda..8ee9bab43864 100644 --- a/patches/components-omnibox-browser-BUILD.gn.patch +++ b/patches/components-omnibox-browser-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/components/omnibox/browser/BUILD.gn b/components/omnibox/browser/BUILD.gn -index 06ca8e2700531b08bf87bedf8273ce19e30bf52f..149a3b1e015de1df7bc02e36d147c42349f3b446 100644 +index 10486d7e067e57e4b16c8f680341052fd226f803..eea9d6014e1cf3dca68f021a4f0ad5d8d412fdc5 100644 --- a/components/omnibox/browser/BUILD.gn +++ b/components/omnibox/browser/BUILD.gn @@ -263,6 +263,7 @@ static_library("browser") { diff --git a/patches/components-omnibox-browser-autocomplete_controller.cc.patch b/patches/components-omnibox-browser-autocomplete_controller.cc.patch index bc4e0ffdf6c9..416bdf9d6617 100644 --- a/patches/components-omnibox-browser-autocomplete_controller.cc.patch +++ b/patches/components-omnibox-browser-autocomplete_controller.cc.patch @@ -1,5 +1,5 @@ diff --git a/components/omnibox/browser/autocomplete_controller.cc b/components/omnibox/browser/autocomplete_controller.cc -index a6363ba3335cf231ff4c6d10588ecb01b385681b..1d6b880830389740b135a587e5c0a8bb23ad0c77 100644 +index f58b75e275e59424701196d35842be33a0261ea1..91d5d888b277672df2ec0c5c2dc5989b82a8f4cc 100644 --- a/components/omnibox/browser/autocomplete_controller.cc +++ b/components/omnibox/browser/autocomplete_controller.cc @@ -289,6 +289,7 @@ AutocompleteController::AutocompleteController( diff --git a/patches/components-omnibox-browser-omnibox_edit_model.cc.patch b/patches/components-omnibox-browser-omnibox_edit_model.cc.patch index d9bd20a37fdb..946ab90bcd33 100644 --- a/patches/components-omnibox-browser-omnibox_edit_model.cc.patch +++ b/patches/components-omnibox-browser-omnibox_edit_model.cc.patch @@ -1,5 +1,5 @@ diff --git a/components/omnibox/browser/omnibox_edit_model.cc b/components/omnibox/browser/omnibox_edit_model.cc -index 28f6f297db2441ca180df3902b3a5aef778bf7d4..e83a4ab515fb9ff3c956d773c6d0de2d7d00cb9f 100644 +index 1ab498c0401157ade690c4a57976bf5e0483b797..3f22d221eb5028ffb58f34e8b7d817c2be999e22 100644 --- a/components/omnibox/browser/omnibox_edit_model.cc +++ b/components/omnibox/browser/omnibox_edit_model.cc @@ -354,6 +354,7 @@ void OmniboxEditModel::AdjustTextForCopy(int sel_min, diff --git a/patches/components-os_crypt-keychain_password_mac.mm.patch b/patches/components-os_crypt-keychain_password_mac.mm.patch index 4d3954fbf06d..9b4921f800ae 100644 --- a/patches/components-os_crypt-keychain_password_mac.mm.patch +++ b/patches/components-os_crypt-keychain_password_mac.mm.patch @@ -1,5 +1,5 @@ diff --git a/components/os_crypt/keychain_password_mac.mm b/components/os_crypt/keychain_password_mac.mm -index 3b8543488d0bb0ae7c0996db70f9527bc5e34cd8..ff8ecf90e685823c27657cc75b59bdb8a1ea4146 100644 +index 6654c46eb0af784a3a2ff64569d5d1931b9fae30..9640ca797a416a4bd73c1e774b6fb6c8e6e320b5 100644 --- a/components/os_crypt/keychain_password_mac.mm +++ b/components/os_crypt/keychain_password_mac.mm @@ -7,6 +7,7 @@ diff --git a/patches/components-page_info-page_info.cc.patch b/patches/components-page_info-page_info.cc.patch index 8878f187be55..d21b49a896bb 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 6ca97eaca7a055af5e1874d8453ef0d95efefbe4..a9654cba0604721611c6ceb06d23717d064e427e 100644 +index ecb23f38f28cf897404f9d458f46e414372ff8a2..234a8a5d04e76c57fbf1293ae5cea81b86d2bad3 100644 --- a/components/page_info/page_info.cc +++ b/components/page_info/page_info.cc -@@ -961,6 +961,7 @@ void PageInfo::PresentSitePermissions() { +@@ -960,6 +960,7 @@ void PageInfo::PresentSitePermissions() { } } diff --git a/patches/components-page_info-page_info_ui.cc.patch b/patches/components-page_info-page_info_ui.cc.patch index 8c7d8cda38ec..806cc02a06f6 100644 --- a/patches/components-page_info-page_info_ui.cc.patch +++ b/patches/components-page_info-page_info_ui.cc.patch @@ -1,5 +1,5 @@ diff --git a/components/page_info/page_info_ui.cc b/components/page_info/page_info_ui.cc -index 8fe18e4fd94c65fa40c4c841b2635098fa91bb31..584626e076b7a94071c3f462feeedbb727c71b8a 100644 +index ddf881ff86b9b6f270fd449303a528a978a3895f..5607be9b6a01ceb2f7837cd0ba4e260a71336c44 100644 --- a/components/page_info/page_info_ui.cc +++ b/components/page_info/page_info_ui.cc @@ -652,6 +652,7 @@ const gfx::ImageSkia PageInfoUI::GetPermissionIcon( 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 72917c967f60..d558d0358a77 100644 --- a/patches/components-password_manager-core-browser-login_database.cc.patch +++ b/patches/components-password_manager-core-browser-login_database.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/password_manager/core/browser/login_database.cc b/components/password_manager/core/browser/login_database.cc -index dc76a4aa02520ac50274d44efac5256e6beb59d9..ac96d3785d89a72da0313e2d324707006e20c552 100644 +index b3e09a03bd947242297b22c80a1a99d7f477a0d0..14c69ba5495e9e15e29d8d62b799b74b2c24e230 100644 --- a/components/password_manager/core/browser/login_database.cc +++ b/components/password_manager/core/browser/login_database.cc -@@ -2035,6 +2035,7 @@ FormRetrievalResult LoginDatabase::StatementToForms( +@@ -2030,6 +2030,7 @@ FormRetrievalResult LoginDatabase::StatementToForms( EncryptionResult result = InitPasswordFormFromStatement( *statement, /*decrypt_and_fill_password_value=*/true, &primary_key, new_form.get()); diff --git a/patches/components-permissions-permission_uma_util.cc.patch b/patches/components-permissions-permission_uma_util.cc.patch index 0ebcf4f48045..947075b6325c 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 68828c19b1660fcded7984869c7f33b7f447e5c4..9acbab38c38b9c825e36dbd8e73830cb8070b663 100644 +index 8255cdfc3392ea790ecde266233702999cbc8a2e..b859659dd72f413933420aea7d3f7a94dbd74ad8 100644 --- a/components/permissions/permission_uma_util.cc +++ b/components/permissions/permission_uma_util.cc -@@ -103,6 +103,7 @@ RequestTypeForUma GetUmaValueForRequestType(RequestType request_type) { +@@ -105,6 +105,7 @@ RequestTypeForUma GetUmaValueForRequestType(RequestType request_type) { case RequestType::kWindowPlacement: return RequestTypeForUma::PERMISSION_WINDOW_PLACEMENT; #endif diff --git a/patches/components-permissions-request_type.cc.patch b/patches/components-permissions-request_type.cc.patch index b88bed2fc4d9..5c992a6fcde6 100644 --- a/patches/components-permissions-request_type.cc.patch +++ b/patches/components-permissions-request_type.cc.patch @@ -1,8 +1,8 @@ diff --git a/components/permissions/request_type.cc b/components/permissions/request_type.cc -index c0d6d512e08bf2d9382f562592b1f9bbef63c439..d2a4eb628c33826fc2a93a2e0ed78f2bdf4c67d9 100644 +index b0fb39f024edf7204305f7c70e25138eafbe31ee..d313cbdeb80ad9aa7e6f813b4142585de91ee57b 100644 --- a/components/permissions/request_type.cc +++ b/components/permissions/request_type.cc -@@ -102,6 +102,7 @@ const gfx::VectorIcon& GetIconIdDesktop(RequestType type) { +@@ -103,6 +103,7 @@ const gfx::VectorIcon& GetIconIdDesktop(RequestType type) { return vector_icons::kCookieIcon; case RequestType::kWindowPlacement: return vector_icons::kSelectWindowIcon; @@ -10,3 +10,11 @@ index c0d6d512e08bf2d9382f562592b1f9bbef63c439..d2a4eb628c33826fc2a93a2e0ed78f2b } NOTREACHED(); return gfx::kNoneIcon; +@@ -229,6 +230,7 @@ const char* PermissionKeyForRequestType(permissions::RequestType request_type) { + case permissions::RequestType::kWindowPlacement: + return "window_placement"; + #endif ++ BRAVE_PERMISSION_KEY_FOR_REQUEST_TYPE + } + + return nullptr; diff --git a/patches/components-permissions-request_type.h.patch b/patches/components-permissions-request_type.h.patch index 2e418f76bfd9..72eb65777e95 100644 --- a/patches/components-permissions-request_type.h.patch +++ b/patches/components-permissions-request_type.h.patch @@ -1,5 +1,5 @@ diff --git a/components/permissions/request_type.h b/components/permissions/request_type.h -index c560723b184f2cc114f3c26787867c5ed6d73104..247511538d2a043d713541900e039de1afa7684e 100644 +index 8e66508390c9ae8f63c38ad408bc7d00f2e975b2..2e3375b70e768f09405cb4a27f0434fe262a8eda 100644 --- a/components/permissions/request_type.h +++ b/components/permissions/request_type.h @@ -52,6 +52,7 @@ enum class RequestType { diff --git a/patches/components-policy-tools-generate_policy_source.py.patch b/patches/components-policy-tools-generate_policy_source.py.patch index 2ce3025f405b..5c3ca114d87a 100644 --- a/patches/components-policy-tools-generate_policy_source.py.patch +++ b/patches/components-policy-tools-generate_policy_source.py.patch @@ -1,5 +1,5 @@ diff --git a/components/policy/tools/generate_policy_source.py b/components/policy/tools/generate_policy_source.py -index d9beb4d9c29eb14fabd213d97805144cc6d30375..b5e91b5fa90a3e42fa840b08f816c6b002da1cb3 100755 +index 154b624322d49bb19d7ab81aca83e70d17d6b29b..c87b75dab6fb23cb60bafe60241ecc9ada4379c4 100755 --- a/components/policy/tools/generate_policy_source.py +++ b/components/policy/tools/generate_policy_source.py @@ -42,6 +42,7 @@ PLATFORM_STRINGS = { diff --git a/patches/components-rappor-log_uploader.cc.patch b/patches/components-rappor-log_uploader.cc.patch deleted file mode 100644 index 7a06ce7b4715..000000000000 --- a/patches/components-rappor-log_uploader.cc.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/components/rappor/log_uploader.cc b/components/rappor/log_uploader.cc -index 20f5d86a80038be882aaec084c22084916dba0f8..c195e17d397517080ba709ba66aa3db054ca1925 100644 ---- a/components/rappor/log_uploader.cc -+++ b/components/rappor/log_uploader.cc -@@ -68,6 +68,7 @@ LogUploader::LogUploader( - LogUploader::~LogUploader() {} - - void LogUploader::Start() { -+ return; // feature disabled in Brave - is_running_ = true; - StartScheduledUpload(); - } diff --git a/patches/components-search_engines-BUILD.gn.patch b/patches/components-search_engines-BUILD.gn.patch index ebcd79979186..985fdbbbb012 100644 --- a/patches/components-search_engines-BUILD.gn.patch +++ b/patches/components-search_engines-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/components/search_engines/BUILD.gn b/components/search_engines/BUILD.gn -index d95854ac6098e7b8b721575900f44e549bab9fc3..b87a60a2a7e926009265cd94d197e540036c017a 100644 +index c2b09f071782eb1a9a3a7cbadc25b66a651cb89e..261310df1f7e24421230e897a22e767a4740cc98 100644 --- a/components/search_engines/BUILD.gn +++ b/components/search_engines/BUILD.gn -@@ -195,6 +195,7 @@ json_to_struct("prepopulated_engines") { +@@ -197,6 +197,7 @@ json_to_struct("prepopulated_engines") { schema_file = "prepopulated_engines_schema.json" namespace = "TemplateURLPrepopulateData" deps = [ ":search_engine_type" ] diff --git a/patches/components-search_engines-prepopulated_engines.json.patch b/patches/components-search_engines-prepopulated_engines.json.patch index 5a8604cc3b44..dc4c4ec44d0d 100644 --- a/patches/components-search_engines-prepopulated_engines.json.patch +++ b/patches/components-search_engines-prepopulated_engines.json.patch @@ -1,5 +1,5 @@ diff --git a/components/search_engines/prepopulated_engines.json b/components/search_engines/prepopulated_engines.json -index 6e83c8e501c05c978a0eae040ec4d24b1808a5cc..ca108679b3ca31d1926a1d236dfc71ea40e23c69 100644 +index 269a4897ffc73efce0d50f305cbb00a6ccf74281..dc2ee421ae98570e7bd8d42a22d9d9055c2c3f18 100644 --- a/components/search_engines/prepopulated_engines.json +++ b/components/search_engines/prepopulated_engines.json @@ -91,17 +91,6 @@ diff --git a/patches/components-signin-internal-identity_manager-BUILD.gn.patch b/patches/components-signin-internal-identity_manager-BUILD.gn.patch index 450c2437053e..6d76c0e1bb71 100644 --- a/patches/components-signin-internal-identity_manager-BUILD.gn.patch +++ b/patches/components-signin-internal-identity_manager-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/components/signin/internal/identity_manager/BUILD.gn b/components/signin/internal/identity_manager/BUILD.gn -index a061d5bde83a2d32182e5064a562a820d8637a5f..b26509b703478877357e3f9661e4db42e243276f 100644 +index 206adf213cbf5673d7e29a2af4c07a6ccf17b84f..00a02451f03fd7c3fc2c0b48cb187610460020c8 100644 --- a/components/signin/internal/identity_manager/BUILD.gn +++ b/components/signin/internal/identity_manager/BUILD.gn @@ -4,6 +4,7 @@ @@ -10,7 +10,7 @@ index a061d5bde83a2d32182e5064a562a820d8637a5f..b26509b703478877357e3f9661e4db42 # This target forms the core of the IdentityManager implementation # (//components/signin/public/identity_manager/identity_manager.*). -@@ -129,6 +130,7 @@ source_set("identity_manager") { +@@ -125,6 +126,7 @@ source_set("identity_manager") { "device_accounts_synchronizer_impl.h", ] } diff --git a/patches/components-signin-public-identity_manager-BUILD.gn.patch b/patches/components-signin-public-identity_manager-BUILD.gn.patch index 270557342a89..438a64ce32da 100644 --- a/patches/components-signin-public-identity_manager-BUILD.gn.patch +++ b/patches/components-signin-public-identity_manager-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/components/signin/public/identity_manager/BUILD.gn b/components/signin/public/identity_manager/BUILD.gn -index 5ba621b1bfebd22fe8811307a6f480c0bbf6f7da..1573f93c47e4d4669738c239737b025a2702dee7 100644 +index a28cbfd17ca7d8f3e24f0d9690dfffdb06829d8f..66559c07b501292ea635dab053beb1498a33ba4e 100644 --- a/components/signin/public/identity_manager/BUILD.gn +++ b/components/signin/public/identity_manager/BUILD.gn @@ -7,6 +7,7 @@ import("//build/config/chromeos/ui_mode.gni") @@ -10,7 +10,7 @@ index 5ba621b1bfebd22fe8811307a6f480c0bbf6f7da..1573f93c47e4d4669738c239737b025a source_set("identity_manager") { sources = [ -@@ -80,6 +81,7 @@ source_set("identity_manager") { +@@ -82,6 +83,7 @@ source_set("identity_manager") { # together and include headers from each other. "//components/signin/internal/identity_manager", ] diff --git a/patches/components-strings-BUILD.gn.patch b/patches/components-strings-BUILD.gn.patch index 3c5af58be3a4..804e8087dc76 100644 --- a/patches/components-strings-BUILD.gn.patch +++ b/patches/components-strings-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/components/strings/BUILD.gn b/components/strings/BUILD.gn -index 776127ec45451450394ec6e39e555048fa0e6ee6..922142b79555f9083a67d35a652920ba8a2e90a4 100644 +index 15bf6b003892f39d4946ccfad7d630db19751d1b..5988642823db876c86f71168b396aa25cb51e7c3 100644 --- a/components/strings/BUILD.gn +++ b/components/strings/BUILD.gn -@@ -45,6 +45,7 @@ grit("components_strings") { +@@ -44,6 +44,7 @@ grit("components_strings") { if (is_android) { outputs += android_components_strings_java_resources } @@ -10,10 +10,10 @@ index 776127ec45451450394ec6e39e555048fa0e6ee6..922142b79555f9083a67d35a652920ba } if (is_android) { -@@ -62,7 +63,7 @@ grit("components_chromium_strings") { - # on desktop linux when this is run under Python3. Fix this. - run_under_python2 = true +@@ -56,7 +57,7 @@ if (is_android) { + } + grit("components_chromium_strings") { - source = "../components_chromium_strings.grd" + source = "../components_${branding_path_component}_strings.grd" outputs = [ "grit/components_chromium_strings.h" ] diff --git a/patches/components-sync-BUILD.gn.patch b/patches/components-sync-BUILD.gn.patch deleted file mode 100644 index 320d10d36ba1..000000000000 --- a/patches/components-sync-BUILD.gn.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/components/sync/BUILD.gn b/components/sync/BUILD.gn -index 8c555a9c99d2a02ab1954cdaeaa49d1d332ee916..655ee6b2d7de07d1b78c261debe3fad92bb9bf98 100644 ---- a/components/sync/BUILD.gn -+++ b/components/sync/BUILD.gn -@@ -274,6 +274,7 @@ static_library("rest_of_sync") { - "nigori/pending_local_nigori_commit.cc", - "nigori/pending_local_nigori_commit.h", - ] -+ sources += brave_components_sync_sources - - configs += [ "//build/config:precompiled_headers" ] - diff --git a/patches/components-sync-driver-BUILD.gn.patch b/patches/components-sync-driver-BUILD.gn.patch index 551cf4d7df20..88131096504c 100644 --- a/patches/components-sync-driver-BUILD.gn.patch +++ b/patches/components-sync-driver-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/components/sync/driver/BUILD.gn b/components/sync/driver/BUILD.gn -index 0f91c41e563f026f473af4a57f5c6de23c5bde58..ba961c5a9f56a2aa99e1ca53084661e03edabc2b 100644 +index 1171a23a85e2e4b1138bccfe5900e76e7c75f95d..86832f953d575ba8ecd54b9d662feea6679b84d5 100644 --- a/components/sync/driver/BUILD.gn +++ b/components/sync/driver/BUILD.gn @@ -114,6 +114,7 @@ static_library("driver") { diff --git a/patches/components-sync-driver-profile_sync_service.h.patch b/patches/components-sync-driver-profile_sync_service.h.patch index eed357707c45..7df69073a80a 100644 --- a/patches/components-sync-driver-profile_sync_service.h.patch +++ b/patches/components-sync-driver-profile_sync_service.h.patch @@ -1,10 +1,10 @@ diff --git a/components/sync/driver/profile_sync_service.h b/components/sync/driver/profile_sync_service.h -index 83a46645ee08815fe8f41da81d0a753480f8192e..cf720327932f3f2b300f1f5adb33b89d616ab6b0 100644 +index 7933f8882a375b69e52623f48d200d8bd0624e49..069ea10a2a6375f9d17a01658ccca6b49c38c554 100644 --- a/components/sync/driver/profile_sync_service.h +++ b/components/sync/driver/profile_sync_service.h -@@ -254,6 +254,7 @@ class ProfileSyncService : public SyncService, +@@ -246,6 +246,7 @@ class ProfileSyncService : public SyncService, - static std::string GenerateCacheGUIDForTest(); + SyncClient* GetSyncClientForTest(); + BRAVE_PROFILE_SYNC_SERVICE_H_ private: diff --git a/patches/components-sync-engine-BUILD.gn.patch b/patches/components-sync-engine-BUILD.gn.patch new file mode 100644 index 000000000000..990e4f5fe735 --- /dev/null +++ b/patches/components-sync-engine-BUILD.gn.patch @@ -0,0 +1,12 @@ +diff --git a/components/sync/engine/BUILD.gn b/components/sync/engine/BUILD.gn +index 9fd0e5fab5f580fd28c12cf8ff4dc2025fcc8a9c..c4bf15915a00f26f35a0e56063295288eb252f51 100644 +--- a/components/sync/engine/BUILD.gn ++++ b/components/sync/engine/BUILD.gn +@@ -162,6 +162,7 @@ static_library("engine") { + "traffic_logger.h", + "update_handler.h", + ] ++ import("//brave/components/sync/sources.gni") sources += brave_components_sync_sources + + configs += [ + # The target has >50 .cc files, so speed up the build with diff --git a/patches/components-sync-engine-model_type_worker.h.patch b/patches/components-sync-engine-model_type_worker.h.patch new file mode 100644 index 000000000000..9bec6fd767bd --- /dev/null +++ b/patches/components-sync-engine-model_type_worker.h.patch @@ -0,0 +1,12 @@ +diff --git a/components/sync/engine/model_type_worker.h b/components/sync/engine/model_type_worker.h +index 549122b3ea45468ed2eb5f97bdedf5a7c1e230e6..872982146113613ca8c1128eff6cdd751bb256ff 100644 +--- a/components/sync/engine/model_type_worker.h ++++ b/components/sync/engine/model_type_worker.h +@@ -128,6 +128,7 @@ class ModelTypeWorker : public UpdateHandler, + min_gu_responses_to_ignore_key_ = min_gu_responses_to_ignore_key; + } + ++ BRAVE_MODEL_TYPE_WORKER_H_ + private: + struct UnknownEncryptionKeyInfo { + // Not increased if the cryptographer knows it's in a pending state diff --git a/patches/components-sync-engine_impl-model_type_worker.h.patch b/patches/components-sync-engine_impl-model_type_worker.h.patch deleted file mode 100644 index 1383d9ef8f85..000000000000 --- a/patches/components-sync-engine_impl-model_type_worker.h.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/components/sync/engine_impl/model_type_worker.h b/components/sync/engine_impl/model_type_worker.h -index f3ef9da0d7a80b4dfa7e833a803e87da854a55ab..ffbe4112379b8866c12a6408afc2eb0b5ab32947 100644 ---- a/components/sync/engine_impl/model_type_worker.h -+++ b/components/sync/engine_impl/model_type_worker.h -@@ -123,6 +123,7 @@ class ModelTypeWorker : public UpdateHandler, - min_gu_responses_to_ignore_key_ = min_gu_responses_to_ignore_key; - } - -+ BRAVE_MODEL_TYPE_WORKER_H_ - private: - struct UnknownEncryptionKeyInfo { - // Not increased if the cryptographer knows it's in a pending state diff --git a/patches/components-sync-protocol-proto_visitors.h.patch b/patches/components-sync-protocol-proto_visitors.h.patch index 5fefac210b56..74859c16143c 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 4b5da2b180de27588fd03ab751b6c3a3fc5966f3..279113a5a85f1a65b8c8d908b2d38a5f9a74730f 100644 +index 97aec741f705de04cf01fac98b515beb677933e6..51b165844fc3ce8dfb5188b06062f5bc11501cb9 100644 --- a/components/sync/protocol/proto_visitors.h +++ b/components/sync/protocol/proto_visitors.h -@@ -377,6 +377,7 @@ VISIT_PROTO_FIELDS(const sync_pb::DeviceInfoSpecifics& proto) { +@@ -379,6 +379,7 @@ VISIT_PROTO_FIELDS(const sync_pb::DeviceInfoSpecifics& proto) { VISIT(manufacturer); VISIT(last_updated_timestamp); VISIT(feature_fields); @@ -10,7 +10,7 @@ index 4b5da2b180de27588fd03ab751b6c3a3fc5966f3..279113a5a85f1a65b8c8d908b2d38a5f VISIT(sharing_fields); VISIT(invalidation_fields); } -@@ -384,7 +385,7 @@ VISIT_PROTO_FIELDS(const sync_pb::DeviceInfoSpecifics& proto) { +@@ -386,7 +387,7 @@ VISIT_PROTO_FIELDS(const sync_pb::DeviceInfoSpecifics& proto) { VISIT_PROTO_FIELDS(const sync_pb::FeatureSpecificFields& proto) { VISIT(send_tab_to_self_receiving_enabled); } diff --git a/patches/components-sync_device_info-BUILD.gn.patch b/patches/components-sync_device_info-BUILD.gn.patch index d16e30febfae..d15727f2df20 100644 --- a/patches/components-sync_device_info-BUILD.gn.patch +++ b/patches/components-sync_device_info-BUILD.gn.patch @@ -1,10 +1,10 @@ diff --git a/components/sync_device_info/BUILD.gn b/components/sync_device_info/BUILD.gn -index e1596665d93d53547175c39a19925175045bdcf0..d46dc964eae97571b1bf4dd54b437beb13debe06 100644 +index 1ddebb1293a8b98be9378f352cbcb3a9991e2f0b..51463402781c289a6d4fac6253e1a290a37807dd 100644 --- a/components/sync_device_info/BUILD.gn +++ b/components/sync_device_info/BUILD.gn @@ -78,6 +78,7 @@ static_library("sync_device_info") { # Required by device_info_util_linux.cc on Chrome OS. - deps += [ "//chromeos/constants" ] + deps += [ "//ash/constants" ] } + sources += brave_components_sync_device_info_sources deps += brave_components_sync_device_info_deps } diff --git a/patches/components-sync_device_info-device_info_sync_bridge.cc.patch b/patches/components-sync_device_info-device_info_sync_bridge.cc.patch index 32e47073b275..0d0fa78e3295 100644 --- a/patches/components-sync_device_info-device_info_sync_bridge.cc.patch +++ b/patches/components-sync_device_info-device_info_sync_bridge.cc.patch @@ -1,5 +1,5 @@ diff --git a/components/sync_device_info/device_info_sync_bridge.cc b/components/sync_device_info/device_info_sync_bridge.cc -index 4be3d8dcb1959ff0286c067a58e92c9407c74e0e..6ebc31b73e05d6ebdd98ff56f68a4d655681ed23 100644 +index 5c375ef7bee55e532064125d0f23b70a96549ade..5dd6d45d5ae99aee59429edfd492807cdff258b9 100644 --- a/components/sync_device_info/device_info_sync_bridge.cc +++ b/components/sync_device_info/device_info_sync_bridge.cc @@ -174,6 +174,7 @@ std::unique_ptr MakeLocalDeviceSpecifics( diff --git a/patches/components-sync_device_info-device_info_sync_bridge_unittest.cc.patch b/patches/components-sync_device_info-device_info_sync_bridge_unittest.cc.patch index 93db6561a8fa..210729ef8582 100644 --- a/patches/components-sync_device_info-device_info_sync_bridge_unittest.cc.patch +++ b/patches/components-sync_device_info-device_info_sync_bridge_unittest.cc.patch @@ -1,5 +1,5 @@ diff --git a/components/sync_device_info/device_info_sync_bridge_unittest.cc b/components/sync_device_info/device_info_sync_bridge_unittest.cc -index 67e7bcda0ff36a77f81eea72a98bd6fd66ab1bc4..3ef174fa18e0f94b030d88ad89fed34090de2547 100644 +index ca48859c9390beed7fee40205da013fea437aa7a..1819d4d7f2dda0b357b172700bfcd7f9b62bd3a5 100644 --- a/components/sync_device_info/device_info_sync_bridge_unittest.cc +++ b/components/sync_device_info/device_info_sync_bridge_unittest.cc @@ -864,7 +864,7 @@ TEST_F(DeviceInfoSyncBridgeTest, ApplySyncChangesWithLocalGuid) { diff --git a/patches/components-update_client-updater_state_win.cc.patch b/patches/components-update_client-updater_state_win.cc.patch index 963435e9547b..dfdc0ce9f7de 100644 --- a/patches/components-update_client-updater_state_win.cc.patch +++ b/patches/components-update_client-updater_state_win.cc.patch @@ -1,5 +1,5 @@ diff --git a/components/update_client/updater_state_win.cc b/components/update_client/updater_state_win.cc -index 89c2c186f9c095d6c2a9210ca2c4e8a94ee64b98..7aa7afec5dc013785973a5ef2d13bf8367ebe5d6 100644 +index 565073acfa1b1bfc09d18e0b88dba67b5d1714fe..152442fabbfe14474aef6f023ed33769f51a87c3 100644 --- a/components/update_client/updater_state_win.cc +++ b/components/update_client/updater_state_win.cc @@ -25,20 +25,32 @@ namespace { 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 61d3050332cf..5083d2e06253 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 2c1ace66fecfe086c3f500995c11ca5424f9560f..6882266bd99dcc78e446b33b93b956e8f664d957 100644 +index b2b48bda88f7f67e4cd90b0f2e1e22a5e07c6a73..6e2b606e187518f331e4d22ac0ca9d8704718bed 100644 --- a/content/browser/renderer_host/navigation_controller_impl.cc +++ b/content/browser/renderer_host/navigation_controller_impl.cc -@@ -3089,16 +3089,17 @@ void NavigationControllerImpl::NavigateWithoutEntry( +@@ -3062,16 +3062,17 @@ void 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 f8eaea7c1210..c803fc603927 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 24450c34eaed19d06bed16368c21ce838ff21e88..3c87df72bd03471c3e8456da1e219c97112c1ddd 100644 +index dae1c91d2d720f09b9a0840d829d4cc8600232ba..7e987915f766bd320cb1db2924047931f4adf4df 100644 --- a/content/browser/renderer_host/navigation_request.cc +++ b/content/browser/renderer_host/navigation_request.cc -@@ -300,7 +300,7 @@ void AddAdditionalRequestHeaders( +@@ -302,7 +302,7 @@ void AddAdditionalRequestHeaders( headers->SetHeaderIfMissing( net::HttpRequestHeaders::kUserAgent, user_agent_override.empty() @@ -11,7 +11,7 @@ index 24450c34eaed19d06bed16368c21ce838ff21e88..3c87df72bd03471c3e8456da1e219c97 : user_agent_override); if (!render_prefs.enable_referrers) { -@@ -1968,6 +1968,7 @@ void NavigationRequest::OnRequestRedirected( +@@ -2041,6 +2041,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); @@ -19,7 +19,7 @@ index 24450c34eaed19d06bed16368c21ce838ff21e88..3c87df72bd03471c3e8456da1e219c97 common_params_->referrer = Referrer::SanitizeForRequest( common_params_->url, *common_params_->referrer); -@@ -2931,6 +2932,7 @@ void NavigationRequest::OnStartChecksComplete( +@@ -3079,6 +3080,7 @@ void NavigationRequest::OnStartChecksComplete( headers.MergeFrom(TakeModifiedRequestHeaders()); begin_params_->headers = headers.ToString(); @@ -27,7 +27,7 @@ index 24450c34eaed19d06bed16368c21ce838ff21e88..3c87df72bd03471c3e8456da1e219c97 // TODO(clamy): Avoid cloning the navigation params and create the // ResourceRequest directly here. std::vector> interceptor; -@@ -5107,7 +5109,7 @@ void NavigationRequest::SetIsOverridingUserAgent(bool override_ua) { +@@ -5413,7 +5415,7 @@ void NavigationRequest::SetIsOverridingUserAgent(bool override_ua) { auto user_agent_override = GetUserAgentOverride(); headers.SetHeader(net::HttpRequestHeaders::kUserAgent, user_agent_override.empty() @@ -35,4 +35,4 @@ index 24450c34eaed19d06bed16368c21ce838ff21e88..3c87df72bd03471c3e8456da1e219c97 + BRAVE_NAVIGATION_REQUEST_SET_IS_OVERRIDING_USERAGENT : user_agent_override); BrowserContext* browser_context = - frame_tree_node_->navigator().GetController()->GetBrowserContext(); + frame_tree_node_->navigator().controller().GetBrowserContext(); diff --git a/patches/content-browser-webui-web_ui_impl.cc.patch b/patches/content-browser-webui-web_ui_impl.cc.patch index aa85cb8d6d55..567f585326e4 100644 --- a/patches/content-browser-webui-web_ui_impl.cc.patch +++ b/patches/content-browser-webui-web_ui_impl.cc.patch @@ -1,5 +1,5 @@ diff --git a/content/browser/webui/web_ui_impl.cc b/content/browser/webui/web_ui_impl.cc -index 2fab662372067a27dce21e527b9255a0a9a7ff6e..bf0f0e672f9915d8253fe8e562d3549e15a5e1b0 100644 +index 59d9e46f21cecff772d6c8fa50ed6bca1f2b6ed1..9d98d69a1e3cc41ef5af3ca1fdbb2007b41c4c01 100644 --- a/content/browser/webui/web_ui_impl.cc +++ b/content/browser/webui/web_ui_impl.cc @@ -69,6 +69,7 @@ WebUIImpl::WebUIImpl(WebContentsImpl* contents, RenderFrameHostImpl* frame_host) diff --git a/patches/content-common-BUILD.gn.patch b/patches/content-common-BUILD.gn.patch index dabc1ebcaae3..0b967ae8a6c6 100644 --- a/patches/content-common-BUILD.gn.patch +++ b/patches/content-common-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn -index 088740086946e73c8af4cdf85171c5eb53b26e80..e003e94ff4fea1f04071d418085410f730abba85 100644 +index 2ebbb4249c613924611531043fbad76e790ad01b..f676a13a02e76b0f1cb9809fdbdfc59d9a4042cf 100644 --- a/content/common/BUILD.gn +++ b/content/common/BUILD.gn @@ -42,6 +42,7 @@ source_set("common") { diff --git a/patches/content-public-browser-content_browser_client.h.patch b/patches/content-public-browser-content_browser_client.h.patch index 963b64991cd5..6077f4396e6e 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 c4fc708ab2789d2cf873bb8a5cff64259ab1d184..1ba2c377f5ca643fd93af279d2643cd241cf967f 100644 +index 944f98d0f979942561eb81115437c5d951a9e7d7..5c46ea94a1a8e0cd145b9f8e715e43b24b136db2 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -1810,6 +1810,7 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1831,6 +1831,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 e2a1b0500ff8..e4c651fcc444 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 d59a55cc4ec2341e6a12e59a515589aa634f4de5..2be8a8b9df84887140cd3f65abd583fe0954b143 100644 +index 47e13366517ce80af2d1d0703dfb178ba6bbf303..93561f66d946088c68fe2917f3f34dcd0ada988b 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4763,7 +4763,7 @@ bool RenderFrameImpl::ShouldUseUserAgentOverride() const { +@@ -4624,7 +4624,7 @@ bool RenderFrameImpl::ShouldUseUserAgentOverride() const { // Temporarily return early and fix properly as part of // https://crbug.com/426555. if (render_view_->GetWebView()->MainFrame()->IsWebRemoteFrame()) diff --git a/patches/content-renderer-render_thread_impl.cc.patch b/patches/content-renderer-render_thread_impl.cc.patch index d40cbc81db00..e82ab6af89bf 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 aa1fc3821b47489418129d21a26c79a31ef69cdf..eca2ff6069c53bc3bc365f11fbd683830c33248f 100644 +index ebc8e70064539c56293708dbf1cee5c2d4e508e7..3479305580b42b4bd61fe1f4d3463e3bad558c3c 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -982,6 +982,7 @@ void RenderThreadImpl::InitializeWebKit(mojo::BinderMap* binders) { +@@ -941,6 +941,7 @@ void RenderThreadImpl::InitializeWebKit(mojo::BinderMap* binders) { } 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 1cf7ca65c214..b6e648fc7811 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,5 +1,5 @@ diff --git a/extensions/browser/api/web_request/web_request_api.cc b/extensions/browser/api/web_request/web_request_api.cc -index 316f4883a23b75c9478bebc899ef8460e91214de..8e3639c2d9525dfd4df8662ca1a33d818376b8da 100644 +index a0507b8e1b5ce6e66a32c4957204b5ed91c428e9..02f0934c329e8101e70142a8981980395d79edd5 100644 --- a/extensions/browser/api/web_request/web_request_api.cc +++ b/extensions/browser/api/web_request/web_request_api.cc @@ -1304,6 +1304,9 @@ ExtensionWebRequestEventRouter::OnAuthRequired( diff --git a/patches/extensions-browser-extension_event_histogram_value.h.patch b/patches/extensions-browser-extension_event_histogram_value.h.patch index 95f38d63719e..5da280379354 100644 --- a/patches/extensions-browser-extension_event_histogram_value.h.patch +++ b/patches/extensions-browser-extension_event_histogram_value.h.patch @@ -1,11 +1,11 @@ diff --git a/extensions/browser/extension_event_histogram_value.h b/extensions/browser/extension_event_histogram_value.h -index 101a2ea42eac260ca19342fa6a5172cddab11822..74e47e51bb31aa3ccd99c0bb69cd182c0decde1e 100644 +index df7031f0a52fe0e8e9f24015760cec8457e099b6..74b6fe97deb6a3d24865bde0a46278cdb2099a8b 100644 --- a/extensions/browser/extension_event_histogram_value.h +++ b/extensions/browser/extension_event_histogram_value.h -@@ -494,6 +494,20 @@ enum HistogramValue { - TAB_GROUPS_ON_MOVED = 472, +@@ -495,6 +495,20 @@ enum HistogramValue { TAB_GROUPS_ON_REMOVED = 473, TAB_GROUPS_ON_UPDATED = 474, + FILE_MANAGER_PRIVATE_ON_DRIVE_CONFIRM_DIALOG = 475, + + BRAVE_START = 600, + BRAVE_AD_BLOCKED, diff --git a/patches/extensions-browser-sandboxed_unpacker.cc.patch b/patches/extensions-browser-sandboxed_unpacker.cc.patch index f171e6b3c57f..f4685de359cc 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 af490316224d669df6d39f2f2d725132425d7258..e83ebc0509ddc86e7451e5541d8bafec3f10cc13 100644 +index 948184dda6a45e7ea1524de90f17f9f30e2eed47..bb75280aed8b6371c7196da824d6070427617d48 100644 --- a/extensions/browser/sandboxed_unpacker.cc +++ b/extensions/browser/sandboxed_unpacker.cc -@@ -915,6 +915,7 @@ base::Optional SandboxedUnpacker::RewriteManifestFile( +@@ -991,6 +991,7 @@ base::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-browser-shared_user_script_manager.h.patch b/patches/extensions-browser-shared_user_script_manager.h.patch deleted file mode 100644 index f8323e994ee2..000000000000 --- a/patches/extensions-browser-shared_user_script_manager.h.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/extensions/browser/shared_user_script_manager.h b/extensions/browser/shared_user_script_manager.h -index 55da0eb62a9d59c463dd2286fe1049d1d38e0514..c11c52ea8069de035eac718979b3f6f4ec4e34ab 100644 ---- a/extensions/browser/shared_user_script_manager.h -+++ b/extensions/browser/shared_user_script_manager.h -@@ -19,6 +19,7 @@ - namespace content { - class BrowserContext; - } -+class BraveWalletService; - - namespace extensions { - -@@ -33,6 +34,7 @@ class SharedUserScriptManager : public ExtensionRegistryObserver { - UserScriptLoader* script_loader() { return &loader_; } - - private: -+ friend class ::BraveWalletService; - // ExtensionRegistryObserver implementation. - void OnExtensionLoaded(content::BrowserContext* browser_context, - const Extension* extension) override; diff --git a/patches/extensions-browser-user_script_manager.h.patch b/patches/extensions-browser-user_script_manager.h.patch new file mode 100644 index 000000000000..116a5325fb31 --- /dev/null +++ b/patches/extensions-browser-user_script_manager.h.patch @@ -0,0 +1,21 @@ +diff --git a/extensions/browser/user_script_manager.h b/extensions/browser/user_script_manager.h +index aa6510c99e26c0700629c9f3e6c368cc742825fe..420e21f580750dff79a017146784c6eb9d21ed71 100644 +--- a/extensions/browser/user_script_manager.h ++++ b/extensions/browser/user_script_manager.h +@@ -22,7 +22,7 @@ + namespace content { + class BrowserContext; + } +- ++class BraveWalletService; + namespace extensions { + class UserScriptLoader; + +@@ -50,6 +50,7 @@ class UserScriptManager : public ExtensionRegistryObserver { + WebUIUserScriptLoader* GetUserScriptLoaderForWebUI(const GURL& url); + + private: ++ friend class ::BraveWalletService; + // ExtensionRegistryObserver implementation. + void OnExtensionLoaded(content::BrowserContext* browser_context, + const Extension* extension) override; diff --git a/patches/extensions-common-api-_api_features.json.patch b/patches/extensions-common-api-_api_features.json.patch index 3b056c49e7c5..5095c75d7d9b 100644 --- a/patches/extensions-common-api-_api_features.json.patch +++ b/patches/extensions-common-api-_api_features.json.patch @@ -1,8 +1,8 @@ diff --git a/extensions/common/api/_api_features.json b/extensions/common/api/_api_features.json -index e82d6fdd6f3a477a80a32abf7f382a10a89e5681..241f4e9c27b8dbc6a2b2090f8002d1b41e22f875 100644 +index 7dea7a751bef773ff76690959480c87f443c1b50..0c61bb31f03adf6b40f5526d648bfc1aab2e736f 100644 --- a/extensions/common/api/_api_features.json +++ b/extensions/common/api/_api_features.json -@@ -515,6 +515,7 @@ +@@ -523,6 +523,7 @@ "contexts": ["webui"], "matches": [ "chrome://password-change/*" diff --git a/patches/ios-chrome-browser-prefs-browser_prefs.mm.patch b/patches/ios-chrome-browser-prefs-browser_prefs.mm.patch index 5f6f5f68b59f..b194f51d265c 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 2336daff3897df371d820a51afae3575b2bfd707..6e7c22fc8b76e0c6c5d105fd2bb0abab45c7ac0a 100644 +index 1993f1fba6877542e313f86eabc2f9014090472d..d0cfb62bf90d4aa08729c0373212ef43cc49ccf3 100644 --- a/ios/chrome/browser/prefs/browser_prefs.mm +++ b/ios/chrome/browser/prefs/browser_prefs.mm -@@ -248,6 +248,7 @@ void RegisterBrowserStatePrefs(user_prefs::PrefRegistrySyncable* registry) { +@@ -252,6 +252,7 @@ void RegisterBrowserStatePrefs(user_prefs::PrefRegistrySyncable* registry) { registry->RegisterIntegerPref(kPasswordManagerOnboardingState, 0); registry->RegisterBooleanPref(kWasOnboardingFeatureCheckedBefore, false); registry->RegisterDictionaryPref(kDomainsWithCookiePref); diff --git a/patches/ios-chrome-browser-sync-profile_sync_service_factory.cc.patch b/patches/ios-chrome-browser-sync-profile_sync_service_factory.cc.patch index f0c62b2c4306..6c12f46e098b 100644 --- a/patches/ios-chrome-browser-sync-profile_sync_service_factory.cc.patch +++ b/patches/ios-chrome-browser-sync-profile_sync_service_factory.cc.patch @@ -1,9 +1,9 @@ diff --git a/ios/chrome/browser/sync/profile_sync_service_factory.cc b/ios/chrome/browser/sync/profile_sync_service_factory.cc -index 3507452e0b266a4719164ce767f0ffe902565d45..1152500b048f653ca4b38657d23a6db3a1b89b74 100644 +index 1729fca2683944213c17d656568d7dd0e1bbc4d5..985d4c4d0df4a6377c4efec248832ddb42a34d4d 100644 --- a/ios/chrome/browser/sync/profile_sync_service_factory.cc +++ b/ios/chrome/browser/sync/profile_sync_service_factory.cc -@@ -183,7 +183,7 @@ ProfileSyncServiceFactory::BuildServiceInstanceFor( - } +@@ -172,7 +172,7 @@ ProfileSyncServiceFactory::BuildServiceInstanceFor( + policy_connector ? policy_connector->GetPolicyService() : nullptr; auto pss = - std::make_unique(std::move(init_params)); diff --git a/patches/media-blink-key_system_config_selector.cc.patch b/patches/media-blink-key_system_config_selector.cc.patch index 8c15addef0b1..c4d43c53b981 100644 --- a/patches/media-blink-key_system_config_selector.cc.patch +++ b/patches/media-blink-key_system_config_selector.cc.patch @@ -1,8 +1,8 @@ diff --git a/media/blink/key_system_config_selector.cc b/media/blink/key_system_config_selector.cc -index 95c7b09a75028b9e9293e00757447e78e85d3de4..e554a33d3137e0b42815cd623f7daebdf6e0f1c4 100644 +index 2618c8a1280e08b0eb0609edf11ae86fa720575f..9048df45cf29759c05056ef9adb49dc69482dd2f 100644 --- a/media/blink/key_system_config_selector.cc +++ b/media/blink/key_system_config_selector.cc -@@ -942,6 +942,7 @@ void KeySystemConfigSelector::SelectConfig( +@@ -951,6 +951,7 @@ void KeySystemConfigSelector::SelectConfig( key_systems_->UpdateIfNeeded(); diff --git a/patches/net-BUILD.gn.patch b/patches/net-BUILD.gn.patch index da3168afa283..22ca3c36ebef 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 d214ac4959ff76dd8e95d327c9839ee967d14444..292ce4d3c2c294be04cc8d7ba8ed5ac06e2d58f4 100644 +index 216ed593daed15660ee400228f1386ddb6c8d880..b92633f275bf606270c78d692d8f80ad95863661 100644 --- a/net/BUILD.gn +++ b/net/BUILD.gn -@@ -1176,6 +1176,7 @@ component("net") { +@@ -1165,6 +1165,7 @@ component("net") { "reporting/reporting_uploader.h", ] } diff --git a/patches/net-base-host_port_pair.cc.patch b/patches/net-base-host_port_pair.cc.patch index ab2f45b39c2a..8343d47aa89f 100644 --- a/patches/net-base-host_port_pair.cc.patch +++ b/patches/net-base-host_port_pair.cc.patch @@ -1,8 +1,8 @@ diff --git a/net/base/host_port_pair.cc b/net/base/host_port_pair.cc -index 68c2d5a0c745bec1acb16d827d0e5214bf1f5dda..f10a642ca83f6b46f15b3d6735ba2d2b9e5391b8 100644 +index f24ac7b0d34ca997f9a57ee82ad9cf2a9baed3e3..487f46cb0d79cc0e0d16149116e1b29a56fe6bb3 100644 --- a/net/base/host_port_pair.cc +++ b/net/base/host_port_pair.cc -@@ -24,6 +24,7 @@ HostPortPair::HostPortPair(const std::string& in_host, uint16_t in_port) +@@ -25,6 +25,7 @@ HostPortPair::HostPortPair(const std::string& in_host, uint16_t in_port) // static HostPortPair HostPortPair::FromURL(const GURL& url) { @@ -10,7 +10,7 @@ index 68c2d5a0c745bec1acb16d827d0e5214bf1f5dda..f10a642ca83f6b46f15b3d6735ba2d2b return HostPortPair(url.HostNoBrackets(), static_cast(url.EffectiveIntPort())); } -@@ -35,6 +36,7 @@ HostPortPair HostPortPair::FromIPEndPoint(const IPEndPoint& ipe) { +@@ -36,6 +37,7 @@ HostPortPair HostPortPair::FromIPEndPoint(const IPEndPoint& ipe) { // static HostPortPair HostPortPair::FromString(const std::string& str) { @@ -18,7 +18,7 @@ index 68c2d5a0c745bec1acb16d827d0e5214bf1f5dda..f10a642ca83f6b46f15b3d6735ba2d2b std::vector key_port = base::SplitStringPiece( str, ":", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); if (key_port.size() != 2) -@@ -54,6 +56,7 @@ std::string HostPortPair::ToString() const { +@@ -55,6 +57,7 @@ std::string HostPortPair::ToString() const { std::string ret(HostForURL()); ret += ':'; ret += base::NumberToString(port_); diff --git a/patches/net-cookies-canonical_cookie.cc.patch b/patches/net-cookies-canonical_cookie.cc.patch index 88767de6e4c7..e2ba0b4be28f 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 927fe7c58d400908018c4f6a384b6b59fa4742ba..5adebc0aa5dde1ed608a0629967b7744951761dd 100644 +index 9168c32f3c154216af159435b668db5b61114823..602e16a7a5c28a9f1dc3e87e2fff31cfa09ce1a4 100644 --- a/net/cookies/canonical_cookie.cc +++ b/net/cookies/canonical_cookie.cc -@@ -440,6 +440,7 @@ std::unique_ptr CanonicalCookie::Create( +@@ -434,6 +434,7 @@ std::unique_ptr CanonicalCookie::Create( // Get the port, this will get a default value if a port isn't provided. int source_port = url.EffectiveIntPort(); diff --git a/patches/net-dns-BUILD.gn.patch b/patches/net-dns-BUILD.gn.patch index 96ddf7568861..037b59821fee 100644 --- a/patches/net-dns-BUILD.gn.patch +++ b/patches/net-dns-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/net/dns/BUILD.gn b/net/dns/BUILD.gn -index ea7c29d285af754ee3c1ca0537645b05602d55f4..90a40ae96ca2de9048eab86fd2f45e3e3555b6b4 100644 +index 482b2b93d7c29eec9b60947f966804b83d27c54a..f0564397915c008a4e599625349c98c8e6305472 100644 --- a/net/dns/BUILD.gn +++ b/net/dns/BUILD.gn @@ -23,6 +23,7 @@ source_set("dns") { @@ -10,7 +10,7 @@ index ea7c29d285af754ee3c1ca0537645b05602d55f4..90a40ae96ca2de9048eab86fd2f45e3e public = [] sources = [ -@@ -205,6 +206,7 @@ source_set("host_resolver") { +@@ -210,6 +211,7 @@ source_set("host_resolver") { # wrapper. "//services/proxy_resolver/*", ] @@ -18,7 +18,7 @@ index ea7c29d285af754ee3c1ca0537645b05602d55f4..90a40ae96ca2de9048eab86fd2f45e3e sources = [] public = [] -@@ -309,6 +311,7 @@ source_set("dns_client") { +@@ -314,6 +316,7 @@ source_set("dns_client") { "//net/*", "//services/network/*", ] diff --git a/patches/net-dns-resolve_context.h.patch b/patches/net-dns-resolve_context.h.patch index 0829ba55359d..6604161a1de1 100644 --- a/patches/net-dns-resolve_context.h.patch +++ b/patches/net-dns-resolve_context.h.patch @@ -1,5 +1,5 @@ diff --git a/net/dns/resolve_context.h b/net/dns/resolve_context.h -index fc43188340e54dd509aa58f93a84ca6b770e5a6f..81fa236a973ae31f6ac165b14ee0cc7754253f03 100644 +index 538690d29bac60f16db077b3d8f8845febdd667e..76a996b0934d1e210bd48affc37b7acbff533e19 100644 --- a/net/dns/resolve_context.h +++ b/net/dns/resolve_context.h @@ -176,6 +176,7 @@ class NET_EXPORT_PRIVATE ResolveContext : public base::CheckedObserver { 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 6a6028128292..57868bb2e8eb 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 ccfd4e8f936e8cbc7fae0ff4365d0c82d915e8ee..b69ebe1bc64e88288b8157b9b9787b51eb70c730 100644 +index e7b58d26518b768202691d2f848a6826947693c0..ee13304f5a73dcf1da7c424d7f1608f31b975fb9 100644 --- a/net/proxy_resolution/configured_proxy_resolution_service.cc +++ b/net/proxy_resolution/configured_proxy_resolution_service.cc @@ -1025,6 +1025,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 7fd258b549f6..44afece85e96 100644 --- a/patches/sandbox-policy-win-sandbox_win.cc.patch +++ b/patches/sandbox-policy-win-sandbox_win.cc.patch @@ -1,12 +1,12 @@ diff --git a/sandbox/policy/win/sandbox_win.cc b/sandbox/policy/win/sandbox_win.cc -index 8ae341c38aac9ca59f914a3064df44ea78779b36..e00d733114e0eceebe9c06abda0d36eadfb406b7 100644 +index f03e8049ec7150fd7863f98e2c1155bf81886b0e..fcf881231ee75475bc9b0d0a2085e28e0ed617ee 100644 --- a/sandbox/policy/win/sandbox_win.cc +++ b/sandbox/policy/win/sandbox_win.cc -@@ -933,6 +933,7 @@ ResultCode SandboxWin::StartSandboxedProcess( - launcher_process_command_line.HasSwitch(switches::kNoSandbox)) { - base::LaunchOptions options; - options.handles_to_inherit = handles_to_inherit; -+ BRAVE_START_SANDBOXED_PROCESS - BOOL in_job = true; - // Prior to Windows 8 nested jobs aren't possible. - if (sandbox_type == SandboxType::kNetwork && +@@ -755,6 +755,7 @@ ResultCode LaunchWithoutSandbox( + base::Process* process) { + base::LaunchOptions options; + options.handles_to_inherit = handles_to_inherit; ++ BRAVE_START_SANDBOXED_PROCESS + // Network process runs in a job even when unsandboxed. This is to ensure it + // does not outlive the browser, which could happen if there is a lot of I/O + // on process shutdown, in which case TerminateProcess can fail. See diff --git a/patches/services-network-public-cpp-BUILD.gn.patch b/patches/services-network-public-cpp-BUILD.gn.patch index a15d123901c4..894401fccb8f 100644 --- a/patches/services-network-public-cpp-BUILD.gn.patch +++ b/patches/services-network-public-cpp-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/services/network/public/cpp/BUILD.gn b/services/network/public/cpp/BUILD.gn -index ef1578ae30bd57c5a336529c85f31d180cd62234..eb4786f31edd6c8bc6795a0a58026bc679cea857 100644 +index 1e3bd0ffecc9e1b55c70191ca82c523d2768c351..cf3dc60950261130c37b4990cd604069c537bdf4 100644 --- a/services/network/public/cpp/BUILD.gn +++ b/services/network/public/cpp/BUILD.gn -@@ -149,6 +149,7 @@ component("cpp") { +@@ -153,6 +153,7 @@ component("cpp") { "//services/proxy_resolver/public/mojom", ] diff --git a/patches/services-network-public-mojom-cookie_manager.mojom.patch b/patches/services-network-public-mojom-cookie_manager.mojom.patch index 38d00cb829db..0da6ebf8b6f8 100644 --- a/patches/services-network-public-mojom-cookie_manager.mojom.patch +++ b/patches/services-network-public-mojom-cookie_manager.mojom.patch @@ -1,8 +1,8 @@ diff --git a/services/network/public/mojom/cookie_manager.mojom b/services/network/public/mojom/cookie_manager.mojom -index c736353207ff9b24d7751168d6df3d9375969f95..3af2199bb4227f629c0af6fd23f313f1b3048a99 100644 +index 3efaabbf59b5afe8c735b5f365231407a7b51103..fe3525e7bdea969bb0ff90e412f19459fef16189 100644 --- a/services/network/public/mojom/cookie_manager.mojom +++ b/services/network/public/mojom/cookie_manager.mojom -@@ -274,6 +274,7 @@ struct CookieDeletionFilter { +@@ -284,6 +284,7 @@ struct CookieDeletionFilter { // Delete session/persistent cookies. CookieDeletionSessionControl session_control = IGNORE_CONTROL; diff --git a/patches/services-network-restricted_cookie_manager.cc.patch b/patches/services-network-restricted_cookie_manager.cc.patch index 3b73b1971270..82dd25770a29 100644 --- a/patches/services-network-restricted_cookie_manager.cc.patch +++ b/patches/services-network-restricted_cookie_manager.cc.patch @@ -1,8 +1,8 @@ diff --git a/services/network/restricted_cookie_manager.cc b/services/network/restricted_cookie_manager.cc -index 5aec493bedba6707efe0fca36693bc25f69dcb3a..88f4db67c3db25ccb57098cefa0b6bcd7cbd8743 100644 +index 1515a8afc5a484eba739f500822367dc9bff4381..1b25a1295eff95118aba0d3704220cee0c79b933 100644 --- a/services/network/restricted_cookie_manager.cc +++ b/services/network/restricted_cookie_manager.cc -@@ -278,6 +278,7 @@ void RestrictedCookieManager::GetAllForUrl( +@@ -281,6 +281,7 @@ void RestrictedCookieManager::GetAllForUrl( // removing deprecation warnings. net_options.set_return_excluded_cookies(); @@ -10,11 +10,11 @@ index 5aec493bedba6707efe0fca36693bc25f69dcb3a..88f4db67c3db25ccb57098cefa0b6bcd cookie_store_->GetCookieListWithOptionsAsync( url, net_options, base::BindOnce(&RestrictedCookieManager::CookieListToGetAllForUrlCallback, -@@ -418,6 +419,7 @@ void RestrictedCookieManager::SetCanonicalCookie( - net::CookieOptions options = MakeOptionsForSet( +@@ -432,6 +433,7 @@ void RestrictedCookieManager::SetCanonicalCookie( role_, url, site_for_cookies, isolation_info_, cookie_settings(), cookie_store_->cookie_access_delegate()); + + BRAVE_SETCANONICALCOOKIE - // TODO(chlily): |url| is validated to be the same origin as |origin_|, but - // the path is not checked. If we ever decide to enforce the path constraint - // for setting a cookie, we would need to validate the path of |url| somehow + cookie_store_->SetCanonicalCookieAsync( + std::move(sanitized_cookie), origin_url, options, + base::BindOnce(&RestrictedCookieManager::SetCanonicalCookieResult, diff --git a/patches/third_party-blink-renderer-BUILD.gn.patch b/patches/third_party-blink-renderer-BUILD.gn.patch index a44a8a63fb23..e6bcfc459164 100644 --- a/patches/third_party-blink-renderer-BUILD.gn.patch +++ b/patches/third_party-blink-renderer-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/third_party/blink/renderer/BUILD.gn b/third_party/blink/renderer/BUILD.gn -index a56308fbeecbfdefdf75307200e8272321dc6fd7..70659f65bf7a11ac76e2a95a9dcf058a89b42d24 100644 +index 02ee0bfd103ed5c42d24c7bd349a92fff0abb2af..39e1e903c332af9edaf471754843d8b15cbbab25 100644 --- a/third_party/blink/renderer/BUILD.gn +++ b/third_party/blink/renderer/BUILD.gn @@ -9,6 +9,7 @@ if (is_clang) { 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 87830ea20d15..65c6c5d975d9 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,8 +1,8 @@ diff --git a/third_party/blink/renderer/bindings/generated_in_modules.gni b/third_party/blink/renderer/bindings/generated_in_modules.gni -index 1402bb16906107e83eb2fbaa83a65185d2e74d17..cdc1498059310d77062106d7053c3aaa8e314d9b 100644 +index 46763abf4694f015b451c98a216e52a0abff2e64..3c5c6f6aae95955522e8dbb09fff20529139bbb7 100644 --- a/third_party/blink/renderer/bindings/generated_in_modules.gni +++ b/third_party/blink/renderer/bindings/generated_in_modules.gni -@@ -2268,6 +2268,7 @@ generated_interface_sources_in_modules = [ +@@ -2346,6 +2346,7 @@ generated_interface_sources_in_modules = [ "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_xr_webgl_layer.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_xr_webgl_layer.h", ] 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 66aa779b79fb..2e4c76d30e09 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 10169d8185a3334232fa2f0fa5f3409914ee8551..67e90a8d34fec712671b876e43ef99efa6726786 100644 +index a5cd50fec1c1d7949ba9958c48bec0dd8073f9c3..8d7c9a3ed3e681f5a6e85eb13c0818f35280ef2d 100644 --- a/third_party/blink/renderer/bindings/idl_in_modules.gni +++ b/third_party/blink/renderer/bindings/idl_in_modules.gni -@@ -1054,6 +1054,7 @@ static_idl_files_in_modules = get_path_info( +@@ -1090,6 +1090,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 14e35f9d0a13..ba73c45633fe 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 8c6212b7bb3b0e9e7f5515084488834378625e93..e40b1fd9f9df4a800970fae9f15ae6a0a0985f97 100644 +index 56294a6f77bc5c35f4f0ca506d10a02f260cf7c6..6397987dd2ccbe9e6f80c1f020946c352939d487 100644 --- a/third_party/blink/renderer/core/BUILD.gn +++ b/third_party/blink/renderer/core/BUILD.gn @@ -172,6 +172,7 @@ component("core") { @@ -10,10 +10,10 @@ index 8c6212b7bb3b0e9e7f5515084488834378625e93..e40b1fd9f9df4a800970fae9f15ae6a0 sources = [ "core_initializer.cc", -@@ -266,6 +267,7 @@ component("core") { - "//url", +@@ -270,6 +271,7 @@ component("core") { "//v8", ] + + public_deps += brave_blink_renderer_core_public_deps deps = [ "//build:chromeos_buildflags", diff --git a/patches/third_party-blink-renderer-core-frame-dom_window.h.patch b/patches/third_party-blink-renderer-core-frame-dom_window.h.patch index 54e42ea865bb..c55a1c324f84 100644 --- a/patches/third_party-blink-renderer-core-frame-dom_window.h.patch +++ b/patches/third_party-blink-renderer-core-frame-dom_window.h.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/renderer/core/frame/dom_window.h b/third_party/blink/renderer/core/frame/dom_window.h -index dbbc913d3398a38dd369b2ad1fda8771d3535028..872496cbb10401ad1fd3806e6a1e589a39b72bbc 100644 +index 0a3d30b0e1bfa97f9e6503164df5e2f760c8fd21..07bcb2bdb72e4dd745dd2a80cfd0df7750313a94 100644 --- a/third_party/blink/renderer/core/frame/dom_window.h +++ b/third_party/blink/renderer/core/frame/dom_window.h -@@ -151,6 +151,7 @@ class CORE_EXPORT DOMWindow : public EventTargetWithInlineData { +@@ -153,6 +153,7 @@ class CORE_EXPORT DOMWindow : public EventTargetWithInlineData { // marked as "CrossOrigin" in the window.idl. void ReportCoopAccess(const char* property_name); diff --git a/patches/third_party-blink-renderer-core-html-canvas-canvas_async_blob_creator.cc.patch b/patches/third_party-blink-renderer-core-html-canvas-canvas_async_blob_creator.cc.patch index aa1968c72c94..59722779159c 100644 --- a/patches/third_party-blink-renderer-core-html-canvas-canvas_async_blob_creator.cc.patch +++ b/patches/third_party-blink-renderer-core-html-canvas-canvas_async_blob_creator.cc.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc b/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc -index 3e078d4269238d95085e199df0c0ed6dea78775f..777af2a78634a355b9513608e7eecacc5c41aeb1 100644 +index aae43a337bc0ad3b150f0e54f95830834ad05931..55a3e0f3ff159fe6512261f7e6d89273c23f4709 100644 --- a/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc +++ b/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc -@@ -271,6 +271,7 @@ CanvasAsyncBlobCreator::CanvasAsyncBlobCreator( +@@ -273,6 +273,7 @@ CanvasAsyncBlobCreator::CanvasAsyncBlobCreator( std::min(info.height(), max_dimension)); src_data_.reset(info, src_data_.addr(), src_data_.rowBytes()); } 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 9db7278abfa3..5322545558be 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 93ba69365a92bf435072f6e2d5f0179a84367948..36d5f1b7378a6957ba455c97c7603680e58674a3 100644 +index 1e3ed7bc5c696a72592663e5a49eb6889577d74e..195b09283d1139a49197ab6a31acd5cc91304e97 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 -@@ -951,6 +951,7 @@ String HTMLCanvasElement::ToDataURLInternal( +@@ -967,6 +967,7 @@ String HTMLCanvasElement::ToDataURLInternal( if (!data_buffer) return String("data:,"); diff --git a/patches/third_party-blink-renderer-core-page-plugin_data.h.patch b/patches/third_party-blink-renderer-core-page-plugin_data.h.patch deleted file mode 100644 index e5e1d862a772..000000000000 --- a/patches/third_party-blink-renderer-core-page-plugin_data.h.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/third_party/blink/renderer/core/page/plugin_data.h b/third_party/blink/renderer/core/page/plugin_data.h -index fe5aa20243d89ea6a0f1cecb5ea00846607c6d39..7363a4dab1c30ab26fc57b2d546b77564b359e0b 100644 ---- a/third_party/blink/renderer/core/page/plugin_data.h -+++ b/third_party/blink/renderer/core/page/plugin_data.h -@@ -1,4 +1,3 @@ -- - /* - Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) - -@@ -76,6 +75,7 @@ class CORE_EXPORT PluginInfo final : public GarbageCollected { - Color BackgroundColor() const { return background_color_; } - bool MayUseExternalHandler() const { return may_use_external_handler_; } - -+ BRAVE_PLUGIN_DATA_H - private: - friend class MimeClassInfo; - friend class PluginData; diff --git a/patches/third_party-blink-renderer-modules-BUILD.gn.patch b/patches/third_party-blink-renderer-modules-BUILD.gn.patch index 0707a0c85004..f75886975771 100644 --- a/patches/third_party-blink-renderer-modules-BUILD.gn.patch +++ b/patches/third_party-blink-renderer-modules-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/renderer/modules/BUILD.gn b/third_party/blink/renderer/modules/BUILD.gn -index edd4884efdb32c069f1df90d70a97063ba1cd480..c5f6aa1a3b8f7cffc07a27197ad3d6f04db376b9 100644 +index f9f35f747e7ab3644409c27cdb0c9842b57e407a..138132a092401b1e5b48b752e8d3284a36b98bd6 100644 --- a/third_party/blink/renderer/modules/BUILD.gn +++ b/third_party/blink/renderer/modules/BUILD.gn -@@ -16,6 +16,7 @@ if (is_android) { +@@ -17,6 +17,7 @@ if (is_android) { } visibility = [ "//third_party/blink/renderer/*" ] @@ -10,7 +10,7 @@ index edd4884efdb32c069f1df90d70a97063ba1cd480..c5f6aa1a3b8f7cffc07a27197ad3d6f0 config("modules_implementation") { defines = [ "BLINK_MODULES_IMPLEMENTATION=1" ] -@@ -176,6 +177,7 @@ component("modules") { +@@ -180,6 +181,7 @@ component("modules") { "//third_party/blink/renderer/modules/xr", ] 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 69ad40c49102..bee1cbbc453f 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 0d526abe45fa3dc58874e1cbbb27ac3cbc8e1109..9327c64ec3dc335fb1919e44617fdd01bc5a1152 100644 +index 98b485c0911552699cfbdf187501b08c52dc623a..f47f15028bcf1f5bbbe06b6d43910b8b3ce3e7a3 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 -@@ -1617,6 +1617,7 @@ ImageData* BaseRenderingContext2D::getImageData( +@@ -1822,6 +1822,7 @@ ImageData* BaseRenderingContext2D::getImageData( } ImageData* BaseRenderingContext2D::getImageDataInternal( @@ -10,7 +10,7 @@ index 0d526abe45fa3dc58874e1cbbb27ac3cbc8e1109..9327c64ec3dc335fb1919e44617fdd01 int sx, int sy, int sw, -@@ -1799,6 +1800,7 @@ ImageData* BaseRenderingContext2D::getImageDataInternal( +@@ -2005,6 +2006,7 @@ ImageData* BaseRenderingContext2D::getImageDataInternal( default: NOTREACHED(); } 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 adaaa775858f..3377c39bfdc3 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,8 +1,8 @@ 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 2ce496c5e3cb4159873ee7e1e49c94ed275048dd..53491586487bc4eaecb7dd1a6c6861cbbe2ebce3 100644 +index b3ef16c347ace4e265afa6a351f10ff6a6d85b53..f98d48e87d2f3d811cb7056995863cb0518b6801 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 -@@ -963,6 +963,7 @@ TextMetrics* CanvasRenderingContext2D::measureText(const String& text) { +@@ -953,6 +953,7 @@ TextMetrics* CanvasRenderingContext2D::measureText(const String& text) { if (!canvas()->GetDocument().GetFrame()) return MakeGarbageCollected(); diff --git a/patches/third_party-blink-renderer-modules-canvas-canvas2d-canvas_rendering_context_2d.idl.patch b/patches/third_party-blink-renderer-modules-canvas-canvas2d-canvas_rendering_context_2d.idl.patch index 58dcb8ba7c34..89ad547ea348 100644 --- a/patches/third_party-blink-renderer-modules-canvas-canvas2d-canvas_rendering_context_2d.idl.patch +++ b/patches/third_party-blink-renderer-modules-canvas-canvas2d-canvas_rendering_context_2d.idl.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.idl b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.idl -index 70629eeabd1f390223cd0a122ee8164e1b6f249a..f3b12d2f739709a41fe10811cc89d019130a01ea 100644 +index f2ea9e5ee4c3fca28619efdc54ec92f52c9a8399..1fc1e68c97956d54ab6efe6fa255aacd4465a82f 100644 --- a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.idl +++ b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.idl -@@ -106,9 +106,13 @@ interface CanvasRenderingContext2D { +@@ -118,9 +118,13 @@ interface CanvasRenderingContext2D { [RuntimeEnabled=Canvas2dScrollPathIntoView] void scrollPathIntoView(optional Path2D path); void clip(optional CanvasFillRule winding); void clip(Path2D path, optional CanvasFillRule winding); @@ -16,7 +16,7 @@ index 70629eeabd1f390223cd0a122ee8164e1b6f249a..f3b12d2f739709a41fe10811cc89d019 boolean isPointInStroke(Path2D path, unrestricted double x, unrestricted double y); // text (see also the CanvasDrawingStyles interface) -@@ -129,7 +133,7 @@ interface CanvasRenderingContext2D { +@@ -144,7 +148,7 @@ interface CanvasRenderingContext2D { // pixel manipulation [RaisesException] ImageData createImageData(ImageData imagedata); [RaisesException] ImageData createImageData([EnforceRange] long sw, [EnforceRange] long sh); diff --git a/patches/third_party-blink-renderer-modules-canvas-offscreencanvas2d-offscreen_canvas_rendering_context_2d.idl.patch b/patches/third_party-blink-renderer-modules-canvas-offscreencanvas2d-offscreen_canvas_rendering_context_2d.idl.patch index 5458b9dfcbe2..432c6892abb6 100644 --- a/patches/third_party-blink-renderer-modules-canvas-offscreencanvas2d-offscreen_canvas_rendering_context_2d.idl.patch +++ b/patches/third_party-blink-renderer-modules-canvas-offscreencanvas2d-offscreen_canvas_rendering_context_2d.idl.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/renderer/modules/canvas/offscreencanvas2d/offscreen_canvas_rendering_context_2d.idl b/third_party/blink/renderer/modules/canvas/offscreencanvas2d/offscreen_canvas_rendering_context_2d.idl -index ed256a54a0c8ea3d3e3aab5ba4e0227306bcc194..b3da53fa2be42fa10537683bbea2b09809ed2b8e 100644 +index 50727f9025cc153d5df85c0727c905590fe048f8..d5ee10196f7987e13d863d8b61b33dca25f795a0 100644 --- a/third_party/blink/renderer/modules/canvas/offscreencanvas2d/offscreen_canvas_rendering_context_2d.idl +++ b/third_party/blink/renderer/modules/canvas/offscreencanvas2d/offscreen_canvas_rendering_context_2d.idl -@@ -65,10 +65,10 @@ +@@ -76,10 +76,10 @@ void stroke(Path2D path); void clip(optional CanvasFillRule winding); void clip(Path2D path, optional CanvasFillRule winding); @@ -17,7 +17,7 @@ index ed256a54a0c8ea3d3e3aab5ba4e0227306bcc194..b3da53fa2be42fa10537683bbea2b098 // text (see also the CanvasDrawingStyles interface) void fillText(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth); -@@ -83,7 +83,7 @@ +@@ -94,7 +94,7 @@ // pixel manipulation [RaisesException] ImageData createImageData(ImageData imagedata); [RaisesException] ImageData createImageData(long sw, long sh); diff --git a/patches/third_party-blink-renderer-modules-cookie_store-cookie_store.cc.patch b/patches/third_party-blink-renderer-modules-cookie_store-cookie_store.cc.patch index 17c85409c959..eb508b5296c2 100644 --- a/patches/third_party-blink-renderer-modules-cookie_store-cookie_store.cc.patch +++ b/patches/third_party-blink-renderer-modules-cookie_store-cookie_store.cc.patch @@ -1,5 +1,5 @@ diff --git a/third_party/blink/renderer/modules/cookie_store/cookie_store.cc b/third_party/blink/renderer/modules/cookie_store/cookie_store.cc -index da6df111e5394deb1c1b903e490089383040ac3e..711730e2a7f438d9b9faca08f00c0bafb5758aca 100644 +index 05d3cfc4fae1acc172ef86aa8caad47b04079657..868e2e6281d9ef6574e23a7dd31a0c853d1ec6e0 100644 --- a/third_party/blink/renderer/modules/cookie_store/cookie_store.cc +++ b/third_party/blink/renderer/modules/cookie_store/cookie_store.cc @@ -80,6 +80,7 @@ std::unique_ptr ToCanonicalCookie( diff --git a/patches/third_party-blink-renderer-modules-csspaint-paint_rendering_context_2d.idl.patch b/patches/third_party-blink-renderer-modules-csspaint-paint_rendering_context_2d.idl.patch index e6f7af398363..31db7ca5af85 100644 --- a/patches/third_party-blink-renderer-modules-csspaint-paint_rendering_context_2d.idl.patch +++ b/patches/third_party-blink-renderer-modules-csspaint-paint_rendering_context_2d.idl.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/renderer/modules/csspaint/paint_rendering_context_2d.idl b/third_party/blink/renderer/modules/csspaint/paint_rendering_context_2d.idl -index 94d6d46580570a81e0baf12dc042262ccc84899a..b23ce72df411e63a17a2d2508a735ec127a4bd04 100644 +index 6e4ef60d87deadcd467dd21fa3a3366eae0662a1..b27881231965b4131a9e998d3649094df6269d78 100644 --- a/third_party/blink/renderer/modules/csspaint/paint_rendering_context_2d.idl +++ b/third_party/blink/renderer/modules/csspaint/paint_rendering_context_2d.idl -@@ -58,10 +58,10 @@ +@@ -69,10 +69,10 @@ void clip(optional CanvasFillRule winding); void clip(Path2D path, optional CanvasFillRule winding); 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 153c913648a9..4c2acc7129e8 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 7799c9fdbec2f1d325c6b6fbd4ee2fdadfccf36a..1417e3a2cce1e9b862c8b3d49cf7c52aad2b0056 100644 +index 821de11ab6a7ff7893cce116f327f2e52f01f160..dcdc50648f5660e60c203db3e01b686a24761112 100644 --- a/third_party/blink/renderer/modules/mediastream/media_devices.cc +++ b/third_party/blink/renderer/modules/mediastream/media_devices.cc -@@ -408,6 +408,8 @@ void MediaDevices::DevicesEnumerated( +@@ -414,6 +414,8 @@ void MediaDevices::DevicesEnumerated( } } diff --git a/patches/third_party-blink-renderer-modules-modules_idl_files.gni.patch b/patches/third_party-blink-renderer-modules-modules_idl_files.gni.patch index c3a0fa19003d..fdd29ab15968 100644 --- a/patches/third_party-blink-renderer-modules-modules_idl_files.gni.patch +++ b/patches/third_party-blink-renderer-modules-modules_idl_files.gni.patch @@ -1,8 +1,8 @@ diff --git a/third_party/blink/renderer/modules/modules_idl_files.gni b/third_party/blink/renderer/modules/modules_idl_files.gni -index e7828a83bfb58fc7c5dba4a8077d77a0f164bd6d..2929f00eadc16ad2c7cdb90759484ccf991e5055 100644 +index 2f3b9289edf203980e8ae8dfa73398935c7b1f71..d1faf40800eee61233ddd6801ab76741aceafa77 100644 --- a/third_party/blink/renderer/modules/modules_idl_files.gni +++ b/third_party/blink/renderer/modules/modules_idl_files.gni -@@ -148,6 +148,7 @@ if (!is_android) { +@@ -151,6 +151,7 @@ if (!is_android) { "//third_party/blink/renderer/modules/serial/idls.gni", ] } 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 50f9381901b7..ecf1fc97ca2b 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,12 +1,12 @@ 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 275160e244c5c6476d671fb93b0752f488150bb6..8358a4a077a250a94198fcc1d0e4c0ad4b534815 100644 +index 53c24628f1d406375413ab2d78272383594b4d57..2d200dad4cc2742eb272de80f75720b5b7bae4ac 100644 --- a/third_party/blink/renderer/modules/plugins/dom_plugin_array.cc +++ b/third_party/blink/renderer/modules/plugins/dom_plugin_array.cc -@@ -143,6 +143,7 @@ void DOMPluginArray::UpdatePluginData() { - } - } +@@ -136,6 +136,7 @@ PluginData* DOMPluginArray::GetPluginData() const { + void DOMPluginArray::UpdatePluginData() { + if (ShouldReturnEmptyPluginData()) { + dom_plugins_.clear(); ++ BRAVE_DOM_PLUGINS_UPDATE_PLUGIN_DATA + return; } -+ BRAVE_DOM_PLUGINS_UPDATE_PLUGIN_DATA - } - - void DOMPluginArray::ContextDestroyed() { + PluginData* data = GetPluginData(); diff --git a/patches/third_party-blink-renderer-modules-webaudio-analyser_node.cc.patch b/patches/third_party-blink-renderer-modules-webaudio-analyser_node.cc.patch index 551712f5440e..1f137768ad48 100644 --- a/patches/third_party-blink-renderer-modules-webaudio-analyser_node.cc.patch +++ b/patches/third_party-blink-renderer-modules-webaudio-analyser_node.cc.patch @@ -1,5 +1,5 @@ diff --git a/third_party/blink/renderer/modules/webaudio/analyser_node.cc b/third_party/blink/renderer/modules/webaudio/analyser_node.cc -index cb281f5b728f737ce0a07c289d09c06a17205dd0..15e2af662b78a99363ed6bd3c323fa70f146e139 100644 +index 53528e0538baea73f8afce6ec8d14344b741b642..3f2a175e69f0a3dbb8ad717c71e26cd5a5a93baf 100644 --- a/third_party/blink/renderer/modules/webaudio/analyser_node.cc +++ b/third_party/blink/renderer/modules/webaudio/analyser_node.cc @@ -35,6 +35,7 @@ namespace blink { diff --git a/patches/third_party-blink-renderer-modules-webaudio-audio_buffer.cc.patch b/patches/third_party-blink-renderer-modules-webaudio-audio_buffer.cc.patch index c88fc69fd1e4..f85c2e4a4a36 100644 --- a/patches/third_party-blink-renderer-modules-webaudio-audio_buffer.cc.patch +++ b/patches/third_party-blink-renderer-modules-webaudio-audio_buffer.cc.patch @@ -1,5 +1,5 @@ diff --git a/third_party/blink/renderer/modules/webaudio/audio_buffer.cc b/third_party/blink/renderer/modules/webaudio/audio_buffer.cc -index 4356676b777f4695138e849d2905d286c6a106a3..c45a3b0030124bad1de34107a7a5e578a2736002 100644 +index 111fad79c9d38d52230b8a240b4e1337763ebce7..bba5a339028bf892f79a5814d61f249d253061de 100644 --- a/third_party/blink/renderer/modules/webaudio/audio_buffer.cc +++ b/third_party/blink/renderer/modules/webaudio/audio_buffer.cc @@ -189,6 +189,7 @@ AudioBuffer::AudioBuffer(AudioBus* bus) 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 b03d10fc175a..7ec5762e6276 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 c2702ad0b7e48abb6478adf36d20977726e555d0..1c58c1b0d2adcac090a9b476eb762c5a45b8ca58 100644 +index be9b6fa1cad9fe1da6b3715e7ff9868f83f7b7cf..bbb0f1cc4f6558ce806d6e5952b3d8e84e5b104d 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 -@@ -5103,6 +5103,7 @@ ScriptValue WebGL2RenderingContextBase::getParameter(ScriptState* script_state, +@@ -5235,6 +5235,7 @@ ScriptValue WebGL2RenderingContextBase::getParameter(ScriptState* script_state, GLenum pname) { if (isContextLost()) return ScriptValue::CreateNull(script_state->GetIsolate()); @@ -10,7 +10,7 @@ index c2702ad0b7e48abb6478adf36d20977726e555d0..1c58c1b0d2adcac090a9b476eb762c5a switch (pname) { case GL_SHADING_LANGUAGE_VERSION: { return WebGLAny( -@@ -5660,6 +5661,7 @@ ScriptValue WebGL2RenderingContextBase::getFramebufferAttachmentParameter( +@@ -5792,6 +5793,7 @@ ScriptValue WebGL2RenderingContextBase::getFramebufferAttachmentParameter( if (isContextLost() || !ValidateGetFramebufferAttachmentParameterFunc( kFunctionName, target, attachment)) return ScriptValue::CreateNull(script_state->GetIsolate()); @@ -18,7 +18,7 @@ index c2702ad0b7e48abb6478adf36d20977726e555d0..1c58c1b0d2adcac090a9b476eb762c5a WebGLFramebuffer* framebuffer_binding = GetFramebufferBinding(target); DCHECK(!framebuffer_binding || framebuffer_binding->Object()); -@@ -5872,6 +5874,7 @@ ScriptValue WebGL2RenderingContextBase::getTexParameter( +@@ -6004,6 +6006,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 5ace1d4f13d3..b0db47897d2c 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 e72383fe38df8dead9ba354f53996b66523bb570..38f54a2715308cc4be020ab5dee0db884c248508 100644 +index 9dd34d18b005e7d554cd28c63e013f05cb8ec830..cb86b87f223ff3b3b6a69aba0f77d72070acefdc 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 -@@ -3039,6 +3039,7 @@ WebGLActiveInfo* WebGLRenderingContextBase::getActiveAttrib( +@@ -2900,6 +2900,7 @@ WebGLActiveInfo* WebGLRenderingContextBase::getActiveAttrib( GLuint index) { if (!ValidateWebGLProgramOrShader("getActiveAttrib", program)) return nullptr; @@ -10,7 +10,7 @@ index e72383fe38df8dead9ba354f53996b66523bb570..38f54a2715308cc4be020ab5dee0db88 GLuint program_id = ObjectNonZero(program); GLint max_name_length = -1; ContextGL()->GetProgramiv(program_id, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, -@@ -3070,6 +3071,7 @@ WebGLActiveInfo* WebGLRenderingContextBase::getActiveUniform( +@@ -2931,6 +2932,7 @@ WebGLActiveInfo* WebGLRenderingContextBase::getActiveUniform( GLuint index) { if (!ValidateWebGLProgramOrShader("getActiveUniform", program)) return nullptr; @@ -18,7 +18,7 @@ index e72383fe38df8dead9ba354f53996b66523bb570..38f54a2715308cc4be020ab5dee0db88 GLuint program_id = ObjectNonZero(program); GLint max_name_length = -1; ContextGL()->GetProgramiv(program_id, GL_ACTIVE_UNIFORM_MAX_LENGTH, -@@ -3100,6 +3102,7 @@ base::Optional>> +@@ -2961,6 +2963,7 @@ base::Optional>> WebGLRenderingContextBase::getAttachedShaders(WebGLProgram* program) { if (!ValidateWebGLProgramOrShader("getAttachedShaders", program)) return base::nullopt; @@ -26,7 +26,7 @@ index e72383fe38df8dead9ba354f53996b66523bb570..38f54a2715308cc4be020ab5dee0db88 HeapVector> shader_objects; for (GLenum shaderType : {GL_VERTEX_SHADER, GL_FRAGMENT_SHADER}) { -@@ -3114,6 +3117,7 @@ GLint WebGLRenderingContextBase::getAttribLocation(WebGLProgram* program, +@@ -2975,6 +2978,7 @@ GLint WebGLRenderingContextBase::getAttribLocation(WebGLProgram* program, const String& name) { if (!ValidateWebGLProgramOrShader("getAttribLocation", program)) return -1; @@ -34,7 +34,7 @@ index e72383fe38df8dead9ba354f53996b66523bb570..38f54a2715308cc4be020ab5dee0db88 if (!ValidateLocationLength("getAttribLocation", name)) return -1; if (!ValidateString("getAttribLocation", name)) -@@ -3147,6 +3151,7 @@ ScriptValue WebGLRenderingContextBase::getBufferParameter( +@@ -3008,6 +3012,7 @@ ScriptValue WebGLRenderingContextBase::getBufferParameter( GLenum pname) { if (isContextLost() || !ValidateBufferTarget("getBufferParameter", target)) return ScriptValue::CreateNull(script_state->GetIsolate()); @@ -42,7 +42,7 @@ index e72383fe38df8dead9ba354f53996b66523bb570..38f54a2715308cc4be020ab5dee0db88 switch (pname) { case GL_BUFFER_USAGE: { -@@ -3283,6 +3288,7 @@ ScriptValue WebGLRenderingContextBase::getFramebufferAttachmentParameter( +@@ -3144,6 +3149,7 @@ ScriptValue WebGLRenderingContextBase::getFramebufferAttachmentParameter( target, attachment)) return ScriptValue::CreateNull(script_state->GetIsolate()); @@ -50,7 +50,7 @@ index e72383fe38df8dead9ba354f53996b66523bb570..38f54a2715308cc4be020ab5dee0db88 if (!framebuffer_binding_ || !framebuffer_binding_->Object()) { SynthesizeGLError(GL_INVALID_OPERATION, "getFramebufferAttachmentParameter", "no framebuffer bound"); -@@ -3684,6 +3690,7 @@ ScriptValue WebGLRenderingContextBase::getParameter(ScriptState* script_state, +@@ -3545,6 +3551,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 e72383fe38df8dead9ba354f53996b66523bb570..38f54a2715308cc4be020ab5dee0db88 if (ExtensionEnabled(kWebGLDebugRendererInfoName)) { if (IdentifiabilityStudySettings::Get()->ShouldSample( blink::IdentifiableSurface::Type::kWebGLParameter)) { -@@ -3699,6 +3706,7 @@ ScriptValue WebGLRenderingContextBase::getParameter(ScriptState* script_state, +@@ -3560,6 +3567,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 e72383fe38df8dead9ba354f53996b66523bb570..38f54a2715308cc4be020ab5dee0db88 if (ExtensionEnabled(kWebGLDebugRendererInfoName)) { if (IdentifiabilityStudySettings::Get()->ShouldSample( blink::IdentifiableSurface::Type::kWebGLParameter)) { -@@ -3791,6 +3799,7 @@ ScriptValue WebGLRenderingContextBase::getProgramParameter( +@@ -3652,6 +3660,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 e72383fe38df8dead9ba354f53996b66523bb570..38f54a2715308cc4be020ab5dee0db88 if (!ValidateWebGLProgramOrShader("getProgramParamter", program)) { return ScriptValue::CreateNull(script_state->GetIsolate()); } -@@ -3846,6 +3855,7 @@ ScriptValue WebGLRenderingContextBase::getProgramParameter( +@@ -3707,6 +3716,7 @@ ScriptValue WebGLRenderingContextBase::getProgramParameter( String WebGLRenderingContextBase::getProgramInfoLog(WebGLProgram* program) { if (!ValidateWebGLProgramOrShader("getProgramInfoLog", program)) return String(); @@ -82,7 +82,7 @@ index e72383fe38df8dead9ba354f53996b66523bb570..38f54a2715308cc4be020ab5dee0db88 GLStringQuery query(ContextGL()); return query.Run(ObjectNonZero(program)); } -@@ -3856,6 +3866,7 @@ ScriptValue WebGLRenderingContextBase::getRenderbufferParameter( +@@ -3717,6 +3727,7 @@ ScriptValue WebGLRenderingContextBase::getRenderbufferParameter( GLenum pname) { if (isContextLost()) return ScriptValue::CreateNull(script_state->GetIsolate()); @@ -90,7 +90,7 @@ index e72383fe38df8dead9ba354f53996b66523bb570..38f54a2715308cc4be020ab5dee0db88 if (target != GL_RENDERBUFFER) { SynthesizeGLError(GL_INVALID_ENUM, "getRenderbufferParameter", "invalid target"); -@@ -3907,6 +3918,7 @@ ScriptValue WebGLRenderingContextBase::getShaderParameter( +@@ -3768,6 +3779,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 e72383fe38df8dead9ba354f53996b66523bb570..38f54a2715308cc4be020ab5dee0db88 if (!ValidateWebGLProgramOrShader("getShaderParameter", shader)) { return ScriptValue::CreateNull(script_state->GetIsolate()); } -@@ -3938,6 +3950,7 @@ ScriptValue WebGLRenderingContextBase::getShaderParameter( +@@ -3799,6 +3811,7 @@ ScriptValue WebGLRenderingContextBase::getShaderParameter( String WebGLRenderingContextBase::getShaderInfoLog(WebGLShader* shader) { if (!ValidateWebGLProgramOrShader("getShaderInfoLog", shader)) return String(); @@ -106,7 +106,7 @@ index e72383fe38df8dead9ba354f53996b66523bb570..38f54a2715308cc4be020ab5dee0db88 GLStringQuery query(ContextGL()); return query.Run(ObjectNonZero(shader)); } -@@ -3968,6 +3981,7 @@ WebGLShaderPrecisionFormat* WebGLRenderingContextBase::getShaderPrecisionFormat( +@@ -3829,6 +3842,7 @@ WebGLShaderPrecisionFormat* WebGLRenderingContextBase::getShaderPrecisionFormat( GLint precision = 0; ContextGL()->GetShaderPrecisionFormat(shader_type, precision_type, range, &precision); @@ -114,7 +114,7 @@ index e72383fe38df8dead9ba354f53996b66523bb570..38f54a2715308cc4be020ab5dee0db88 auto* result = MakeGarbageCollected( range[0], range[1], precision); if (IdentifiabilityStudySettings::Get()->ShouldSample( -@@ -3980,6 +3994,7 @@ WebGLShaderPrecisionFormat* WebGLRenderingContextBase::getShaderPrecisionFormat( +@@ -3841,6 +3855,7 @@ WebGLShaderPrecisionFormat* WebGLRenderingContextBase::getShaderPrecisionFormat( String WebGLRenderingContextBase::getShaderSource(WebGLShader* shader) { if (!ValidateWebGLProgramOrShader("getShaderSource", shader)) return String(); @@ -122,7 +122,7 @@ index e72383fe38df8dead9ba354f53996b66523bb570..38f54a2715308cc4be020ab5dee0db88 return EnsureNotNull(shader->Source()); } -@@ -3987,6 +4002,7 @@ base::Optional> +@@ -3848,6 +3863,7 @@ base::Optional> WebGLRenderingContextBase::getSupportedExtensions() { if (isContextLost()) return base::nullopt; @@ -130,7 +130,7 @@ index e72383fe38df8dead9ba354f53996b66523bb570..38f54a2715308cc4be020ab5dee0db88 Vector result; -@@ -4009,6 +4025,7 @@ ScriptValue WebGLRenderingContextBase::getTexParameter( +@@ -3870,6 +3886,7 @@ ScriptValue WebGLRenderingContextBase::getTexParameter( GLenum pname) { if (isContextLost()) return ScriptValue::CreateNull(script_state->GetIsolate()); @@ -138,7 +138,7 @@ index e72383fe38df8dead9ba354f53996b66523bb570..38f54a2715308cc4be020ab5dee0db88 if (!ValidateTextureBinding("getTexParameter", target)) return ScriptValue::CreateNull(script_state->GetIsolate()); switch (pname) { -@@ -4043,6 +4060,7 @@ ScriptValue WebGLRenderingContextBase::getUniform( +@@ -3904,6 +3921,7 @@ ScriptValue WebGLRenderingContextBase::getUniform( const WebGLUniformLocation* uniform_location) { if (!ValidateWebGLProgramOrShader("getUniform", program)) return ScriptValue::CreateNull(script_state->GetIsolate()); @@ -146,7 +146,7 @@ index e72383fe38df8dead9ba354f53996b66523bb570..38f54a2715308cc4be020ab5dee0db88 DCHECK(uniform_location); if (uniform_location->Program() != program) { SynthesizeGLError(GL_INVALID_OPERATION, "getUniform", -@@ -4302,6 +4320,7 @@ WebGLUniformLocation* WebGLRenderingContextBase::getUniformLocation( +@@ -4163,6 +4181,7 @@ WebGLUniformLocation* WebGLRenderingContextBase::getUniformLocation( const String& name) { if (!ValidateWebGLProgramOrShader("getUniformLocation", program)) return nullptr; @@ -154,7 +154,7 @@ index e72383fe38df8dead9ba354f53996b66523bb570..38f54a2715308cc4be020ab5dee0db88 if (!ValidateLocationLength("getUniformLocation", name)) return nullptr; if (!ValidateString("getUniformLocation", name)) -@@ -4326,6 +4345,7 @@ ScriptValue WebGLRenderingContextBase::getVertexAttrib( +@@ -4187,6 +4206,7 @@ ScriptValue WebGLRenderingContextBase::getVertexAttrib( GLenum pname) { if (isContextLost()) return ScriptValue::CreateNull(script_state->GetIsolate()); @@ -162,7 +162,7 @@ index e72383fe38df8dead9ba354f53996b66523bb570..38f54a2715308cc4be020ab5dee0db88 if (index >= max_vertex_attribs_) { SynthesizeGLError(GL_INVALID_VALUE, "getVertexAttrib", "index out of range"); -@@ -4403,6 +4423,7 @@ int64_t WebGLRenderingContextBase::getVertexAttribOffset(GLuint index, +@@ -4264,6 +4284,7 @@ int64_t WebGLRenderingContextBase::getVertexAttribOffset(GLuint index, GLenum pname) { if (isContextLost()) return 0; @@ -170,7 +170,7 @@ index e72383fe38df8dead9ba354f53996b66523bb570..38f54a2715308cc4be020ab5dee0db88 GLvoid* result = nullptr; // NOTE: If pname is ever a value that returns more than 1 element // this will corrupt memory. -@@ -4760,6 +4781,7 @@ void WebGLRenderingContextBase::ReadPixelsHelper(GLint x, +@@ -4611,6 +4632,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 7cc4257062f8..11d90eed5d19 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 1343d7c03b07cb15416d353450a4b0f6937c4c4b..7e1d177805d1dd91a9aa89e95a6aab3d8d2e1918 100644 +index c9e9d621c7304bf8abad7f877a06a5475bd6251b..0964f788f1ca649fedb3624ff84194da5265f845 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec @@ -47,6 +47,9 @@ @@ -12,7 +12,7 @@ index 1343d7c03b07cb15416d353450a4b0f6937c4c4b..7e1d177805d1dd91a9aa89e95a6aab3d "chrome/app/google_chrome_strings.grd": { "messages": [400], }, -@@ -398,6 +401,9 @@ +@@ -434,6 +437,9 @@ "META": {"align": 100}, "messages": [2700], }, diff --git a/patches/tools-json_schema_compiler-feature_compiler.py.patch b/patches/tools-json_schema_compiler-feature_compiler.py.patch index 05140606eaab..708e5e3f4af7 100644 --- a/patches/tools-json_schema_compiler-feature_compiler.py.patch +++ b/patches/tools-json_schema_compiler-feature_compiler.py.patch @@ -1,8 +1,8 @@ diff --git a/tools/json_schema_compiler/feature_compiler.py b/tools/json_schema_compiler/feature_compiler.py -index fc870d2e4c7324b4283ad83adea818f484073bdd..fc728f4d13d0e6ac1dd27d5c979d0e9bd6fa8fc5 100644 +index 645c5fb934170e14db5c44c552db06febab7f09c..dd617177f7fc2ad276e23f39069cf705a3faef6e 100644 --- a/tools/json_schema_compiler/feature_compiler.py +++ b/tools/json_schema_compiler/feature_compiler.py -@@ -777,6 +777,14 @@ class FeatureCompiler(object): +@@ -766,6 +766,14 @@ class FeatureCompiler(object): abs_source_file) raise dupes = set(f_json) & set(self._json) diff --git a/patches/tools-metrics-histograms-histograms_xml-histogram_suffixes_list.xml.patch b/patches/tools-metrics-histograms-histograms_xml-histogram_suffixes_list.xml.patch index b9d8a74e464e..a380334597a6 100644 --- a/patches/tools-metrics-histograms-histograms_xml-histogram_suffixes_list.xml.patch +++ b/patches/tools-metrics-histograms-histograms_xml-histogram_suffixes_list.xml.patch @@ -1,8 +1,8 @@ diff --git a/tools/metrics/histograms/histograms_xml/histogram_suffixes_list.xml b/tools/metrics/histograms/histograms_xml/histogram_suffixes_list.xml -index c42cebda69d94d3b04cdc96ed93a1e4931e94914..3771f865a5ee00de38bb4489eb7ba3c705bbe657 100644 +index 56f2f186492688a3a3d4f46887f83a1362ba5027..1bb142e8b3e77c104a41b80b43a51760b26f4927 100644 --- a/tools/metrics/histograms/histograms_xml/histogram_suffixes_list.xml +++ b/tools/metrics/histograms/histograms_xml/histogram_suffixes_list.xml -@@ -13893,6 +13893,7 @@ reviews. Googlers can read more about this at go/gwsq-gerrit. +@@ -14090,6 +14090,7 @@ reviews. Googlers can read more about this at go/gwsq-gerrit. diff --git a/patches/ui-accessibility-platform-ax_platform_node_mac.mm.patch b/patches/ui-accessibility-platform-ax_platform_node_mac.mm.patch index e112a53bc32f..b449978466a4 100644 --- a/patches/ui-accessibility-platform-ax_platform_node_mac.mm.patch +++ b/patches/ui-accessibility-platform-ax_platform_node_mac.mm.patch @@ -1,8 +1,8 @@ diff --git a/ui/accessibility/platform/ax_platform_node_mac.mm b/ui/accessibility/platform/ax_platform_node_mac.mm -index ce50a0a509ca151c7e406729b78655f60eaa4c98..fda4ab3480b2c4eb9fc2515879acef73fceb1050 100644 +index 3ef8956d61f62c10b5bf4b4339ba595bb919ad17..1a680287befb53099b27a0d1a16c95197711c94f 100644 --- a/ui/accessibility/platform/ax_platform_node_mac.mm +++ b/ui/accessibility/platform/ax_platform_node_mac.mm -@@ -1165,6 +1165,7 @@ bool IsAXSetter(SEL selector) { +@@ -1169,6 +1169,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 4323cd0886d0..b0257d18c839 100644 --- a/patches/ui-base-BUILD.gn.patch +++ b/patches/ui-base-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn -index dc5eedfa0d1194db18feb5bc2f418885163a795d..cc9f7fb26eed693fb811b90cc73de0f75771ff6d 100644 +index 6868f3ce6c48bce32c58a386640b0fe6ede91688..8a960d4543f3a9ebc01f41c461117f1a3777af25 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn -@@ -452,6 +452,7 @@ component("base") { +@@ -453,6 +453,7 @@ component("base") { "//ui/strings", "//url", ] diff --git a/patches/ui-native_theme-native_theme.h.patch b/patches/ui-native_theme-native_theme.h.patch index 6e2219122da4..51410497d174 100644 --- a/patches/ui-native_theme-native_theme.h.patch +++ b/patches/ui-native_theme-native_theme.h.patch @@ -1,8 +1,8 @@ diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h -index d254838cfb21ec2135691b84fd0432cbdbb92e24..b3f5c720642e147f25ba69adad881d27bf308965 100644 +index 3577f9b8fa7a3b02117aacad6844fc7165c51474..531cf60ef3568ef5a032643f7d90d7f1901bd26c 100644 --- a/ui/native_theme/native_theme.h +++ b/ui/native_theme/native_theme.h -@@ -455,6 +455,7 @@ class NATIVE_THEME_EXPORT NativeTheme { +@@ -457,6 +457,7 @@ class NATIVE_THEME_EXPORT NativeTheme { // Returns the system's caption style. virtual base::Optional GetSystemCaptionStyle() const; diff --git a/patches/ui-webui-resources-cr_elements-cr_toolbar-cr_toolbar_selection_overlay.html.patch b/patches/ui-webui-resources-cr_elements-cr_toolbar-cr_toolbar_selection_overlay.html.patch index 7ec2f84be7f2..a1b8052c96e8 100644 --- a/patches/ui-webui-resources-cr_elements-cr_toolbar-cr_toolbar_selection_overlay.html.patch +++ b/patches/ui-webui-resources-cr_elements-cr_toolbar-cr_toolbar_selection_overlay.html.patch @@ -1,12 +1,9 @@ diff --git a/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_selection_overlay.html b/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_selection_overlay.html -index b0963a69baab5c2677b3edcd53ef140b654c9814..2b7e75c25886e2abf78b389e3e2528f4f96b6031 100644 +index 2cd069ff2f489f8662cc9ca30008e6bbd3fab539..e284948ec7aff079f266579b7c6d5c88876c54c9 100644 --- a/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_selection_overlay.html +++ b/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_selection_overlay.html -@@ -8,6 +8,7 @@ - - -