Skip to content

Commit

Permalink
Rebase to 131 (#1640)
Browse files Browse the repository at this point in the history
Rebase to 131
  • Loading branch information
uazo authored Nov 16, 2024
2 parents eae1e04 + 01845cc commit 19cd8e5
Show file tree
Hide file tree
Showing 207 changed files with 2,981 additions and 2,795 deletions.
2 changes: 1 addition & 1 deletion build/RELEASE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
130.0.6723.117
131.0.6778.70
30 changes: 10 additions & 20 deletions build/patches/AImageReader-CFI-crash-mitigations.patch
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
---
base/android/android_image_reader_compat.cc | 16 ++++++++++++++++
base/android/android_image_reader_compat.h | 14 ++++++++++++++
chrome/browser/flag-metadata.json | 6 +++---
chrome/browser/flag-metadata.json | 4 ++++
.../AImageReader-CFI-crash-mitigations.inc | 4 ++++
.../AImageReader-CFI-crash-mitigations.inc | 1 +
gpu/config/gpu_driver_bug_list.json | 16 ++++++++++++++++
Expand All @@ -31,8 +31,8 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
gpu/config/gpu_util.cc | 8 ++++++++
gpu/config/gpu_workaround_list.txt | 1 +
gpu/ipc/service/gpu_init.cc | 8 ++++++++
gpu/ipc/service/stream_texture_android.cc | 11 ++++++++++-
12 files changed, 87 insertions(+), 4 deletions(-)
gpu/ipc/service/stream_texture_android.cc | 10 +++++++++-
12 files changed, 87 insertions(+), 1 deletion(-)
create mode 100644 cromite_flags/media/base/media_switches_cc/AImageReader-CFI-crash-mitigations.inc
create mode 100644 cromite_flags/media/base/media_switches_h/AImageReader-CFI-crash-mitigations.inc

Expand Down Expand Up @@ -90,13 +90,11 @@ diff --git a/base/android/android_image_reader_compat.h b/base/android/android_i
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json
--- a/chrome/browser/flag-metadata.json
+++ b/chrome/browser/flag-metadata.json
@@ -3430,9 +3430,9 @@
@@ -3408,6 +3408,10 @@
"name": "enable-identity-in-auth-error",
"owners": [ "[email protected]", "[email protected]" ],
"expiry_milestone": 135
},
{
- "name": "enable-image-reader",
- "owners": [ "[email protected]", "[email protected]" ],
- "expiry_milestone": 125
+ },{
+ "name": "enable-image-reader", // Bromite: do not expire
+ "owners": [ "[email protected]", "[email protected]" ], // flag
+ "expiry_milestone": -1
Expand Down Expand Up @@ -234,27 +232,19 @@ diff --git a/gpu/ipc/service/gpu_init.cc b/gpu/ipc/service/gpu_init.cc
diff --git a/gpu/ipc/service/stream_texture_android.cc b/gpu/ipc/service/stream_texture_android.cc
--- a/gpu/ipc/service/stream_texture_android.cc
+++ b/gpu/ipc/service/stream_texture_android.cc
@@ -6,6 +6,7 @@

#include <string.h>

+#include "base/android/android_image_reader_compat.h"
#include "base/android/scoped_hardware_buffer_fence_sync.h"
#include "base/feature_list.h"
#include "base/functional/bind.h"
@@ -49,7 +50,15 @@ std::unique_ptr<ui::ScopedMakeCurrent> MakeCurrent(
@@ -50,7 +50,15 @@ std::unique_ptr<ui::ScopedMakeCurrent> MakeCurrent(
}

TextureOwner::Mode GetTextureOwnerMode() {
- return features::IsAImageReaderEnabled()
- return base::android::EnableAndroidImageReader()
+ const bool a_image_reader_supported =
+ base::android::AndroidImageReader::GetInstance().IsSupported();
+
+ // TODO(vikassoni) : Currently we have 2 different flags to enable/disable
+ // AImageReader - one for MCVD and other for MediaPlayer here. Merge those 2
+ // flags into a single flag. Keeping the 2 flags separate for now since finch
+ // experiment using this flag is in progress.
+ return a_image_reader_supported && features::IsAImageReaderEnabled() &&
+ return a_image_reader_supported && base::android::EnableAndroidImageReader() &&
+ base::FeatureList::IsEnabled(features::kAImageReaderMediaPlayer)
? TextureOwner::Mode::kAImageReaderInsecure
: TextureOwner::Mode::kSurfaceTextureInsecure;
Expand Down
12 changes: 6 additions & 6 deletions build/patches/Add-AllowUserCertificates-flag.patch
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv
import org.chromium.printing.PrintManagerDelegateImpl;
import org.chromium.printing.PrintingController;
import org.chromium.printing.PrintingControllerImpl;
@@ -1045,6 +1046,8 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
@@ -1044,6 +1045,8 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>

ChromeActivitySessionTracker.getInstance().onStartWithNative(getProfileProviderSupplier());
ChromeCachedFlags.getInstance().cacheNativeFlags();
Expand All @@ -40,7 +40,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv
diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc
--- a/chrome/browser/flags/android/chrome_feature_list.cc
+++ b/chrome/browser/flags/android/chrome_feature_list.cc
@@ -157,6 +157,7 @@ const base::Feature* const kFeaturesExposedToJava[] = {
@@ -160,6 +160,7 @@ const base::Feature* const kFeaturesExposedToJava[] = {
&feed::kFeedPerformanceStudy,
&feed::kFeedShowSignInCommand,
&feed::kFeedSignedOutViewDemotion,
Expand All @@ -51,15 +51,15 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse
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
--- 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
@@ -159,6 +159,7 @@ public abstract class ChromeFeatureList {
@@ -161,6 +161,7 @@ public abstract class ChromeFeatureList {
/* Alphabetical: */
public static final String ACCOUNT_REAUTHENTICATION_RECENT_TIME_WINDOW =
"AccountReauthenticationRecentTimeWindow";
+ public static final String ALLOW_USER_CERTIFICATES = "AllowUserCertificates";
public static final String ADAPTIVE_BUTTON_IN_TOP_TOOLBAR_PAGE_SUMMARY =
"AdaptiveButtonInTopToolbarPageSummary";
public static final String ADAPTIVE_BUTTON_IN_TOP_TOOLBAR_CUSTOMIZATION_V2 =
@@ -583,6 +584,8 @@ public abstract class ChromeFeatureList {
@@ -608,6 +609,8 @@ public abstract class ChromeFeatureList {
public static final CachedFlag sAndroidTabDeclutterDedupeTabIdsKillSwitch =
newCachedFlag(ANDROID_TAB_DECLUTTER_DEDUPE_TAB_IDS_KILL_SWITCH, true);
public static final CachedFlag sAppSpecificHistory = newCachedFlag(APP_SPECIFIC_HISTORY, true);
Expand All @@ -68,14 +68,14 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f
public static final CachedFlag sAsyncNotificationManager =
newCachedFlag(ASYNC_NOTIFICATION_MANAGER, false);
public static final CachedFlag sBackGestureActivityTabProvider =
@@ -746,6 +749,7 @@ public abstract class ChromeFeatureList {
@@ -779,6 +782,7 @@ public abstract class ChromeFeatureList {
public static final List<CachedFlag> sFlagsCachedFullBrowserChromium =
List.of(
sAccountReauthenticationRecentTimeWindow,
+ sAllowUserCertificates,
sAndroidAppIntegration,
sAndroidAppIntegrationWithFavicon,
sAndroidBottomToolbar,
sAndroidElegantTextHeight,
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
new file mode 100644
--- /dev/null
Expand Down
2 changes: 1 addition & 1 deletion build/patches/Add-IsCleartextPermitted-flag.patch
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ new file mode 100644
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -391,6 +391,11 @@ std::unique_ptr<URLRequestJob> URLRequestHttpJob::Create(URLRequest* request) {
@@ -383,6 +383,11 @@ std::unique_ptr<URLRequestJob> URLRequestHttpJob::Create(URLRequest* request) {
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
diff --git a/base/features.cc b/base/features.cc
--- a/base/features.cc
+++ b/base/features.cc
@@ -108,6 +108,10 @@ BASE_FEATURE(kPostGetMyMemoryStateToBackground,
@@ -121,6 +121,10 @@ BASE_FEATURE(kPostGetMyMemoryStateToBackground,
FEATURE_DISABLED_BY_DEFAULT);
#endif // BUILDFLAG(IS_ANDROID)

Expand Down
8 changes: 4 additions & 4 deletions build/patches/Add-a-flag-to-disable-GamePad-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json
--- a/chrome/browser/flag-metadata.json
+++ b/chrome/browser/flag-metadata.json
@@ -7884,9 +7884,9 @@
@@ -7807,9 +7807,9 @@
"expiry_milestone" : 130
},
{
Expand All @@ -29,7 +29,7 @@ diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.js
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -3329,7 +3329,7 @@ const char kResetShortcutCustomizationsDescription[] =
@@ -3331,7 +3331,7 @@ const char kResetShortcutCustomizationsDescription[] =

const char kRestrictGamepadAccessName[] = "Restrict gamepad access";
const char kRestrictGamepadAccessDescription[] =
Expand All @@ -50,7 +50,7 @@ diff --git a/device/gamepad/public/cpp/gamepad_features.cc b/device/gamepad/publ
diff --git a/third_party/blink/renderer/modules/gamepad/navigator_gamepad.cc b/third_party/blink/renderer/modules/gamepad/navigator_gamepad.cc
--- a/third_party/blink/renderer/modules/gamepad/navigator_gamepad.cc
+++ b/third_party/blink/renderer/modules/gamepad/navigator_gamepad.cc
@@ -118,6 +118,10 @@ void RecordGamepadsForIdentifiabilityStudy(
@@ -120,6 +120,10 @@ void RecordGamepadsForIdentifiabilityStudy(
HeapVector<Member<Gamepad>> NavigatorGamepad::getGamepads(
Navigator& navigator,
ExceptionState& exception_state) {
Expand All @@ -61,7 +61,7 @@ diff --git a/third_party/blink/renderer/modules/gamepad/navigator_gamepad.cc b/t
if (!navigator.DomWindow()) {
// Using an existing NavigatorGamepad if one exists, but don't create one
// for a detached window, as its subclasses depend on a non-null window.
@@ -440,6 +444,8 @@ void NavigatorGamepad::SampleAndCompareGamepadState() {
@@ -442,6 +446,8 @@ void NavigatorGamepad::SampleAndCompareGamepadState() {

void NavigatorGamepad::DispatchGamepadEvent(const AtomicString& event_name,
Gamepad* gamepad) {
Expand Down
60 changes: 31 additions & 29 deletions build/patches/Add-a-proxy-configuration-page.patch
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
chrome/browser/resources/proxy_config.html | 77 ++++
chrome/browser/resources/proxy_config.js | 278 +++++++++++++
chrome/browser/ui/BUILD.gn | 2 +
.../webui/chrome_web_ui_controller_factory.cc | 3 +
.../webui/chrome_web_ui_controller_factory.cc | 5 +-
chrome/browser/ui/webui/proxy_config_ui.cc | 389 ++++++++++++++++++
chrome/browser/ui/webui/proxy_config_ui.h | 31 ++
chrome/common/webui_url_constants.cc | 2 +
Expand All @@ -40,7 +40,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
.../proxy_config/proxy_policy_handler.cc | 2 +-
net/proxy_resolution/proxy_config.cc | 51 ++-
net/proxy_resolution/proxy_config.h | 3 +
25 files changed, 973 insertions(+), 17 deletions(-)
25 files changed, 974 insertions(+), 18 deletions(-)
create mode 100644 chrome/browser/resources/proxy_config.css
create mode 100644 chrome/browser/resources/proxy_config.html
create mode 100644 chrome/browser/resources/proxy_config.js
Expand Down Expand Up @@ -84,7 +84,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
+ private static final String PREF_PROXY_OPTIONS = "proxy";
private static final String PREF_PRIVACY_GUIDE = "privacy_guide";
private static final String PREF_INCOGNITO_LOCK = "incognito_lock";
private static final String PREF_THIRD_PARTY_COOKIES = "third_party_cookies";
@VisibleForTesting static final String PREF_CLEAR_BROWSING_DATA = "clear_browsing_data";
diff --git a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
--- a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
+++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
Expand Down Expand Up @@ -196,7 +196,7 @@ diff --git a/chrome/browser/net/proxy_service_factory.h b/chrome/browser/net/pro
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -203,6 +203,8 @@
@@ -202,6 +202,8 @@
#include "printing/buildflags/buildflags.h"
#include "rlz/buildflags/buildflags.h"

Expand All @@ -205,7 +205,7 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browse
#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
#include "chrome/browser/background/background_mode_manager.h"
#endif
@@ -1577,6 +1579,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
@@ -1652,6 +1654,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
component_updater::RegisterPrefs(registry);
domain_reliability::RegisterPrefs(registry);
embedder_support::OriginTrialPrefs::RegisterPrefs(registry);
Expand Down Expand Up @@ -660,7 +660,7 @@ new file mode 100644
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
--- a/chrome/browser/ui/BUILD.gn
+++ b/chrome/browser/ui/BUILD.gn
@@ -281,6 +281,8 @@ static_library("ui") {
@@ -238,6 +238,8 @@ static_library("ui") {
"webui/metrics_internals/metrics_internals_ui.h",
"webui/net_export_ui.cc",
"webui/net_export_ui.h",
Expand All @@ -672,23 +672,25 @@ diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
--- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
+++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
@@ -46,6 +46,7 @@
#include "chrome/browser/ui/webui/media/media_engagement_ui.h"
#include "chrome/browser/ui/webui/media/webrtc_logs_ui.h"
#include "chrome/browser/ui/webui/policy/policy_ui.h"
@@ -32,6 +32,7 @@
#include "chrome/browser/ui/webui/about/about_ui.h"
#include "chrome/browser/ui/webui/components/components_ui.h"
#include "chrome/browser/ui/webui/crashes_ui.h"
+#include "chrome/browser/ui/webui/proxy_config_ui.h"
#include "chrome/browser/ui/webui/privacy_sandbox/privacy_sandbox_internals_ui.h"
#include "chrome/browser/ui/webui/suggest_internals/suggest_internals_ui.h"
#include "chrome/browser/ui/webui/download_internals/download_internals_ui.h"
#include "chrome/browser/ui/webui/flags/flags_ui.h"
#include "chrome/browser/ui/webui/webui_util.h"
@@ -532,6 +533,8 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
return &NewWebUI<SyncConfirmationUI>;
@@ -261,7 +262,9 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
history_clusters_internals::kChromeUIHistoryClustersInternalsHost) {
return &NewWebUI<HistoryClustersInternalsUI>;
}
#endif // BUILDFLAG(IS_ANDROID)
+ if (url.host_piece() == chrome::kChromeUIProxyConfigHost)
-
+ if (url.host_piece() == chrome::kChromeUIProxyConfigHost) {
+ return &NewWebUI<ProxyConfigUI>;
#if !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_ANDROID)
if (url.host_piece() == chrome::kChromeUIManagedUserProfileNoticeHost) {
return &NewWebUI<ManagedUserProfileNoticeUI>;
+ }
#if !BUILDFLAG(IS_ANDROID)
if (url.host_piece() == chrome::kChromeUINewTabHost) {
// The URL chrome://newtab/ can be either a virtual or a real URL,
diff --git a/chrome/browser/ui/webui/proxy_config_ui.cc b/chrome/browser/ui/webui/proxy_config_ui.cc
new file mode 100644
--- /dev/null
Expand Down Expand Up @@ -1141,7 +1143,7 @@ diff --git a/chrome/common/webui_url_constants.cc b/chrome/common/webui_url_cons
diff --git a/chrome/common/webui_url_constants.h b/chrome/common/webui_url_constants.h
--- a/chrome/common/webui_url_constants.h
+++ b/chrome/common/webui_url_constants.h
@@ -176,6 +176,8 @@ inline constexpr char kChromeUINetExportURL[] = "chrome://net-export";
@@ -173,6 +173,8 @@ inline constexpr char kChromeUINetExportURL[] = "chrome://net-export";
inline constexpr char kChromeUINetInternalsHost[] = "net-internals";
inline constexpr char kChromeUINetInternalsURL[] = "chrome://net-internals/";
inline constexpr char kChromeUINewTabHost[] = "newtab";
Expand All @@ -1153,7 +1155,7 @@ diff --git a/chrome/common/webui_url_constants.h b/chrome/common/webui_url_const
diff --git a/components/proxy_config/pref_proxy_config_tracker_impl.cc b/components/proxy_config/pref_proxy_config_tracker_impl.cc
--- a/components/proxy_config/pref_proxy_config_tracker_impl.cc
+++ b/components/proxy_config/pref_proxy_config_tracker_impl.cc
@@ -244,14 +244,14 @@ PrefProxyConfigTrackerImpl::GetEffectiveProxyConfig(
@@ -253,14 +253,14 @@ PrefProxyConfigTrackerImpl::GetEffectiveProxyConfig(
// static
void PrefProxyConfigTrackerImpl::RegisterPrefs(PrefRegistrySimple* registry) {
registry->RegisterDictionaryPref(proxy_config::prefs::kProxy,
Expand All @@ -1170,7 +1172,7 @@ diff --git a/components/proxy_config/pref_proxy_config_tracker_impl.cc b/compone
registry->RegisterBooleanPref(proxy_config::prefs::kUseSharedProxies, false);
}

@@ -388,6 +388,7 @@ bool PrefProxyConfigTrackerImpl::PrefConfigToNetConfig(
@@ -412,6 +412,7 @@ bool PrefProxyConfigTrackerImpl::PrefConfigToNetConfig(
if (proxy_dict.GetBypassList(&proxy_bypass)) {
proxy_config.proxy_rules().bypass_rules.ParseFromString(proxy_bypass);
}
Expand Down Expand Up @@ -1319,16 +1321,16 @@ diff --git a/components/proxy_config/proxy_policy_handler.cc b/components/proxy_
diff --git a/net/proxy_resolution/proxy_config.cc b/net/proxy_resolution/proxy_config.cc
--- a/net/proxy_resolution/proxy_config.cc
+++ b/net/proxy_resolution/proxy_config.cc
@@ -124,7 +124,7 @@ void ProxyConfig::ProxyRules::ParseFromString(
ProxyServer::SCHEME_HTTP,
allow_bracketed_proxy_chains);
@@ -131,7 +131,7 @@ void ProxyConfig::ProxyRules::ParseFromString(const std::string& proxy_rules,
url_scheme, &single_proxies, ProxyServer::SCHEME_HTTP,
allow_bracketed_proxy_chains, is_quic_allowed);
type = Type::PROXY_LIST;
- return;
+ continue;
}

// Trim whitespace off the url scheme.
@@ -155,6 +155,55 @@ void ProxyConfig::ProxyRules::ParseFromString(
@@ -162,6 +162,55 @@ void ProxyConfig::ProxyRules::ParseFromString(const std::string& proxy_rules,
}
}

Expand Down Expand Up @@ -1387,10 +1389,10 @@ diff --git a/net/proxy_resolution/proxy_config.cc b/net/proxy_resolution/proxy_c
diff --git a/net/proxy_resolution/proxy_config.h b/net/proxy_resolution/proxy_config.h
--- a/net/proxy_resolution/proxy_config.h
+++ b/net/proxy_resolution/proxy_config.h
@@ -108,6 +108,9 @@ class NET_EXPORT ProxyConfig {
// URLs.
@@ -107,6 +107,9 @@ class NET_EXPORT ProxyConfig {
void ParseFromString(const std::string& proxy_rules,
bool allow_bracketed_proxy_chains = false);
bool allow_bracketed_proxy_chains = false,
bool is_quic_allowed = false);
+ // Returns the proxy rules in a format that can be parsed by ParseFromString;
+ // all information except bypass rules is used.
+ std::string ToString() const;
Expand Down
Loading

0 comments on commit 19cd8e5

Please sign in to comment.