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 85 to Chromium 86 (1.15.x). #6677

Merged
merged 6 commits into from
Sep 23, 2020
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
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,11 @@ group("create_dist") {
deps += [
"app/$target_os:create_dist_zips"
]
} else if (is_linux) {
# zip will be created along with installer
deps += [
":create_symbols_dist"
]
} else {
deps += [
":create_dist_zips"
Expand Down
3 changes: 2 additions & 1 deletion android/brave_java_sources.gni
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import("//brave/components/safetynet/java_sources.gni")
import("//components/feed/features.gni")

brave_java_sources = [
"../../brave/android/java/org/chromium/chrome/browser/BraveActivity.java",
"../../brave/android/java/org/chromium/chrome/browser/BraveAppHooks.java",
"../../brave/android/java/org/chromium/chrome/browser/BraveBadge.java",
"../../brave/android/java/org/chromium/chrome/browser/BraveFeatureList.java",
Expand All @@ -32,6 +31,7 @@ brave_java_sources = [
"../../brave/android/java/org/chromium/chrome/browser/BraveRewardsUserWalletActivity.java",
"../../brave/android/java/org/chromium/chrome/browser/BraveRewardsVerifyWalletActivity.java",
"../../brave/android/java/org/chromium/chrome/browser/BraveSyncReflectionUtils.java",
"../../brave/android/java/org/chromium/chrome/browser/app/BraveActivity.java",
"../../brave/android/java/org/chromium/chrome/browser/appmenu/BraveTabbedAppMenuPropertiesDelegate.java",
"../../brave/android/java/org/chromium/chrome/browser/document/BraveLauncherActivity.java",
"../../brave/android/java/org/chromium/chrome/browser/externalnav/BraveExternalNavigationHandler.java",
Expand Down Expand Up @@ -105,6 +105,7 @@ brave_java_sources = [
"../../brave/android/java/org/chromium/chrome/browser/settings/BackgroundImagesPreferences.java",
"../../brave/android/java/org/chromium/chrome/browser/settings/BackgroundVideoPlaybackPreference.java",
"../../brave/android/java/org/chromium/chrome/browser/settings/BraveCustomTabsPreference.java",
"../../brave/android/java/org/chromium/chrome/browser/settings/BraveLicensePreference.java",
"../../brave/android/java/org/chromium/chrome/browser/settings/BraveLicensePreferences.java",
"../../brave/android/java/org/chromium/chrome/browser/settings/BraveMainPreferencesBase.java",
"../../brave/android/java/org/chromium/chrome/browser/settings/BravePreferenceFragment.java",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.base.supplier.Supplier;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.feed.action.FeedActionHandler;
import org.chromium.chrome.browser.feed.library.api.host.action.ActionApi;
import org.chromium.chrome.browser.feed.shared.FeedSurfaceDelegate;
Expand All @@ -24,7 +25,6 @@
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.feed.R;
import org.chromium.components.browser_ui.bottomsheet.BottomSheetController;
import org.chromium.ui.UiUtils;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,18 @@
import android.graphics.Rect;
import android.os.Build;
import android.os.Handler;
import android.support.annotation.Nullable;
import android.text.Html;
import android.text.Spanned;
import android.util.DisplayMetrics;
import android.view.TouchDelegate;
import android.view.View;

import androidx.annotation.Nullable;

import org.chromium.base.annotations.CalledByNative;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.BraveActivity;
import org.chromium.chrome.browser.ChromeTabbedActivity;
import org.chromium.chrome.browser.app.BraveActivity;
import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.chrome.browser.tab.Tab;
import org.chromium.chrome.browser.tab.TabImpl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
import org.chromium.chrome.browser.BraveRewardsObserver;
import org.chromium.chrome.browser.BraveRewardsBalance;
import org.chromium.chrome.browser.BraveRewardsPublisher.PublisherStatus;
import org.chromium.chrome.browser.BraveActivity;
import org.chromium.chrome.browser.ChromeTabbedActivity;
import org.chromium.chrome.browser.app.BraveActivity;
import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.chrome.browser.tab.Tab;
import org.chromium.chrome.browser.tab.TabLaunchType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.chromium.chrome.browser.BraveRewardsNativeWorker;
import org.chromium.chrome.browser.BraveRewardsObserver;
import org.chromium.chrome.browser.BraveRewardsPublisher.PublisherStatus;
import org.chromium.chrome.browser.app.BraveActivity;
import android.graphics.Bitmap;
import android.widget.ImageView;
import org.chromium.chrome.browser.tab.Tab;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
import androidx.appcompat.widget.Toolbar;

import org.chromium.chrome.R;
import org.chromium.chrome.browser.BraveActivity;
import org.chromium.chrome.browser.BraveRewardsBalance;
import org.chromium.chrome.browser.BraveRewardsExternalWallet;
import org.chromium.chrome.browser.BraveRewardsNativeWorker;
import org.chromium.chrome.browser.app.BraveActivity;

public class BraveRewardsUserWalletActivity extends AppCompatActivity {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
import android.widget.TextView;
import java.util.Locale;

import org.chromium.chrome.browser.BraveActivity;
import org.chromium.chrome.browser.BraveRewardsExternalWallet;
import org.chromium.chrome.browser.BraveRewardsHelper;
import org.chromium.chrome.browser.BraveUphold;
import org.chromium.chrome.browser.app.BraveActivity;
import org.chromium.chrome.R;

public class BraveRewardsVerifyWalletActivity extends Activity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
import org.chromium.base.ApplicationStatus;
import org.chromium.base.Log;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.BraveActivity;
import org.chromium.chrome.browser.BraveSyncWorker;
import org.chromium.chrome.browser.app.BraveActivity;
import org.chromium.chrome.browser.infobar.InfoBarIdentifier;
import org.chromium.chrome.browser.preferences.BravePrefServiceBridge;
import org.chromium.chrome.browser.settings.BraveSyncScreensPreference;
Expand Down
2 changes: 1 addition & 1 deletion android/java/org/chromium/chrome/browser/BraveUphold.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

import org.chromium.base.ContextUtils;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.BraveActivity;
import org.chromium.chrome.browser.BraveRewardsBalance;
import org.chromium.chrome.browser.BraveRewardsHelper;
import org.chromium.chrome.browser.BraveRewardsNativeWorker;
import org.chromium.chrome.browser.BraveRewardsObserver;
import org.chromium.chrome.browser.app.BraveActivity;
import org.chromium.chrome.browser.externalnav.BraveExternalNavigationHandler;
import org.chromium.components.external_intents.ExternalNavigationParams;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/. */

package org.chromium.chrome.browser;
package org.chromium.chrome.browser.app;

import android.app.Activity;
import android.app.AlertDialog;
Expand Down Expand Up @@ -35,8 +35,11 @@
import org.chromium.base.task.PostTask;
import org.chromium.base.task.TaskTraits;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.ApplicationLifetime;
import org.chromium.chrome.browser.BraveHelper;
import org.chromium.chrome.browser.BraveSyncReflectionUtils;
import org.chromium.chrome.browser.ChromeTabbedActivity;
import org.chromium.chrome.browser.LaunchIntentDispatcher;
import org.chromium.chrome.browser.bookmarks.BookmarkBridge;
import org.chromium.chrome.browser.bookmarks.BookmarkModel;
import org.chromium.chrome.browser.dependency_injection.ChromeActivityComponent;
Expand All @@ -46,7 +49,6 @@
import org.chromium.chrome.browser.onboarding.OnboardingPrefManager;
import org.chromium.chrome.browser.preferences.BravePreferenceKeys;
import org.chromium.chrome.browser.preferences.Pref;
import org.chromium.chrome.browser.preferences.PrefServiceBridge;
import org.chromium.chrome.browser.preferences.SharedPreferencesManager;
import org.chromium.chrome.browser.rate.RateDialogFragment;
import org.chromium.chrome.browser.rate.RateUtils;
Expand All @@ -65,6 +67,7 @@
import org.chromium.components.bookmarks.BookmarkId;
import org.chromium.components.bookmarks.BookmarkType;
import org.chromium.components.embedder_support.util.UrlConstants;
import org.chromium.components.user_prefs.UserPrefs;
import org.chromium.ui.widget.Toast;
import org.chromium.chrome.browser.util.PackageUtils;
import org.chromium.chrome.browser.onboarding.OnboardingPrefManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
package org.chromium.chrome.browser.appmenu;

import android.content.Context;
import android.support.annotation.Nullable;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ImageButton;

import androidx.annotation.Nullable;
import androidx.appcompat.content.res.AppCompatResources;

import org.chromium.base.supplier.ObservableSupplier;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import android.util.Pair;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewParent;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.widget.FrameLayout;
Expand Down Expand Up @@ -124,16 +125,6 @@ public void setupDialog(Dialog dialog, int style) {

emptyDataLayout = view.findViewById(R.id.brave_stats_empty_layout);

getDialog().setOnShowListener(new DialogInterface.OnShowListener() {
@Override
public void onShow(DialogInterface dialog) {
BottomSheetDialog d = (BottomSheetDialog) dialog;
View bottomSheetInternal = (View)view.getParent();
bottomSheetInternal.getLayoutParams().height = ViewGroup.LayoutParams.MATCH_PARENT;
bottomSheetInternal.requestLayout();
}
});

RadioGroup durationRadioGroup = view.findViewById(R.id.duration_radio_group);
durationRadioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override
Expand Down Expand Up @@ -187,6 +178,9 @@ public void onClick(View v) {
updateBraveStatsLayoutAsync();

dialog.setContentView(view);
ViewParent parent = view.getParent();
((View)parent).getLayoutParams().height = ViewGroup.LayoutParams.MATCH_PARENT;

}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import android.util.Pair;

import org.chromium.chrome.browser.BraveActivity;
import org.chromium.chrome.browser.app.BraveActivity;
import org.chromium.chrome.browser.brave_stats.BraveStatsBottomSheetDialogFragment;

import java.text.SimpleDateFormat;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,21 @@
import static org.chromium.chrome.browser.preferences.ChromePreferenceKeys.UI_THEME_DARKEN_WEBSITES_ENABLED;
import static org.chromium.chrome.browser.preferences.ChromePreferenceKeys.UI_THEME_SETTING;

import android.os.Bundle;
import android.os.Build;
import android.support.annotation.Nullable;
import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.preference.Preference;

import org.chromium.chrome.R;
import org.chromium.base.BuildInfo;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.flags.ChromeFeatureList;
import org.chromium.chrome.browser.night_mode.GlobalNightModeStateProviderHolder;
import org.chromium.chrome.browser.night_mode.ThemeType;
import org.chromium.chrome.browser.ntp_background_images.NTPBackgroundImagesBridge;
import org.chromium.chrome.browser.preferences.SharedPreferencesManager;
import org.chromium.components.browser_ui.settings.SettingsUtils;
import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.chrome.browser.ntp_background_images.NTPBackgroundImagesBridge;
import org.chromium.components.browser_ui.settings.SettingsUtils;

public class BraveThemePreferences extends ThemeSettingsFragment {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,18 @@ private static void bringToForeground() {
@Override
protected NotificationBuilderBase prepareNotificationBuilder(String notificationId,
@NotificationType int notificationType, String origin, String scopeUrl,
String profileId, boolean incognito, String title, String body, Bitmap image,
Bitmap icon, Bitmap badge, int[] vibrationPattern, long timestamp, boolean renotify,
boolean silent, ActionInfo[] actions, String webApkPackage) {
String profileId, boolean incognito, boolean vibrateEnabled, String title, String body,
Bitmap image, Bitmap icon, Bitmap badge, int[] vibrationPattern, long timestamp,
boolean renotify, boolean silent, ActionInfo[] actions, String webApkPackage) {
mNotificationType = notificationType;

if (notificationType == NotificationType.BRAVE_ADS) {
vibrationPattern = EMPTY_VIBRATION_PATTERN;
}

return super.prepareNotificationBuilder(notificationId, notificationType, origin, scopeUrl,
profileId, incognito, title, body, image, icon, badge, vibrationPattern, timestamp,
renotify, silent, actions, webApkPackage);
profileId, incognito, vibrateEnabled, title, body, image, icon, badge,
vibrationPattern, timestamp, renotify, silent, actions, webApkPackage);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
import android.net.Uri;

import org.chromium.chrome.R;
import org.chromium.chrome.browser.app.BraveActivity;
import org.chromium.chrome.browser.notifications.BraveAdsNotificationBuilder;
import org.chromium.chrome.browser.notifications.NotificationBuilderBase;
import org.chromium.chrome.browser.notifications.NotificationUmaTracker;
import org.chromium.chrome.browser.notifications.retention.RetentionNotificationUtil;
import org.chromium.chrome.browser.notifications.retention.RetentionNotificationPublisher;
import org.chromium.components.browser_ui.notifications.ChromeNotification;
import org.chromium.components.browser_ui.notifications.NotificationManagerProxyImpl;
import org.chromium.components.browser_ui.notifications.NotificationMetadata;
import org.chromium.components.browser_ui.notifications.NotificationWrapper;
import org.chromium.components.browser_ui.notifications.PendingIntentProvider;
import org.chromium.chrome.browser.BraveActivity;

import java.util.Locale;

Expand Down Expand Up @@ -57,7 +57,7 @@ public static void showOnboardingNotification(Context context) {
.setContentIntent(getDeepLinkIntent(context))
.setOrigin(getNotificationUrl());

ChromeNotification notification = notificationBuilder.build(new NotificationMetadata(
NotificationWrapper notification = notificationBuilder.build(new NotificationMetadata(
NotificationUmaTracker.SystemNotificationType
.UNKNOWN /* Underlying code doesn't track UNKNOWN */,
BRAVE_ONBOARDING_NOTIFICATION_TAG /* notificationTag */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.chromium.base.task.PostTask;
import org.chromium.base.task.TaskTraits;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.BraveActivity;
import org.chromium.chrome.browser.app.BraveActivity;
import org.chromium.components.embedder_support.util.UrlConstants;

import java.util.Calendar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import org.chromium.base.Log;
import org.chromium.base.ThreadUtils;
import org.chromium.base.task.AsyncTask;
import org.chromium.chrome.browser.BraveActivity;
import org.chromium.chrome.browser.app.BraveActivity;
import org.chromium.chrome.browser.BraveAdsNativeHelper;
import org.chromium.chrome.browser.BraveFeatureList;
import org.chromium.chrome.browser.brave_stats.BraveStatsUtil;
Expand All @@ -26,7 +26,7 @@
import org.chromium.chrome.browser.ntp.NewTabPage;
import org.chromium.chrome.browser.onboarding.OnboardingPrefManager;
import org.chromium.chrome.browser.preferences.BravePref;
import org.chromium.chrome.browser.preferences.PrefServiceBridge;
import org.chromium.components.user_prefs.UserPrefs;
import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.chrome.browser.tab.TabLaunchType;
import org.chromium.components.embedder_support.util.UrlConstants;
Expand Down Expand Up @@ -91,7 +91,7 @@ public void onReceive(Context context, Intent intent) {
case RetentionNotificationUtil.DAY_35:
// Can't check for rewards code in background
if (braveActivity != null
&& (ChromeFeatureList.isEnabled(BraveFeatureList.BRAVE_REWARDS) && !PrefServiceBridge.getInstance().getBoolean(BravePref.ENABLED))
&& (ChromeFeatureList.isEnabled(BraveFeatureList.BRAVE_REWARDS) && !UserPrefs.get(Profile.getLastUsedRegularProfile()).getBoolean(BravePref.ENABLED))
&& !BraveAdsNativeHelper.nativeIsBraveAdsEnabled(Profile.getLastUsedRegularProfile())) {
createNotification(context, intent);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,13 @@ public class BraveNewTabPage extends NewTabPage {

public BraveNewTabPage(Activity activity,
BrowserControlsStateProvider browserControlsStateProvider,
Supplier<Tab> activityTabProvider, @Nullable OverviewModeBehavior overviewModeBehavior,
SnackbarManager snackbarManager, ActivityLifecycleDispatcher lifecycleDispatcher,
TabModelSelector tabModelSelector, boolean isTablet, NewTabPageUma uma,
boolean isInNightMode, NativePageHost nativePageHost, Tab tab,
BottomSheetController bottomSheetController) {
super(activity, browserControlsStateProvider, activityTabProvider, overviewModeBehavior,
snackbarManager, lifecycleDispatcher, tabModelSelector, isTablet, uma,
isInNightMode, nativePageHost, tab, bottomSheetController);
Supplier<Tab> activityTabProvider, SnackbarManager snackbarManager,
ActivityLifecycleDispatcher lifecycleDispatcher, TabModelSelector tabModelSelector,
boolean isTablet, NewTabPageUma uma, boolean isInNightMode,
NativePageHost nativePageHost, Tab tab, BottomSheetController bottomSheetController) {
super(activity, browserControlsStateProvider, activityTabProvider, snackbarManager,
lifecycleDispatcher, tabModelSelector, isTablet, uma, isInNightMode, nativePageHost,
tab, bottomSheetController);

assert mNewTabPageLayout instanceof BraveNewTabPageLayout;
if (mNewTabPageLayout instanceof BraveNewTabPageLayout) {
Expand Down
Loading