Skip to content

Commit 8dc7a7f

Browse files
authored
Rebase to v132 (#1724)
Rebase to v132
2 parents 6398702 + fed3139 commit 8dc7a7f

File tree

219 files changed

+3041
-2662
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

219 files changed

+3041
-2662
lines changed

build/RELEASE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
131.0.6778.205
1+
132.0.6834.83

build/cromite_patches_list.txt

-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ Add-flag-to-disable-vibration.patch
124124
mime_util-force-text-x-suse-ymp-to-be-downloaded.patch
125125
Client-hints-overrides.patch
126126
Allow-building-without-enable_reporting.patch
127-
Disable-lock-icon-in-address-bar-by-default.patch
128127
Experimental-user-scripts-support.patch
129128
Keep-empty-tabs-between-sessions.patch
130129
Disable-third-party-origin-trials.patch

build/patches/AImageReader-CFI-crash-mitigations.patch

+8-8
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ diff --git a/base/android/android_image_reader_compat.h b/base/android/android_i
9090
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json
9191
--- a/chrome/browser/flag-metadata.json
9292
+++ b/chrome/browser/flag-metadata.json
93-
@@ -3408,6 +3408,10 @@
93+
@@ -3290,6 +3290,10 @@
9494
"name": "enable-identity-in-auth-error",
9595
9696
"expiry_milestone": 135
@@ -145,7 +145,7 @@ diff --git a/gpu/config/gpu_driver_bug_list.json b/gpu/config/gpu_driver_bug_lis
145145
diff --git a/gpu/config/gpu_finch_features.cc b/gpu/config/gpu_finch_features.cc
146146
--- a/gpu/config/gpu_finch_features.cc
147147
+++ b/gpu/config/gpu_finch_features.cc
148-
@@ -53,6 +53,11 @@ BASE_FEATURE(kUseGles2ForOopR,
148+
@@ -59,6 +59,11 @@ BASE_FEATURE(kAggressiveShaderCacheLimits,
149149
base::FEATURE_DISABLED_BY_DEFAULT);
150150

151151
#if BUILDFLAG(IS_ANDROID)
@@ -160,9 +160,9 @@ diff --git a/gpu/config/gpu_finch_features.cc b/gpu/config/gpu_finch_features.cc
160160
diff --git a/gpu/config/gpu_finch_features.h b/gpu/config/gpu_finch_features.h
161161
--- a/gpu/config/gpu_finch_features.h
162162
+++ b/gpu/config/gpu_finch_features.h
163-
@@ -24,6 +24,7 @@ GPU_EXPORT BASE_DECLARE_FEATURE(kUseGles2ForOopR);
164-
// All features in alphabetical order. The features should be documented
165-
// alongside the definition of their values in the .cc file.
163+
@@ -26,6 +26,7 @@ GPU_EXPORT BASE_DECLARE_FEATURE(kUseGles2ForOopR);
164+
GPU_EXPORT BASE_DECLARE_FEATURE(kAggressiveShaderCacheLimits);
165+
166166
#if BUILDFLAG(IS_ANDROID)
167167
+GPU_EXPORT BASE_DECLARE_FEATURE(kAImageReaderMediaPlayer);
168168
GPU_EXPORT BASE_DECLARE_FEATURE(kAndroidSurfaceControl);
@@ -171,7 +171,7 @@ diff --git a/gpu/config/gpu_finch_features.h b/gpu/config/gpu_finch_features.h
171171
diff --git a/gpu/config/gpu_util.cc b/gpu/config/gpu_util.cc
172172
--- a/gpu/config/gpu_util.cc
173173
+++ b/gpu/config/gpu_util.cc
174-
@@ -126,6 +126,9 @@ GpuFeatureStatus GetAndroidSurfaceControlFeatureStatus(
174+
@@ -125,6 +125,9 @@ GpuFeatureStatus GetAndroidSurfaceControlFeatureStatus(
175175
#if !BUILDFLAG(IS_ANDROID)
176176
return kGpuFeatureStatusDisabled;
177177
#else
@@ -181,7 +181,7 @@ diff --git a/gpu/config/gpu_util.cc b/gpu/config/gpu_util.cc
181181
if (!gpu_preferences.enable_android_surface_control)
182182
return kGpuFeatureStatusDisabled;
183183

184-
@@ -379,6 +382,11 @@ void AdjustGpuFeatureStatusToWorkarounds(GpuFeatureInfo* gpu_feature_info,
184+
@@ -378,6 +381,11 @@ void AdjustGpuFeatureStatusToWorkarounds(GpuFeatureInfo* gpu_feature_info,
185185
kGpuFeatureStatusSoftware;
186186
}
187187
}
@@ -215,7 +215,7 @@ diff --git a/gpu/ipc/service/gpu_init.cc b/gpu/ipc/service/gpu_init.cc
215215
#endif
216216

217217
#if BUILDFLAG(ENABLE_VULKAN)
218-
@@ -702,6 +703,13 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandLine* command_line,
218+
@@ -701,6 +702,13 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandLine* command_line,
219219
}
220220
#endif // BUILDFLAG(IS_WIN)
221221

build/patches/Add-AllowUserCertificates-flag.patch

+9-9
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
2020
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
2121
--- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
2222
+++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
23-
@@ -227,6 +227,7 @@ import org.chromium.content_public.browser.ScreenOrientationProvider;
23+
@@ -223,6 +223,7 @@ import org.chromium.content_public.browser.ScreenOrientationProvider;
2424
import org.chromium.content_public.browser.SelectionPopupController;
2525
import org.chromium.content_public.browser.WebContents;
2626
import org.chromium.content_public.common.ContentSwitches;
2727
+import org.chromium.net.X509Util;
2828
import org.chromium.printing.PrintManagerDelegateImpl;
2929
import org.chromium.printing.PrintingController;
3030
import org.chromium.printing.PrintingControllerImpl;
31-
@@ -1044,6 +1045,8 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
31+
@@ -1056,6 +1057,8 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
32+
super.onStartWithNative();
3233

3334
ChromeActivitySessionTracker.getInstance().onStartWithNative(getProfileProviderSupplier());
34-
ChromeCachedFlags.getInstance().cacheNativeFlags();
3535
+ X509Util.AllowUserCertificates = ChromeFeatureList.isEnabled(
3636
+ ChromeFeatureList.ALLOW_USER_CERTIFICATES);
3737

@@ -40,7 +40,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv
4040
diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc
4141
--- a/chrome/browser/flags/android/chrome_feature_list.cc
4242
+++ b/chrome/browser/flags/android/chrome_feature_list.cc
43-
@@ -161,6 +161,7 @@ const base::Feature* const kFeaturesExposedToJava[] = {
43+
@@ -165,6 +165,7 @@ const base::Feature* const kFeaturesExposedToJava[] = {
4444
&feed::kFeedPerformanceStudy,
4545
&feed::kFeedShowSignInCommand,
4646
&feed::kFeedSignedOutViewDemotion,
@@ -51,31 +51,31 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse
5151
diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
5252
--- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
5353
+++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
54-
@@ -161,6 +161,7 @@ public abstract class ChromeFeatureList {
54+
@@ -155,6 +155,7 @@ public abstract class ChromeFeatureList {
5555
/* Alphabetical: */
5656
public static final String ACCOUNT_REAUTHENTICATION_RECENT_TIME_WINDOW =
5757
"AccountReauthenticationRecentTimeWindow";
5858
+ public static final String ALLOW_USER_CERTIFICATES = "AllowUserCertificates";
5959
public static final String ADAPTIVE_BUTTON_IN_TOP_TOOLBAR_PAGE_SUMMARY =
6060
"AdaptiveButtonInTopToolbarPageSummary";
6161
public static final String ADAPTIVE_BUTTON_IN_TOP_TOOLBAR_CUSTOMIZATION_V2 =
62-
@@ -609,6 +610,8 @@ public abstract class ChromeFeatureList {
62+
@@ -586,6 +587,8 @@ public abstract class ChromeFeatureList {
6363
public static final CachedFlag sAndroidTabDeclutterDedupeTabIdsKillSwitch =
6464
newCachedFlag(ANDROID_TAB_DECLUTTER_DEDUPE_TAB_IDS_KILL_SWITCH, true);
6565
public static final CachedFlag sAppSpecificHistory = newCachedFlag(APP_SPECIFIC_HISTORY, true);
6666
+ public static final CachedFlag sAllowUserCertificates =
6767
+ newCachedFlag(ALLOW_USER_CERTIFICATES, false);
6868
public static final CachedFlag sAsyncNotificationManager =
6969
newCachedFlag(ASYNC_NOTIFICATION_MANAGER, false);
70-
public static final CachedFlag sBackGestureActivityTabProvider =
71-
@@ -780,6 +783,7 @@ public abstract class ChromeFeatureList {
70+
public static final CachedFlag sBlockIntentsWhileLocked =
71+
@@ -744,6 +747,7 @@ public abstract class ChromeFeatureList {
7272
public static final List<CachedFlag> sFlagsCachedFullBrowserChromium =
7373
List.of(
7474
sAccountReauthenticationRecentTimeWindow,
7575
+ sAllowUserCertificates,
7676
sAndroidAppIntegration,
77+
sAndroidAppIntegrationV2,
7778
sAndroidAppIntegrationWithFavicon,
78-
sAndroidBottomToolbar,
7979
diff --git a/cromite_flags/chrome/browser/about_flags_cc/Add-AllowUserCertificates-flag.inc b/cromite_flags/chrome/browser/about_flags_cc/Add-AllowUserCertificates-flag.inc
8080
new file mode 100644
8181
--- /dev/null

build/patches/Add-Alt-D-hotkey-to-focus-address-bar.patch

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
1010
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcuts.java b/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcuts.java
1111
--- a/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcuts.java
1212
+++ b/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcuts.java
13-
@@ -392,6 +392,8 @@ public class KeyboardShortcuts {
13+
@@ -403,6 +403,8 @@ public class KeyboardShortcuts {
1414
R.string.keyboard_shortcut_address_bar,
1515
KeyEvent.KEYCODE_L,
1616
KeyEvent.META_CTRL_ON);

build/patches/Add-IsCleartextPermitted-flag.patch

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ new file mode 100644
4444
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
4545
--- a/net/url_request/url_request_http_job.cc
4646
+++ b/net/url_request/url_request_http_job.cc
47-
@@ -383,6 +383,11 @@ std::unique_ptr<URLRequestJob> URLRequestHttpJob::Create(URLRequest* request) {
47+
@@ -371,6 +371,11 @@ std::unique_ptr<URLRequestJob> URLRequestHttpJob::Create(URLRequest* request) {
4848
}
4949
}
5050

build/patches/Add-PartialLowEndModeOnMidRangeDevices-flag.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
1515
diff --git a/base/features.cc b/base/features.cc
1616
--- a/base/features.cc
1717
+++ b/base/features.cc
18-
@@ -121,6 +121,10 @@ BASE_FEATURE(kPostGetMyMemoryStateToBackground,
18+
@@ -115,6 +115,10 @@ BASE_FEATURE(kPostGetMyMemoryStateToBackground,
1919
FEATURE_DISABLED_BY_DEFAULT);
2020
#endif // BUILDFLAG(IS_ANDROID)
2121

@@ -29,7 +29,7 @@ diff --git a/base/features.cc b/base/features.cc
2929
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
3030
--- a/chrome/browser/about_flags.cc
3131
+++ b/chrome/browser/about_flags.cc
32-
@@ -21,6 +21,7 @@
32+
@@ -22,6 +22,7 @@
3333
#include "base/base_switches.h"
3434
#include "base/command_line.h"
3535
#include "base/feature_list.h"

build/patches/Add-a-flag-to-disable-GamePad-API.patch

+68-24
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,19 @@ Subject: Add a flag to disable GamePad API
55
Adds restrict-gamepad-access flag (default active) to disable GamePad API.
66
License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
77
---
8-
chrome/browser/flag-metadata.json | 4 ++--
9-
chrome/browser/flag_descriptions.cc | 2 +-
10-
device/gamepad/public/cpp/gamepad_features.cc | 1 +
11-
.../blink/renderer/modules/gamepad/navigator_gamepad.cc | 6 ++++++
12-
4 files changed, 10 insertions(+), 3 deletions(-)
8+
chrome/browser/flag-metadata.json | 4 ++--
9+
content/child/runtime_features.cc | 2 ++
10+
.../about_flags_cc/Add-a-flag-to-disable-GamePad-API.inc | 7 +++++++
11+
device/gamepad/public/cpp/gamepad_features.cc | 8 ++++++++
12+
device/gamepad/public/cpp/gamepad_features.h | 2 ++
13+
.../blink/renderer/modules/gamepad/navigator_gamepad.cc | 7 +++++++
14+
6 files changed, 28 insertions(+), 2 deletions(-)
15+
create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Add-a-flag-to-disable-GamePad-API.inc
1316

1417
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json
1518
--- a/chrome/browser/flag-metadata.json
1619
+++ b/chrome/browser/flag-metadata.json
17-
@@ -7807,9 +7807,9 @@
20+
@@ -7726,9 +7726,9 @@
1821
"expiry_milestone" : 130
1922
},
2023
{
@@ -26,46 +29,87 @@ diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.js
2629
},
2730
{
2831
"name": "retain-omnibox-on-focus",
29-
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
30-
--- a/chrome/browser/flag_descriptions.cc
31-
+++ b/chrome/browser/flag_descriptions.cc
32-
@@ -3331,7 +3331,7 @@ const char kResetShortcutCustomizationsDescription[] =
33-
34-
const char kRestrictGamepadAccessName[] = "Restrict gamepad access";
35-
const char kRestrictGamepadAccessDescription[] =
36-
- "Enables Permissions Policy and Secure Context restrictions on the Gamepad "
37-
+ "Disable the Gamepad "
38-
"API";
39-
40-
#if BUILDFLAG(IS_ANDROID)
32+
diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc
33+
--- a/content/child/runtime_features.cc
34+
+++ b/content/child/runtime_features.cc
35+
@@ -271,6 +271,8 @@ void SetRuntimeFeaturesFromChromiumFeatures() {
36+
raw_ref(features::kPeriodicBackgroundSync)},
37+
{wf::EnablePushMessagingSubscriptionChange,
38+
raw_ref(features::kPushSubscriptionChangeEvent)},
39+
+ {wf::EnableRestrictGamepadAccess,
40+
+ raw_ref(features::kRestrictGamepadAccess)},
41+
{wf::EnableSecurePaymentConfirmation,
42+
raw_ref(features::kSecurePaymentConfirmation)},
43+
{wf::EnableSecurePaymentConfirmationDebug,
44+
diff --git a/cromite_flags/chrome/browser/about_flags_cc/Add-a-flag-to-disable-GamePad-API.inc b/cromite_flags/chrome/browser/about_flags_cc/Add-a-flag-to-disable-GamePad-API.inc
45+
new file mode 100644
46+
--- /dev/null
47+
+++ b/cromite_flags/chrome/browser/about_flags_cc/Add-a-flag-to-disable-GamePad-API.inc
48+
@@ -0,0 +1,7 @@
49+
+#ifdef FLAG_SECTION
50+
+
51+
+ {"restrict-gamepad-access", "Restrict gamepad access",
52+
+ "Disable the Gamepad API", kOsAll,
53+
+ FEATURE_VALUE_TYPE(features::kRestrictGamepadAccess)},
54+
+
55+
+#endif
4156
diff --git a/device/gamepad/public/cpp/gamepad_features.cc b/device/gamepad/public/cpp/gamepad_features.cc
4257
--- a/device/gamepad/public/cpp/gamepad_features.cc
4358
+++ b/device/gamepad/public/cpp/gamepad_features.cc
44-
@@ -64,4 +64,5 @@ bool IsGamepadMultitouchEnabled() {
59+
@@ -27,4 +27,12 @@ bool IsGamepadMultitouchEnabled() {
4560
return false;
4661
}
4762

48-
+SET_CROMITE_FEATURE_ENABLED(kRestrictGamepadAccess);
63+
+CROMITE_FEATURE(kRestrictGamepadAccess,
64+
+ "RestrictGamepadAccess",
65+
+ base::FEATURE_ENABLED_BY_DEFAULT);
66+
+
67+
+bool IsRestrictGamepadAccessEnabled() {
68+
+ return base::FeatureList::IsEnabled(kRestrictGamepadAccess);
69+
+}
70+
+
71+
} // namespace features
72+
diff --git a/device/gamepad/public/cpp/gamepad_features.h b/device/gamepad/public/cpp/gamepad_features.h
73+
--- a/device/gamepad/public/cpp/gamepad_features.h
74+
+++ b/device/gamepad/public/cpp/gamepad_features.h
75+
@@ -11,8 +11,10 @@
76+
namespace features {
77+
78+
GAMEPAD_FEATURES_EXPORT BASE_DECLARE_FEATURE(kEnableGamepadMultitouch);
79+
+GAMEPAD_FEATURES_EXPORT BASE_DECLARE_FEATURE(kRestrictGamepadAccess);
80+
81+
GAMEPAD_FEATURES_EXPORT bool IsGamepadMultitouchEnabled();
82+
+GAMEPAD_FEATURES_EXPORT bool IsRestrictGamepadAccessEnabled();
83+
4984
} // namespace features
85+
5086
diff --git a/third_party/blink/renderer/modules/gamepad/navigator_gamepad.cc b/third_party/blink/renderer/modules/gamepad/navigator_gamepad.cc
5187
--- a/third_party/blink/renderer/modules/gamepad/navigator_gamepad.cc
5288
+++ b/third_party/blink/renderer/modules/gamepad/navigator_gamepad.cc
53-
@@ -120,6 +120,10 @@ void RecordGamepadsForIdentifiabilityStudy(
89+
@@ -27,6 +27,7 @@
90+
91+
#include "base/auto_reset.h"
92+
#include "device/gamepad/public/cpp/gamepads.h"
93+
+#include "device/gamepad/public/cpp/gamepad_features.h"
94+
#include "third_party/blink/public/common/privacy_budget/identifiability_metric_builder.h"
95+
#include "third_party/blink/public/common/privacy_budget/identifiability_study_settings.h"
96+
#include "third_party/blink/public/mojom/frame/user_activation_notification_type.mojom-blink.h"
97+
@@ -112,6 +113,10 @@ void RecordGamepadsForIdentifiabilityStudy(
5498
HeapVector<Member<Gamepad>> NavigatorGamepad::getGamepads(
5599
Navigator& navigator,
56100
ExceptionState& exception_state) {
57-
+ if (base::FeatureList::IsEnabled(::features::kRestrictGamepadAccess)) {
101+
+ if (::features::IsRestrictGamepadAccessEnabled()) {
58102
+ exception_state.ThrowSecurityError("Access to the feature \"gamepad\" is denied");
59103
+ return HeapVector<Member<Gamepad>>();
60104
+ }
61105
if (!navigator.DomWindow()) {
62106
// Using an existing NavigatorGamepad if one exists, but don't create one
63107
// for a detached window, as its subclasses depend on a non-null window.
64-
@@ -442,6 +446,8 @@ void NavigatorGamepad::SampleAndCompareGamepadState() {
108+
@@ -418,6 +423,8 @@ void NavigatorGamepad::SampleAndCompareGamepadState() {
65109

66110
void NavigatorGamepad::DispatchGamepadEvent(const AtomicString& event_name,
67111
Gamepad* gamepad) {
68-
+ if (base::FeatureList::IsEnabled(::features::kRestrictGamepadAccess))
112+
+ if (::features::IsRestrictGamepadAccessEnabled())
69113
+ return;
70114
// Ensure that we're blocking re-entrancy.
71115
DCHECK(processing_events_);

0 commit comments

Comments
 (0)