Skip to content

Commit

Permalink
Merge pull request #13946 from brave/cr105
Browse files Browse the repository at this point in the history
Upgrade from Chromium 104 to Chromium 105.
  • Loading branch information
mkarolin authored Aug 23, 2022
2 parents 96f2f90 + 58acef6 commit a22d340
Show file tree
Hide file tree
Showing 520 changed files with 3,882 additions and 3,333 deletions.
17 changes: 0 additions & 17 deletions android/browsertests_apk/AndroidManifest.xml.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -86,23 +86,6 @@
</intent-filter>
</activity>

<activity
android:name="org.chromium.chrome.browser.sharing.shared_clipboard.SharedClipboardShareActivity"
android:icon="@drawable/ic_devices_48dp"
android:label="@string/shared_clipboard_share_activity_title"
android:enabled="false"
android:excludeFromRecents="true"
android:exported="true"
android:noHistory="true"
android:theme="@style/Theme.Chromium.Activity.TranslucentNoAnimations"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|mcc|mnc|screenLayout|smallestScreenSize" >
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
</activity>

<receiver android:name="org.chromium.chrome.browser.quickactionsearchwidget.QuickActionSearchWidgetProvider"
android:exported="true">
<intent-filter>
Expand Down
6 changes: 0 additions & 6 deletions android/java/apk_for_test.flags
Original file line number Diff line number Diff line change
Expand Up @@ -448,10 +448,6 @@
public <init>(...);
}

-keep class org.chromium.chrome.browser.omnibox.suggestions.AutocompleteCoordinator {
*** createViewProvider(...);
}

-keep class org.chromium.chrome.browser.omnibox.suggestions.BraveAutocompleteCoordinator {
*** createViewProvider(...);
}
Expand All @@ -470,8 +466,6 @@
*** mDropdownHeight;
*** mPriorityOrderedSuggestionProcessors;
public <init>(...);
*** getVisibleSuggestionsCount(...);
*** getProcessorForSuggestion(...);
}

-keep class org.chromium.chrome.browser.omnibox.suggestions.BraveDropdownItemViewInfoListBuilder {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public OverrideUrlLoadingResult clobberCurrentTabWithFallbackUrl(
params.getRedirectHandler().setShouldNotOverrideUrlLoadingOnCurrentRedirectChain();
}
GURL browserFallbackGURL = new GURL(browserFallbackUrl);
return clobberCurrentTab(browserFallbackGURL, params.getReferrerUrl());
return clobberCurrentTab(browserFallbackGURL, params.getReferrerUrl(),
params.getInitiatorOrigin(), params.isRendererInitiated());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,10 @@ public boolean onOptionsItemSelected(MenuItem item) {
}
return super.onOptionsItemSelected(item);
}

@Override
protected boolean supportsDynamicColors() {
// Dynamic colors cause styling issues with Brave theme.
return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;

import org.chromium.base.Callback;
import org.chromium.chrome.browser.ChromeTabbedActivity;
Expand All @@ -22,19 +22,12 @@ public BraveSiteSettingsDelegate(Context context, Profile profile) {
}

@Override
public void closeButton() {
Intent intent =
new Intent(BraveActivity.getChromeTabbedActivity(), ChromeTabbedActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
BraveActivity.getChromeTabbedActivity().startActivity(intent);
}

@Override
public void getFaviconImageForURL(GURL faviconUrl, Callback<Bitmap> callback) {
public void getFaviconImageForURL(GURL faviconUrl, Callback<Drawable> callback) {
if (!faviconUrl.isValid()) {
callback.onResult(null);
return;
}

super.getFaviconImageForURL(faviconUrl, callback);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ public BraveTopToolbarCoordinator(ToolbarControlContainer controlContainer,
ObservableSupplier<AppMenuButtonHelper> appMenuButtonHelperSupplier,
ObservableSupplier<TabModelSelector> tabModelSelectorSupplier,
ObservableSupplier<Boolean> homepageEnabledSupplier,
ObservableSupplier<Boolean> startSurfaceAsHomepageSupplier,
ObservableSupplier<Boolean> homepageManagedByPolicySupplier,
ObservableSupplier<Boolean> identityDiscStateSupplier,
Callback<Runnable> invalidatorCallback, Supplier<ButtonData> identityDiscButtonSupplier,
Supplier<ResourceManager> resourceManagerSupplier,
Expand All @@ -73,7 +71,6 @@ public BraveTopToolbarCoordinator(ToolbarControlContainer controlContainer,
layoutStateProviderSupplier, normalThemeColorProvider, overviewThemeColorProvider,
browsingModeMenuButtonCoordinator, overviewModeMenuButtonCoordinator,
appMenuButtonHelperSupplier, tabModelSelectorSupplier, homepageEnabledSupplier,
startSurfaceAsHomepageSupplier, homepageManagedByPolicySupplier,
identityDiscStateSupplier, invalidatorCallback, identityDiscButtonSupplier,
resourceManagerSupplier, isProgressBarVisibleSupplier,
isIncognitoModeEnabledSupplier, isGridTabSwitcherEnabled, isTabletGtsPolishEnabled,
Expand Down
7 changes: 7 additions & 0 deletions android/java/res/layout/new_tab_page_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,13 @@
android:layout_marginTop="16dp"
android:visibility="gone"/>

<ViewStub
android:id="@+id/search_resumption_module_container_stub"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/search_resumption_module_margin_top"
android:layout="@layout/search_resumption_module_layout" />

<!-- Video tutorial IPH card -->
<ViewStub
android:id="@+id/video_iph_stub"
Expand Down
19 changes: 9 additions & 10 deletions android/javatests/org/chromium/chrome/browser/BytecodeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@
import org.chromium.chrome.browser.omnibox.UrlBarEditingTextStateProvider;
import org.chromium.chrome.browser.omnibox.status.PageInfoIPHController;
import org.chromium.chrome.browser.omnibox.suggestions.AutocompleteDelegate;
import org.chromium.chrome.browser.omnibox.suggestions.FaviconFetcher;
import org.chromium.chrome.browser.omnibox.suggestions.OmniboxPedalDelegate;
import org.chromium.chrome.browser.omnibox.suggestions.SuggestionHost;
import org.chromium.chrome.browser.omnibox.suggestions.SuggestionProcessor;
import org.chromium.chrome.browser.omnibox.suggestions.UrlBarDelegate;
import org.chromium.chrome.browser.omnibox.suggestions.basic.BasicSuggestionProcessor.BookmarkState;
import org.chromium.chrome.browser.omnibox.suggestions.mostvisited.ExploreIconProvider;
import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.chrome.browser.share.ShareDelegateImpl;
import org.chromium.chrome.browser.share.crow.CrowButtonDelegate;
Expand Down Expand Up @@ -543,7 +543,7 @@ public void testConstructorsExistAndMatch() throws Exception {
Assert.assertTrue(constructorsMatch(
"org/chromium/chrome/browser/omnibox/suggestions/editurl/EditUrlSuggestionProcessor",
"org/chromium/chrome/browser/omnibox/suggestions/editurl/BraveEditUrlSuggestionProcessor",
Context.class, SuggestionHost.class, UrlBarDelegate.class, Supplier.class,
Context.class, SuggestionHost.class, UrlBarDelegate.class, FaviconFetcher.class,
Supplier.class, Supplier.class));
Assert.assertTrue(constructorsMatch(
"org/chromium/chrome/browser/toolbar/top/TopToolbarCoordinator",
Expand All @@ -553,11 +553,11 @@ public void testConstructorsExistAndMatch() throws Exception {
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,
boolean.class, HistoryDelegate.class, BooleanSupplier.class,
OfflineDownloader.class, boolean.class, ObservableSupplier.class, Callback.class));
ObservableSupplier.class, Callback.class, Supplier.class, Supplier.class,
ObservableSupplier.class, BooleanSupplier.class, boolean.class, boolean.class,
boolean.class, boolean.class, boolean.class, HistoryDelegate.class,
BooleanSupplier.class, OfflineDownloader.class, boolean.class,
ObservableSupplier.class, Callback.class));
Assert.assertTrue(constructorsMatch(
"org/chromium/chrome/browser/toolbar/menu_button/MenuButtonCoordinator",
"org/chromium/chrome/browser/toolbar/menu_button/BraveMenuButtonCoordinator",
Expand All @@ -580,7 +580,7 @@ public void testConstructorsExistAndMatch() throws Exception {
Context.class, AutocompleteDelegate.class, UrlBarEditingTextStateProvider.class,
PropertyModel.class, Handler.class, Supplier.class, Supplier.class, Supplier.class,
LocationBarDataProvider.class, Callback.class, Supplier.class, BookmarkState.class,
JankTracker.class, ExploreIconProvider.class, OmniboxPedalDelegate.class));
JankTracker.class, OmniboxPedalDelegate.class));
Assert.assertTrue(constructorsMatch("org/chromium/chrome/browser/feed/FeedSurfaceMediator",
"org/chromium/chrome/browser/feed/BraveFeedSurfaceMediator",
FeedSurfaceCoordinator.class, Context.class, SnapScrollHelper.class,
Expand Down Expand Up @@ -612,8 +612,7 @@ public void testConstructorsExistAndMatch() throws Exception {
Assert.assertTrue(constructorsMatch(
"org/chromium/chrome/browser/omnibox/suggestions/DropdownItemViewInfoListBuilder",
"org/chromium/chrome/browser/omnibox/suggestions/BraveDropdownItemViewInfoListBuilder",
Supplier.class, BookmarkState.class, ExploreIconProvider.class,
OmniboxPedalDelegate.class));
Supplier.class, BookmarkState.class, OmniboxPedalDelegate.class));
Assert.assertTrue(constructorsMatch(
"org/chromium/chrome/browser/omnibox/suggestions/DropdownItemViewInfoListManager",
"org/chromium/chrome/browser/omnibox/suggestions/BraveDropdownItemViewInfoListManager",
Expand Down
6 changes: 6 additions & 0 deletions app/bookmarks_strings.grdp
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@
<message name="IDS_BOOKMARK_FOLDER_EDITOR_WINDOW_TITLE_NEW" desc="Window title of editor for new bookmark folders">
New folder
</message>
<message name="IDS_UNNAMED_BOOKMARK_FOLDER" desc="Tooltip for unnamed bookmark folders">
Unnamed folder
</message>
<message name="IDS_BOOKMARK_ALL_TABS_DIALOG_TITLE" desc="The title of the Bookmark All Tabs dialog.">
Bookmark all tabs
</message>
Expand All @@ -298,6 +301,9 @@
<message name="IDS_BOOKMARK_FOLDER_EDITOR_WINDOW_TITLE_NEW" desc="In Title Case: Window title of editor for new bookmark folders">
New Folder
</message>
<message name="IDS_UNNAMED_BOOKMARK_FOLDER" desc="In Title Case: Tooltip for unnamed bookmark folders">
Unnamed Folder
</message>
<message name="IDS_BOOKMARK_ALL_TABS_DIALOG_TITLE" desc="In Title Case: The title of the Bookmark All Tabs dialog.">
Bookmark All Tabs
</message>
Expand Down
10 changes: 8 additions & 2 deletions app/brave_main_delegate_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "build/build_config.h"
#include "chrome/browser/domain_reliability/service_factory.h"
#include "chrome/browser/enterprise/connectors/analysis/content_analysis_features.h"
#include "chrome/browser/prefetch/prefetch_proxy/prefetch_proxy_features.h"
#include "chrome/common/chrome_features.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/test/base/chrome_test_utils.h"
Expand Down Expand Up @@ -82,12 +83,14 @@ IN_PROC_BROWSER_TEST_F(BraveMainDelegateBrowserTest, DisabledFeatures) {
const base::Feature* disabled_features[] = {
&autofill::features::kAutofillEnableAccountWalletStorage,
&autofill::features::kAutofillEnableOfferNotificationForPromoCodes,
&autofill::features::kAutofillEnableRemadeDownstreamMetrics,
&autofill::features::kAutofillSaveCardUiExperiment,
&autofill::features::kAutofillServerCommunication,
&autofill::features::kAutofillUpstreamAllowAdditionalEmailDomains,
&blink::features::kAdInterestGroupAPI,
&blink::features::kBrowsingTopics,
&blink::features::kAllowURNsInIframes,
&blink::features::kBrowsingTopics,
&blink::features::kClientHintsMetaEquivDelegateCH,
&blink::features::kComputePressure,
&blink::features::kConversionMeasurement,
&blink::features::kCssSelectorFragmentAnchor,
Expand All @@ -107,6 +110,9 @@ IN_PROC_BROWSER_TEST_F(BraveMainDelegateBrowserTest, DisabledFeatures) {
&commerce::kShoppingPDPMetrics,
&commerce::kRetailCoupons,
&enterprise_connectors::kLocalContentAnalysisEnabled,
#if BUILDFLAG(IS_WIN)
&features::kAppBoundEncryptionMetrics,
#endif
#if !BUILDFLAG(IS_ANDROID)
&features::kCopyLinkToText,
#endif
Expand All @@ -115,10 +121,10 @@ IN_PROC_BROWSER_TEST_F(BraveMainDelegateBrowserTest, DisabledFeatures) {
&features::kFedCm,
&features::kFirstPartySets,
&features::kIdleDetection,
&features::kIsolatePrerenders,
&features::kNavigationRequestPreconnect,
&features::kNotificationTriggers,
&features::kOmniboxTriggerForNoStatePrefetch,
&features::kPrivacyGuide,
&features::kPrivacyGuide2,
&features::kPrivacySandboxAdsAPIsOverride,
&features::kSCTAuditing,
Expand Down
10 changes: 2 additions & 8 deletions app/brave_strings.grd
Original file line number Diff line number Diff line change
Expand Up @@ -636,15 +636,9 @@ Permissions you've already given to websites and apps may apply to this account.
<message name="IDS_DOWNLOAD_BUBBLE_SUBPAGE_SUMMARY_UNKNOWN_SOURCE" desc="Summary of dangerous warning for a file (like an extension) from an unknown source.">
Extensions, apps, and themes from unknown sources can harm your device. Brave recommends only installing them from the <ph name="IDS_EXTENSION_WEB_STORE_TITLE">$1<ex>Web Store</ex></ph>
</message>
<message name="IDS_DOWNLOAD_BUBBLE_SUBPAGE_SUMMARY_ENCRYPTED" desc="Summary of dangerous warning for an encrypted file.">
Brave blocked this file because it's encrypted. Ask its owner to decrypt it
</message>
<message name="IDS_DOWNLOAD_BUBBLE_SUBPAGE_SUMMARY_MALWARE" desc="Subpage summary for malware warning for the user.">
Brave blocked this file because it has malware
</message>
<message name="IDS_DOWNLOAD_BUBBLE_SUBPAGE_SUMMARY_TOO_BIG" desc="Subpage summary of warning for a file blocked for being too large.">
Brave blocked this file because it's too big for a security check. Try again with files up to 50 MB
</message>
<message name="IDS_DOWNLOAD_BUBBLE_SUBPAGE_SUMMARY_DEEP_SCANNING_PROMPT" desc="Subpage summary of warning for Deep Scanning.">
Brave recommends scanning this file because it may be dangerous
</message>
Expand Down Expand Up @@ -1425,8 +1419,8 @@ Permissions you've already given to websites and apps may apply to this account.
<message name="IDS_PRIVACY_SANDBOX_DIALOG_CONSENT_SUBTITLE" desc="A subtitle on the consent page. Consider this a tagline for the Privacy Sandbox project.* “exploring” conveys that this is a work in progress. * “new features” include settings that the user can turn on/off and also backend features that change the way Brave works for everyone * “allow sites to deliver”: Privacy Sandbox is proposed by Brave as a collaborative effort with the browser industry. We’re building and testing functionality that will live in the Brave browser. In order to land the full promise of Privacy Sandbox, websites and advertisers need to adopt the new APIs / functionality that we’re developing. So “allow sites…” makes it clear to the user that we’re building something for the ecosystem. Typically a Brave product builds something for the user, and that’s true in this case, but it’s bigger than that. * “same browsing experience using less of your info”: Another definition of the promise of Privacy Sandbox. Third-party cookies are going away. In this new world, the user will have essentially the same browsing experience but it’s more private because it doesn’t expose so much of the user’s info.">
Brave is exploring new features that allow sites to deliver the same browsing experience using less of your info
</message>
<message name="IDS_PRIVACY_SANDBOX_DIALOG_CONSENT_BODY_DESCRIPTION_2" desc="A paragraph beneath the “More control over the ads you see” subtitle.* “During the trials”: The trials happens in addition to today’s current system based on third-party cookies. In other words, even by agreeing to or remaining in a trial,, the user’s core experience doesn’t change much. This is an experiment, and we need the user to understand as much. * “see and remove topics of interests”: we want to stress the element of control * “estimate topics”: Topics of interest include things like “Live comedy” and “Rock music”. Brave estimates these interests based on the sites users visit. It’s an “estimation”, and we don’t want to suggest that we know with certainty the user’s interests. Avoid words like “guess”, “establish”, “define”, etc. (in place of “estimate”). * “recent browsing history”: Later in the UI, we define this as “a record of sites you’ve visited using Brave on this device.” By “recent”, we mean the last 3 weeks (also defined later in the UI).">
During the trials, you can see and remove topics of interest sites use to show you ads. Brave estimates your interests based on your recent browsing history.
<message name="IDS_PRIVACY_SANDBOX_DIALOG_CONSENT_BODY_DESCRIPTION_2" desc="A paragraph beneath the “More control over the ads you see” subtitle. * “see and remove topics of interests”: we want to stress the element of control * “estimate topics”: Topics of interest include things like “Live comedy” and “Rock music”. Brave estimates these interests based on the sites users visit. It’s an “estimation”, and we don’t want to suggest that we know with certainty the user’s interests. Avoid words like “guess”, “establish”, “define”, etc. (in place of “estimate”). * “recent browsing history”: Later in the UI, we define this as “a record of sites you’ve visited using Brave on this device.” By “recent”, we mean the last 3 weeks (also defined later in the UI).">
You can see and remove topics of interest sites use to show you ads. Brave estimates your interests based on your recent browsing history.
</message>
<message name="IDS_PRIVACY_SANDBOX_DIALOG_CONSENT_LEARN_MORE_LABEL" desc="Learn more link * Unfolds content within the page * The text that appears describes 2 ways in which a site can target ads: the “Topics API” and the “FLEDGE API”. You can see what those are at www.privacysanbox.com or they’re described for the user’s benefit in other text. * “ad personalization” can mean different things in different contexts. Here, we’re using it as a simple noun. In other words, it’s not the name of a control but a descriptive term used to describe the personalization of ads in the Brave browser. This “ad personalization” shouldn’t be confused with the setting in the Brave sync chain called “Ad personalization”.">
Learn more about ad personalization in Brave
Expand Down
Loading

0 comments on commit a22d340

Please sign in to comment.