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 131 to Chromium 132 1.74.x #26819

Merged
merged 18 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
d6bbcfb
Merge pull request #26068 from brave/cr132
emerick Dec 2, 2024
d8b841c
[Lit]: Migrate `brave-item-list-more-items` to Lit (#26493)
fallaciousreasoning Nov 13, 2024
7c52fc0
[CodeHealth] Remove all uses of `NOTREACHED_NORETURN` (#26508)
cdesouza-chromium Nov 12, 2024
af0b450
[CodeHealth] Drop `proc-macro-error` from `filecoin-cxx` (#26427)
cdesouza-chromium Nov 12, 2024
47bc54d
Fix UNSAFE_TODO for wallet [part 2 of N] (#26469)
supermassive Nov 18, 2024
c0e0f8b
[CodeHealth] Fix dangling span references (#26461)
cdesouza-chromium Nov 9, 2024
8cf373a
[CodeHealth] Normalise `const` declaration pt.1 (#26714)
cdesouza-chromium Nov 25, 2024
d86e951
[CodeHealth] Remove all uses of `NOTREACHED_NORETURN` (#26508)
cdesouza-chromium Nov 12, 2024
6885971
[Lit]: Update ExtensionsToolbarElement override (#26492)
fallaciousreasoning Nov 12, 2024
a8583ff
[NOTREACHED]: Migrate a bunch of `NOTREACHED_IN_MIGRATIONS` (#26412)
fallaciousreasoning Nov 7, 2024
d62c04d
Replaced NOTREACHED_IN_MIGRATION for Brave Sync code (#26391)
AlexeyBarabash Nov 7, 2024
62f9c4b
[DanglingPtr] Remove `ProfileMenuViewBase` patching (#26499)
cdesouza-chromium Nov 12, 2024
e5c1d5b
Disable screen_ai component download/installation (#26167)
emerick Nov 20, 2024
ac50971
Fix unused variables warnings at java (#26433)
AlexeyBarabash Nov 7, 2024
9b1640f
[DanglingPtr] Fix `WebUIBubbleManagerImpl` dangling patch (#26465)
cdesouza-chromium Nov 11, 2024
aaceea4
Merge pull request #26829 from brave/cr132-followup-add-aida-client-u…
emerick Dec 3, 2024
4b3bb5d
Upgrade from Chromium 132.0.6834.15 to Chromium 132.0.6834.33
brave-builds Dec 5, 2024
9aefa81
Merge pull request #26864 from brave/cr132-followup-fix-broken-tab-gr…
emerick Dec 5, 2024
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 BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ if (is_mac) {

cargo_audit_target_dir = "$root_build_dir/cargo_audit"
cargo_audit_exe = "$cargo_audit_target_dir/release/cargo-audit"
cargo_audit_src = "//brave/tools/crates/cargo_audit/v0_20/crate"
cargo_audit_src = "//brave/tools/crates/cargo_audit/v0_21/crate"
if (host_os == "win") {
cargo_audit_exe += ".exe"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import android.app.Activity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import androidx.annotation.NonNull;

Expand All @@ -19,11 +18,10 @@
import org.chromium.chrome.browser.data_sharing.DataSharingTabManager;
import org.chromium.chrome.browser.layouts.LayoutStateProvider;
import org.chromium.chrome.browser.tab_ui.TabContentManager;
import org.chromium.chrome.browser.tabmodel.IncognitoStateProvider;
import org.chromium.chrome.browser.tabmodel.IncognitoStateProvider.IncognitoStateObserver;
import org.chromium.chrome.browser.tabmodel.TabCreatorManager;
import org.chromium.chrome.browser.tabmodel.TabModelSelector;
import org.chromium.chrome.browser.tabmodel.TabModelSelectorObserver;
import org.chromium.chrome.browser.theme.ThemeColorProvider;
import org.chromium.chrome.browser.toolbar.bottom.BottomControlsCoordinator;
import org.chromium.chrome.tab_ui.R;
import org.chromium.components.browser_ui.bottomsheet.BottomSheetController;
Expand All @@ -36,15 +34,12 @@ public class BraveTabGroupUiCoordinator extends TabGroupUiCoordinator {
private TabGroupUiToolbarView mToolbarView;

// Own members.
private IncognitoStateProvider mIncognitoStateProvider;
private IncognitoStateObserver mIncognitoStateObserver;
private TabModelSelector mTabModelSelector;

public BraveTabGroupUiCoordinator(
@NonNull Activity activity,
@NonNull ViewGroup parentView,
@NonNull BrowserControlsStateProvider browserControlsStateProvider,
@NonNull IncognitoStateProvider incognitoStateProvider,
@NonNull ScrimCoordinator scrimCoordinator,
@NonNull ObservableSupplier<Boolean> omniboxFocusStateSupplier,
@NonNull BottomSheetController bottomSheetController,
Expand All @@ -53,12 +48,12 @@ public BraveTabGroupUiCoordinator(
@NonNull TabContentManager tabContentManager,
@NonNull TabCreatorManager tabCreatorManager,
@NonNull OneshotSupplier<LayoutStateProvider> layoutStateProviderSupplier,
@NonNull ModalDialogManager modalDialogManager) {
@NonNull ModalDialogManager modalDialogManager,
@NonNull ThemeColorProvider themeColorProvider) {
super(
activity,
parentView,
browserControlsStateProvider,
incognitoStateProvider,
scrimCoordinator,
omniboxFocusStateSupplier,
bottomSheetController,
Expand All @@ -67,9 +62,9 @@ public BraveTabGroupUiCoordinator(
tabContentManager,
tabCreatorManager,
layoutStateProviderSupplier,
modalDialogManager);
modalDialogManager,
themeColorProvider);

mIncognitoStateProvider = incognitoStateProvider;
mTabModelSelector = tabModelSelector;

assert mToolbarView != null : "Make sure mToolbarView is properly patched in bytecode.";
Expand Down Expand Up @@ -133,20 +128,6 @@ private void callSuperInitializeWithNative(
BottomControlsCoordinator.BottomControlsVisibilityController visibilityController,
Callback<Object> onModelTokenChange) {
super.initializeWithNative(activity, visibilityController, onModelTokenChange);

mIncognitoStateObserver =
(isIncognito) -> {
if (!isIncognito) {
// Make sure that background color match bottom toolbar color.
LinearLayout mainContent = mToolbarView.findViewById(R.id.main_content);
assert mainContent != null : "Something has changed in upstream!";
if (mainContent != null) {
mainContent.setBackgroundColor(
activity.getColor(R.color.dialog_bg_color_baseline));
}
}
};
mIncognitoStateProvider.addIncognitoStateObserverAndTrigger(mIncognitoStateObserver);
}

@Override
Expand All @@ -157,6 +138,5 @@ public void destroy() {
// mTabStripCoordinator could be null in a base class.
// https://github.com/brave/brave-browser/issues/40673
}
mIncognitoStateProvider.removeObserver(mIncognitoStateObserver);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -174,15 +174,6 @@
<release seq="1">
<messages fallback_to_english="true">
<!-- In-Product Help strings -->
<message name="IDS_IPH_TAB_GROUPS_QUICKLY_COMPARE_PAGES_TEXT" desc="When Brave detects that the user is searching or comparing multiple pages (e.g. while comparison shopping), this in-product help text appears at the bottom of the screen. The text informs the user that they can longpress on a link to open it as a new tab within a tab group.">
Quickly compare pages by making a group. To start, touch &amp; hold a link.
</message>
<message name="IDS_IPH_TAB_GROUPS_TAP_TO_SEE_ANOTHER_TAB_TEXT" desc="This in-product help text points to the strip of favicons at the bottom of the page. The favicons indicate all the open tabs within the tab group. The text informs the user that they can tap on any favicon to switch to that tab.">
Tap to see another tab
</message>
<message name="IDS_IPH_TAB_GROUPS_TAP_TO_SEE_ANOTHER_TAB_ACCESSIBILITY_TEXT" desc="This in-product help accessibility text points to the strip of favicons at the bottom of the page. The favicons indicate all the open tabs within the tab group. The text informs the user that they can tap on any favicon to switch to that tab.">
Switch between tabs in your tab group near bottom of screen
</message>
<message name="IDS_IPH_TAB_SWITCHER_FLOATING_ACTION_BUTTON" desc="This in-product help points to the new location of the new tab button which floats atop the tabs rather than being located in the toolbar. The text informs users they can use the button to open new tabs.">
You can now open a new tab here
</message>
Expand Down Expand Up @@ -212,6 +203,9 @@
<message name="IDS_TAB_GRID_SHARE_BUTTON_TEXT" desc="Text for sharing the current tab group from the tab group dialog toolbar.">
Share
</message>
<message name="IDS_TAB_GRID_MANAGE_BUTTON_TEXT" desc="Text for managing the sharing of the current tab group from the tab group dialog toolbar.">
Manage
</message>

<!-- Bottom Tab Strip strings -->
<message name="IDS_ACCESSIBILITY_BOTTOM_TAB_STRIP_EXPAND_TAB_SHEET" desc="Accessibility string for BottomTabStripToolbar button indicated visually by the '^' sign.">
Expand All @@ -222,18 +216,6 @@
<message name="IDS_ACCESSIBILITY_TAB_SWITCHER" desc="Accessibility string for Tab Switcher view. This string is announced when the Tab Switcher is shown to screen.">
Tab Switcher
</message>
<message name="IDS_ACCESSIBILITY_CLOSE_TAB_GROUP_BUTTON" desc="The accessibility text to read when the close button on a card representing a tab group is focused in grid tab switcher. When this close button is tapped, all tabs within the tab group will be closed. NUMBER_OF_TABS is the number of tabs within this group.">
{NUMBER_OF_TABS, plural,
=1 {Close tab group with <ph name="TABS_COUNT_ONE">%1$d<ex>1</ex></ph> tab.}
other {Close tab group with <ph name="TABS_COUNT_MANY">%1$d<ex>2</ex></ph> tabs.}
}
</message>
<message name="IDS_ACCESSIBILITY_CLOSE_TAB_GROUP_BUTTON_WITH_GROUP_NAME" desc="The accessibility text to read when the close button on a card representing a tab group is focused in grid tab switcher. When this close button is tapped, all tabs within the tab group will be closed. TITLE_OF_GROUP is the title of the group. NUMBER_OF_TABS is the number of tabs within this group.">
{NUMBER_OF_TABS, plural,
=1 {Close <ph name="TITLE_OF_GROUP">%1$s<ex>shopping</ex></ph> group with <ph name="TABS_COUNT_ONE">%2$d<ex>1</ex></ph> tab.}
other {Close <ph name="TITLE_OF_GROUP">%1$s<ex>shopping</ex></ph> group with <ph name="TABS_COUNT_MANY">%2$d<ex>2</ex></ph> tabs.}
}
</message>

<!-- Tab Selection Editor strings -->
<message name="IDS_TAB_SELECTION_EDITOR_TOOLBAR_SELECT_TABS" desc="Label shown on Tab Selection Editor Toolbar asking user to select tabs from the list.">
Expand Down Expand Up @@ -406,18 +388,6 @@
</message>

<!-- Tab Grid Dialog accessibility strings -->
<message name="IDS_ACCESSIBILITY_EXPAND_TAB_GROUP" desc="The accessibility text to read when a card representing a tab group is clicked in grid tab switcher. NUMBER_OF_TABS is the number of tabs within this group.">
{NUMBER_OF_TABS, plural,
=1 {Expand tab group with <ph name="TABS_COUNT_ONE">%1$d<ex>1</ex></ph> tab.}
other {Expand tab group with <ph name="TABS_COUNT_MANY">%1$d<ex>2</ex></ph> tabs.}
}
</message>
<message name="IDS_ACCESSIBILITY_EXPAND_TAB_GROUP_WITH_GROUP_NAME" desc="The accessibility text to read when a card representing a tab group is clicked in grid tab switcher. TITLE_OF_GROUP is the title of the group. NUMBER_OF_TABS is the number of tabs within this group.">
{NUMBER_OF_TABS, plural,
=1 {Expand <ph name="TITLE_OF_GROUP">%1$s<ex>Shopping cart</ex></ph> tab group with <ph name="TABS_COUNT_ONE">%2$d<ex>1</ex></ph> tab.}
other {Expand <ph name="TITLE_OF_GROUP">%1$s<ex>Shopping cart</ex></ph> tab group with <ph name="TABS_COUNT_MANY">%2$d<ex>2</ex></ph> tabs.}
}
</message>
<message name="IDS_ACCESSIBILITY_DIALOG_BACK_BUTTON" desc="The accessibility text to read when the back button in the dialog is focused. When this button is tapped, the dialog will be hidden. NUMBER_OF_TABS is the number of tabs within this group. Note that after collapsing with one tab, that group becomes a tab.">
{TABS_COUNT, plural,
=1 {Collapse <ph name="TABS_COUNT_ONE">%1$d<ex>1</ex></ph> tab.}
Expand Down Expand Up @@ -750,9 +720,6 @@
<message name="IDS_DELETE_TAB_GROUP_NO_SYNC_DESCRIPTION" desc="Description of the action of deleting a tab group, shown in a confirmation dialog.">
This will permanently delete the group from your device
</message>
<message name="IDS_CONFIRMATION_STOP_SHOWING" desc="Text next to a checkbox asking if confirmation should not be shown again. Used for various tab operations.">
Don't ask again
</message>
<message name="IDS_DELETE_TAB_GROUP_ACTION" desc="Button text in a confirmation dialog which will delete a tab group.">
Delete group
</message>
Expand Down
1 change: 1 addition & 0 deletions android/java/apk_for_test.flags
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
*** mModalDialogManagerSupplier;
*** mTabObscuringHandler;
*** mReadAloudControllerSupplier;
*** mTopUiThemeColorProvider;
*** onOrientationChange(...);
*** updateBookmarkButtonStatus(...);
*** updateReloadState(...);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,17 @@ public String call() {
return null;
}

private static String getUrlForCustomTab(Intent intent) {
private static String getUrlForCustomTab(Intent unused_intent) {
assert false;
return null;
}

private static String getUrlForWebapp(Intent intent) {
private static String getUrlForWebapp(Intent unused_intent) {
assert false;
return null;
}

private static boolean isJavascriptSchemeOrInvalidUrl(String url) {
private static boolean isJavascriptSchemeOrInvalidUrl(String unused_url) {
assert false;
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ public interface PublisherObserver { void onFrontTabPublisherChanged(boolean ver
public static final int BAT_NOT_ALLOWED = 25;
public static final int SAFETYNET_ATTESTATION_FAILED = 27;

private static final int REWARDS_UNKNOWN = 0;
private static final int REWARDS_DISABLED = 1;
private static final int REWARDS_ENABLED = 2;
private String mFrontTabUrl;
private static final Handler sHandler = new Handler();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@

package org.chromium.chrome.browser;

import android.content.Context;

import org.jni_zero.CalledByNative;
import org.jni_zero.JNINamespace;
import org.jni_zero.NativeMethods;

import org.chromium.base.Callback;
import org.chromium.base.ContextUtils;

import java.time.LocalDateTime;
import java.time.ZoneOffset;
Expand All @@ -21,9 +18,6 @@
public class BraveSyncWorker {
private static final String TAG = "SYNC";

private Context mContext;
private String mDebug = "true";

private long mNativeBraveSyncWorker;

private static BraveSyncWorker sBraveSyncWorker;
Expand Down Expand Up @@ -67,7 +61,6 @@ private void destroy() {
}

public BraveSyncWorker() {
mContext = ContextUtils.getApplicationContext();
init();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ public class QRCodeShareDialogFragment extends DialogFragment implements View.On
private static final String TAG = "SUPER-REFERRAL";

// For QR code generation
private static final int WHITE = 0xFFFFFFFF;
private static final int BLACK = 0xFF000000;
// WHITE/BLACK depend on the normal/Night mode
private static final int WIDTH = 300;

private ImageView mQRImage;
Expand Down
17 changes: 3 additions & 14 deletions android/java/org/chromium/chrome/browser/app/BraveActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@
import org.chromium.chrome.browser.multiwindow.BraveMultiWindowUtils;
import org.chromium.chrome.browser.multiwindow.MultiInstanceManager;
import org.chromium.chrome.browser.multiwindow.MultiWindowUtils;
import org.chromium.chrome.browser.notifications.BraveNotificationWarningDialog;
import org.chromium.chrome.browser.notifications.permissions.NotificationPermissionController;
import org.chromium.chrome.browser.notifications.retention.RetentionNotificationUtil;
import org.chromium.chrome.browser.ntp.NewTabPageManager;
Expand Down Expand Up @@ -278,9 +277,7 @@ public abstract class BraveActivity extends ChromeActivity
public static final String BRAVE_WEBCOMPAT_INFO_WIKI_URL =
"https://github.com/brave/brave-browser/wiki/Web-compatibility-reports";

private static final int DAYS_1 = 1;
private static final int DAYS_4 = 4;
private static final int DAYS_5 = 5;
private static final int DAYS_7 = 7;
private static final int DAYS_12 = 12;

Expand Down Expand Up @@ -1186,7 +1183,7 @@ public void finishNativeInitialization() {
}

checkFingerPrintingOnUpgrade(isFirstInstall);
checkForVpnCallout(isFirstInstall);
checkForVpnCallout();

if (ChromeFeatureList.isEnabled(BraveFeatureList.BRAVE_VPN_LINK_SUBSCRIPTION_ANDROID_UI)
&& BraveVpnPrefUtils.isSubscriptionPurchase()
Expand Down Expand Up @@ -1407,7 +1404,7 @@ private void handleDeepLinkVpn() {
BraveVpnUtils.openBraveVpnPlansActivity(this);
}

private void checkForVpnCallout(boolean isFirstInstall) {
private void checkForVpnCallout() {
String countryCode = Locale.getDefault().getCountry();

if (!countryCode.equals(BraveConstants.INDIA_COUNTRY_CODE)
Expand Down Expand Up @@ -1671,19 +1668,11 @@ private void checkForYandexSE() {
BraveSearchEngineUtils.setDSEPrefs(yandexTemplateUrl, lastUsedRegularProfile);
BraveSearchEngineUtils.setDSEPrefs(
yandexTemplateUrl,
lastUsedRegularProfile.getPrimaryOTRProfile(/* createIfNeeded= */ true));
lastUsedRegularProfile.getPrimaryOtrProfile(/* createIfNeeded= */ true));
}
}
}

private BraveNotificationWarningDialog.DismissListener mCloseDialogListener =
new BraveNotificationWarningDialog.DismissListener() {
@Override
public void onDismiss() {
checkForNotificationData();
}
};

private void checkForNotificationData() {
Intent notifIntent = getIntent();
if (notifIntent != null && notifIntent.getStringExtra(RetentionNotificationUtil.NOTIFICATION_TYPE) != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

IntentRequestTracker intentRequestTracker = IntentRequestTracker.createFromActivity(this);
mWindowAndroid = new ActivityWindowAndroid(this, true, intentRequestTracker);
mWindowAndroid = new ActivityWindowAndroid(this, true, intentRequestTracker, null);
mWindowAndroid.getIntentRequestTracker().restoreInstanceState(savedInstanceState);
if (mBookmarkManagerCoordinator instanceof BraveBookmarkManagerCoordinator) {
((BraveBookmarkManagerCoordinator) mBookmarkManagerCoordinator)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@
import java.util.Arrays;
import java.util.List;

// Unused members, never read:
// - mSolanaTxManagerProxy
// - mSwapService
// - mBlockchainRegistry
// - mEthTxManagerProxy
// - mAssetRatioService
@SuppressWarnings("UnusedVariable")
public class CryptoModel {
private TxService mTxService;
private final PendingTxHelper mPendingTxHelper;
Expand Down
Loading
Loading