Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade from Chromium 101 to Chromium 102 (Uplift to 1.39.x) #13345

Merged
merged 3 commits into from
May 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ deps = {
"third_party/bitcoin-core/src": "https://github.com/bitcoin/bitcoin.git@95ea54ba089610019a74c1176a2c7c0dba144b1c",
"third_party/argon2/src": "https://github.com/P-H-C/phc-winner-argon2.git@62358ba2123abd17fccf2a108a301d4b52c01a7c",
"third_party/boost/config": "https://github.com/boostorg/config.git@e108255ffb5d2557ed3398b3fc575a2e9fd434cc",
"third_party/boost/multiprecision": "https://github.com/boostorg/multiprecision.git@db0bb4d2d2611605b7ce97220fb9973fd7e072c9",
"third_party/boost/multiprecision": "https://github.com/boostorg/multiprecision.git@32aefd37f055cc2abeced1cd2873b4564ea339f2",
}

recursedeps = [
Expand Down
1 change: 0 additions & 1 deletion android/brave_java_resources.gni
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,6 @@ brave_java_resources = [
"java/res/layout/binance_spinner_dropdown_item.xml",
"java/res/layout/binance_spinner_item.xml",
"java/res/layout/binance_summary_item.xml",
"java/res/layout/bottom_control_container.xml",
"java/res/layout/bottom_toolbar.xml",
"java/res/layout/bottom_toolbar_browsing.xml",
"java/res/layout/bottom_toolbar_menu_button.xml",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ public void createScrollViewForPolicy() {
mScrollViewForPolicy = new NestedScrollView(mActivity);
mScrollViewForPolicy.setLayoutParams(new FrameLayout.LayoutParams(
FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT));
mScrollViewForPolicy.setBackgroundColor(
ApiCompatibilityUtils.getColor(mActivity.getResources(), R.color.default_bg_color));
mScrollViewForPolicy.setBackgroundColor(ApiCompatibilityUtils.getColor(
mActivity.getResources(), R.color.default_bg_color_baseline));
mScrollViewForPolicy.setVerticalScrollBarEnabled(false);

// Make scroll view focusable so that it is the next focusable view when the url bar clears
Expand Down
3 changes: 2 additions & 1 deletion android/java/apk_for_test.flags
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
}

-keep class org.chromium.chrome.browser.toolbar.top.TabSwitcherModeTTCoordinator {
*** mTabSwitcherModeToolbar;
*** mActiveTabSwitcherToolbar;
}

-keep class org.chromium.chrome.browser.toolbar.top.TabSwitcherModeTopToolbar {
Expand Down Expand Up @@ -434,6 +434,7 @@
}

-keep class org.chromium.chrome.browser.omnibox.suggestions.AutocompleteMediator {
*** mNativeInitialized;
public <init>(...);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,7 @@ public void run() {

private void showEndDialog(String message, Runnable runWhenDismissed) {
AlertDialog.Builder alert =
new AlertDialog.Builder(getActivity(), R.style.Theme_Chromium_AlertDialog);
new AlertDialog.Builder(getActivity(), R.style.ThemeOverlay_BrowserUI_AlertDialog);
if (null == alert) {
return;
}
Expand All @@ -1084,7 +1084,8 @@ public void onClick(DialogInterface dialog, int button) {}
}

private void deleteDeviceDialog(BraveSyncDevices.SyncDeviceInfo device) {
AlertDialog.Builder alert = new AlertDialog.Builder(getActivity(), R.style.Theme_Chromium_AlertDialog);
AlertDialog.Builder alert =
new AlertDialog.Builder(getActivity(), R.style.ThemeOverlay_BrowserUI_AlertDialog);
if (null == alert) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void onClick(DialogInterface dialog, int button) {
};

AlertDialog.Builder alert =
new AlertDialog.Builder(getContext(), R.style.Theme_Chromium_AlertDialog);
new AlertDialog.Builder(getContext(), R.style.ThemeOverlay_BrowserUI_AlertDialog);
AlertDialog alertDialog =
alert.setTitle(R.string.brave_wallet_settings_autolock_option)
.setView(view)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public void onClick(DialogInterface dialog, int button) {
};

AlertDialog.Builder alert =
new AlertDialog.Builder(getContext(), R.style.Theme_Chromium_AlertDialog);
new AlertDialog.Builder(getContext(), R.style.ThemeOverlay_BrowserUI_AlertDialog);
AlertDialog alertDialog =
alert.setTitle(R.string.brave_wallet_reset_settings_option)
.setView(view)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ private void showBraveWalletResetTxHistoryAndNonceDialog() {
};

AlertDialog.Builder alert =
new AlertDialog.Builder(getContext(), R.style.Theme_Chromium_AlertDialog);
new AlertDialog.Builder(getContext(), R.style.ThemeOverlay_BrowserUI_AlertDialog);
AlertDialog alertDialog =
alert.setTitle(R.string.brave_wallet_clear_tx_and_nonce_setting_title)
.setView(view)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ public void onClick(DialogInterface dialog, int button) {
}
};

AlertDialog.Builder alert =
new AlertDialog.Builder(getActivity(), R.style.Theme_Chromium_AlertDialog);
AlertDialog.Builder alert = new AlertDialog.Builder(
getActivity(), R.style.ThemeOverlay_BrowserUI_AlertDialog);
AlertDialog.Builder alertDialog =
alert.setTitle("Enter Wallet restore phrase")
.setView(view)
Expand Down Expand Up @@ -253,8 +253,8 @@ public void run() {
});
input.requestFocus();

AlertDialog.Builder alert =
new AlertDialog.Builder(getActivity(), R.style.Theme_Chromium_AlertDialog);
AlertDialog.Builder alert = new AlertDialog.Builder(
getActivity(), R.style.ThemeOverlay_BrowserUI_AlertDialog);
if (alert == null) {
return true;
}
Expand Down Expand Up @@ -371,7 +371,7 @@ public void run() {
input.requestFocus();

AlertDialog.Builder alert =
new AlertDialog.Builder(getActivity(), R.style.Theme_Chromium_AlertDialog);
new AlertDialog.Builder(getActivity(), R.style.ThemeOverlay_BrowserUI_AlertDialog);
if (alert == null) {
return;
}
Expand Down Expand Up @@ -483,10 +483,12 @@ public void onClick(DialogInterface dialog, int button) {
}
}
};
AlertDialog.Builder alertDialog = new AlertDialog.Builder(getActivity(), R.style.Theme_Chromium_AlertDialog)
.setMessage(
"This operation requires restart. Would you like to restart application and start operation?")
.setPositiveButton(R.string.ok, onClickListener).setNegativeButton(R.string.cancel, onClickListener);
AlertDialog.Builder alertDialog =
new AlertDialog.Builder(getActivity(), R.style.ThemeOverlay_BrowserUI_AlertDialog)
.setMessage(
"This operation requires restart. Would you like to restart application and start operation?")
.setPositiveButton(R.string.ok, onClickListener)
.setNegativeButton(R.string.cancel, onClickListener);
Dialog dialog = alertDialog.create();
dialog.setCanceledOnTouchOutside(false);
dialog.show();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,12 @@ public void onClick(DialogInterface dialog, int button) {
}
}
};
AlertDialog.Builder alertDialog = new AlertDialog.Builder(getActivity(), R.style.Theme_Chromium_AlertDialog)
.setMessage(
"This operation requires restart. Would you like to restart application and start operation?")
.setPositiveButton(R.string.ok, onClickListener).setNegativeButton(R.string.cancel, onClickListener);
AlertDialog.Builder alertDialog =
new AlertDialog.Builder(getActivity(), R.style.ThemeOverlay_BrowserUI_AlertDialog)
.setMessage(
"This operation requires restart. Would you like to restart application and start operation?")
.setPositiveButton(R.string.ok, onClickListener)
.setNegativeButton(R.string.cancel, onClickListener);
Dialog dialog = alertDialog.create();
dialog.setCanceledOnTouchOutside(false);
dialog.show();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,8 @@ public void wipeSyncUserData(Runnable wipeDataCallback) {}
public boolean isSyncOptInAllowed() {
return false;
}

@Override
public void revokeSyncConsent(@SignoutReason int signoutSource, SignOutCallback signOutCallback,
boolean forceWipeUserData) {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,28 @@
import org.chromium.chrome.browser.toolbar.menu_button.MenuButtonCoordinator;

class BraveTabSwitcherModeTTCoordinator extends TabSwitcherModeTTCoordinator {
private TabSwitcherModeTopToolbar mTabSwitcherModeToolbar;
private TabSwitcherModeTopToolbar mActiveTabSwitcherToolbar;

private boolean mIsBottomToolbarVisible;
private MenuButtonCoordinator mBraveMenuButtonCoordinator;

BraveTabSwitcherModeTTCoordinator(ViewStub tabSwitcherToolbarStub,
MenuButtonCoordinator menuButtonCoordinator, boolean isGridTabSwitcherEnabled,
ViewStub tabSwitcherFullscreenToolbarStub, MenuButtonCoordinator menuButtonCoordinator,
boolean isGridTabSwitcherEnabled, boolean isTabletGtsPolishEnabled,
boolean isTabToGtsAnimationEnabled, BooleanSupplier isIncognitoModeEnabledSupplier) {
super(tabSwitcherToolbarStub, menuButtonCoordinator, isGridTabSwitcherEnabled,
isTabToGtsAnimationEnabled, isIncognitoModeEnabledSupplier);
super(tabSwitcherToolbarStub, tabSwitcherFullscreenToolbarStub, menuButtonCoordinator,
isGridTabSwitcherEnabled, isTabletGtsPolishEnabled, isTabToGtsAnimationEnabled,
isIncognitoModeEnabledSupplier);

mBraveMenuButtonCoordinator = menuButtonCoordinator;
}

@Override
public void setTabSwitcherMode(boolean inTabSwitcherMode) {
super.setTabSwitcherMode(inTabSwitcherMode);
if (inTabSwitcherMode
&& (mTabSwitcherModeToolbar instanceof BraveTabSwitcherModeTopToolbar)) {
((BraveTabSwitcherModeTopToolbar) mTabSwitcherModeToolbar)
&& (mActiveTabSwitcherToolbar instanceof BraveTabSwitcherModeTopToolbar)) {
((BraveTabSwitcherModeTopToolbar) mActiveTabSwitcherToolbar)
.onBottomToolbarVisibilityChanged(mIsBottomToolbarVisible);
}
if (mBraveMenuButtonCoordinator != null && mIsBottomToolbarVisible) {
Expand All @@ -42,8 +45,8 @@ void onBottomToolbarVisibilityChanged(boolean isVisible) {
return;
}
mIsBottomToolbarVisible = isVisible;
if (mTabSwitcherModeToolbar instanceof BraveTabSwitcherModeTopToolbar) {
((BraveTabSwitcherModeTopToolbar) mTabSwitcherModeToolbar)
if (mActiveTabSwitcherToolbar instanceof BraveTabSwitcherModeTopToolbar) {
((BraveTabSwitcherModeTopToolbar) mActiveTabSwitcherToolbar)
.onBottomToolbarVisibilityChanged(isVisible);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class BraveTopToolbarCoordinator extends TopToolbarCoordinator {
private boolean mIsBottomToolbarVisible;

public BraveTopToolbarCoordinator(ToolbarControlContainer controlContainer,
ViewStub toolbarStub, ToolbarLayout toolbarLayout,
ViewStub toolbarStub, ViewStub fullscreenToolbarStub, ToolbarLayout toolbarLayout,
ToolbarDataProvider toolbarDataProvider, ToolbarTabController tabController,
UserEducationHelper userEducationHelper, List<ButtonDataProvider> buttonDataProviders,
OneshotSupplier<LayoutStateProvider> layoutStateProviderSupplier,
Expand All @@ -62,20 +62,21 @@ public BraveTopToolbarCoordinator(ToolbarControlContainer controlContainer,
Supplier<ResourceManager> resourceManagerSupplier,
ObservableSupplier<Boolean> isProgressBarVisibleSupplier,
BooleanSupplier isIncognitoModeEnabledSupplier, boolean isGridTabSwitcherEnabled,
boolean isTabToGtsAnimationEnabled, boolean isStartSurfaceEnabled,
boolean isTabGroupsAndroidContinuationEnabled, HistoryDelegate historyDelegate,
BooleanSupplier partnerHomepageEnabledSupplier, OfflineDownloader offlineDownloader,
boolean initializeWithIncognitoColors, ObservableSupplier<Profile> profileSupplier,
boolean isTabletGtsPolishEnabled, boolean isTabToGtsAnimationEnabled,
boolean isStartSurfaceEnabled, boolean isTabGroupsAndroidContinuationEnabled,
HistoryDelegate historyDelegate, BooleanSupplier partnerHomepageEnabledSupplier,
OfflineDownloader offlineDownloader, boolean initializeWithIncognitoColors,
ObservableSupplier<Profile> profileSupplier,
Callback<LoadUrlParams> startSurfaceLogoClickedCallback) {
super(controlContainer, toolbarStub, toolbarLayout, toolbarDataProvider, tabController,
userEducationHelper, buttonDataProviders, layoutStateProviderSupplier,
normalThemeColorProvider, overviewThemeColorProvider,
super(controlContainer, toolbarStub, fullscreenToolbarStub, toolbarLayout,
toolbarDataProvider, tabController, userEducationHelper, buttonDataProviders,
layoutStateProviderSupplier, normalThemeColorProvider, overviewThemeColorProvider,
browsingModeMenuButtonCoordinator, overviewModeMenuButtonCoordinator,
appMenuButtonHelperSupplier, tabModelSelectorSupplier, homepageEnabledSupplier,
startSurfaceAsHomepageSupplier, homepageManagedByPolicySupplier,
identityDiscStateSupplier, invalidatorCallback, identityDiscButtonSupplier,
resourceManagerSupplier, isProgressBarVisibleSupplier,
isIncognitoModeEnabledSupplier, isGridTabSwitcherEnabled,
isIncognitoModeEnabledSupplier, isGridTabSwitcherEnabled, isTabletGtsPolishEnabled,
isTabToGtsAnimationEnabled, isStartSurfaceEnabled,
isTabGroupsAndroidContinuationEnabled, historyDelegate,
partnerHomepageEnabledSupplier, offlineDownloader, initializeWithIncognitoColors,
Expand All @@ -88,7 +89,8 @@ public BraveTopToolbarCoordinator(ToolbarControlContainer controlContainer,
if (!isStartSurfaceEnabled) {
mTabSwitcherModeCoordinator = new BraveTabSwitcherModeTTCoordinator(
controlContainer.getRootView().findViewById(R.id.tab_switcher_toolbar_stub),
overviewModeMenuButtonCoordinator, isGridTabSwitcherEnabled,
fullscreenToolbarStub, overviewModeMenuButtonCoordinator,
isGridTabSwitcherEnabled, isTabletGtsPolishEnabled,
isTabToGtsAnimationEnabled, isIncognitoModeEnabledSupplier);
}
}
Expand Down
2 changes: 1 addition & 1 deletion android/java/res/layout/bottom_toolbar_browsing.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/toolbar_background_primary"
android:background="@color/default_bg_color_baseline"
android:layout_gravity="top|center_horizontal"
android:paddingStart="@dimen/bottom_toolbar_padding"
android:paddingEnd="@dimen/bottom_toolbar_padding" >
Expand Down
2 changes: 1 addition & 1 deletion android/java/res/layout/bottom_toolbar_tab_switcher.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
android:id="@+id/bottom_toolbar_buttons"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/default_bg_color" >
android:background="@color/default_bg_color_baseline" >

<LinearLayout
android:orientation="horizontal"
Expand Down
2 changes: 1 addition & 1 deletion android/java/res/values-night/brave_colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<color name="baseline_primary_100">#5B2A23</color>
<color name="baseline_primary_200">#F35333</color>
<color name="default_text_color_on_accent1_baseline">@color/default_text_color_on_accent1_light</color>
<color name="dialog_bg_color_dark_baseline">@color/toolbar_background_primary</color>
<color name="dialog_bg_color_dark_baseline">@color/default_bg_color_baseline</color>

<!-- Theme colors -->
<color name="brave_tab_view_card_selected_bg">@color/baseline_primary_200</color>
Expand Down
11 changes: 7 additions & 4 deletions android/javatests/org/chromium/chrome/browser/BytecodeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -504,16 +504,16 @@ public void testConstructorsExistAndMatch() throws Exception {
Assert.assertTrue(constructorsMatch(
"org/chromium/chrome/browser/toolbar/top/TopToolbarCoordinator",
"org/chromium/chrome/browser/toolbar/top/BraveTopToolbarCoordinator",
ToolbarControlContainer.class, ViewStub.class, ToolbarLayout.class,
ToolbarControlContainer.class, ViewStub.class, ViewStub.class, ToolbarLayout.class,
ToolbarDataProvider.class, ToolbarTabController.class, UserEducationHelper.class,
List.class, OneshotSupplier.class, ThemeColorProvider.class,
ThemeColorProvider.class, MenuButtonCoordinator.class, MenuButtonCoordinator.class,
ObservableSupplier.class, ObservableSupplier.class, ObservableSupplier.class,
ObservableSupplier.class, ObservableSupplier.class, ObservableSupplier.class,
Callback.class, Supplier.class, Supplier.class, ObservableSupplier.class,
BooleanSupplier.class, boolean.class, boolean.class, boolean.class, boolean.class,
HistoryDelegate.class, BooleanSupplier.class, OfflineDownloader.class,
boolean.class, ObservableSupplier.class, Callback.class));
boolean.class, HistoryDelegate.class, BooleanSupplier.class,
OfflineDownloader.class, boolean.class, ObservableSupplier.class, Callback.class));
Assert.assertTrue(constructorsMatch(
"org/chromium/chrome/browser/toolbar/menu_button/MenuButtonCoordinator",
"org/chromium/chrome/browser/toolbar/menu_button/BraveMenuButtonCoordinator",
Expand Down Expand Up @@ -656,7 +656,7 @@ public void testFieldsExist() throws Exception {
"mOptionalButtonController"));
Assert.assertTrue(
fieldExists("org/chromium/chrome/browser/toolbar/top/TabSwitcherModeTTCoordinator",
"mTabSwitcherModeToolbar"));
"mActiveTabSwitcherToolbar"));
Assert.assertTrue(
fieldExists("org/chromium/chrome/browser/toolbar/top/TabSwitcherModeTopToolbar",
"mNewTabViewButton"));
Expand Down Expand Up @@ -697,6 +697,9 @@ public void testFieldsExist() throws Exception {
Assert.assertTrue(fieldExists(
"org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings", "mSite",
true, Website.class));
Assert.assertTrue(
fieldExists("org/chromium/chrome/browser/omnibox/suggestions/AutocompleteMediator",
"mNativeInitialized", true, boolean.class));
}

@Test
Expand Down
Loading