summaryrefslogtreecommitdiff
path: root/chromium/components/proxy_config
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2022-09-29 16:16:15 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2022-11-09 10:04:06 +0000
commita95a7417ad456115a1ef2da4bb8320531c0821f1 (patch)
treeedcd59279e486d2fd4a8f88a7ed025bcf925c6e6 /chromium/components/proxy_config
parent33fc33aa94d4add0878ec30dc818e34e1dd3cc2a (diff)
downloadqtwebengine-chromium-a95a7417ad456115a1ef2da4bb8320531c0821f1.tar.gz
BASELINE: Update Chromium to 106.0.5249.126
Change-Id: Ib0bb21c437a7d1686e21c33f2d329f2ac425b7ab Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/438936 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/components/proxy_config')
-rw-r--r--chromium/components/proxy_config/BUILD.gn14
-rw-r--r--chromium/components/proxy_config/ios/proxy_service_factory.cc2
-rw-r--r--chromium/components/proxy_config/pref_proxy_config_tracker_impl.cc7
-rw-r--r--chromium/components/proxy_config/pref_proxy_config_tracker_impl.h2
-rw-r--r--chromium/components/proxy_config/proxy_policy_handler.cc8
5 files changed, 21 insertions, 12 deletions
diff --git a/chromium/components/proxy_config/BUILD.gn b/chromium/components/proxy_config/BUILD.gn
index 4e09932830b..ea24543961b 100644
--- a/chromium/components/proxy_config/BUILD.gn
+++ b/chromium/components/proxy_config/BUILD.gn
@@ -15,8 +15,6 @@ component("proxy_config") {
"proxy_config_export.h",
"proxy_config_pref_names.cc",
"proxy_config_pref_names.h",
- "proxy_policy_handler.cc",
- "proxy_policy_handler.h",
"proxy_prefs.cc",
"proxy_prefs.h",
]
@@ -43,6 +41,13 @@ component("proxy_config") {
} else {
deps += [ "//components/pref_registry" ]
}
+
+ if (!is_ios) {
+ sources += [
+ "proxy_policy_handler.cc",
+ "proxy_policy_handler.h",
+ ]
+ }
}
source_set("unit_tests") {
@@ -50,7 +55,6 @@ source_set("unit_tests") {
sources = [
"pref_proxy_config_tracker_impl_unittest.cc",
"proxy_config_dictionary_unittest.cc",
- "proxy_policy_handler_unittest.cc",
"proxy_prefs_unittest.cc",
]
deps = [
@@ -68,4 +72,8 @@ source_set("unit_tests") {
"//testing/gtest",
"//third_party/abseil-cpp:absl",
]
+
+ if (!is_ios) {
+ sources += [ "proxy_policy_handler_unittest.cc" ]
+ }
}
diff --git a/chromium/components/proxy_config/ios/proxy_service_factory.cc b/chromium/components/proxy_config/ios/proxy_service_factory.cc
index cbd5f3a6fb5..dcef1de9bd0 100644
--- a/chromium/components/proxy_config/ios/proxy_service_factory.cc
+++ b/chromium/components/proxy_config/ios/proxy_service_factory.cc
@@ -18,7 +18,7 @@
std::unique_ptr<net::ProxyConfigService>
ProxyServiceFactory::CreateProxyConfigService(PrefProxyConfigTracker* tracker) {
std::unique_ptr<net::ProxyConfigService> base_service(
- net::ConfiguredProxyResolutionService::CreateSystemProxyConfigService(
+ net::ProxyConfigService::CreateSystemProxyConfigService(
web::GetIOThreadTaskRunner({})));
return tracker->CreateTrackingProxyConfigService(std::move(base_service));
}
diff --git a/chromium/components/proxy_config/pref_proxy_config_tracker_impl.cc b/chromium/components/proxy_config/pref_proxy_config_tracker_impl.cc
index a54f92f2a9f..f0a1169257d 100644
--- a/chromium/components/proxy_config/pref_proxy_config_tracker_impl.cc
+++ b/chromium/components/proxy_config/pref_proxy_config_tracker_impl.cc
@@ -263,10 +263,9 @@ ProxyPrefs::ConfigState PrefProxyConfigTrackerImpl::ReadPrefConfig(
pref_service->FindPreference(proxy_config::prefs::kProxy);
DCHECK(pref);
- const base::Value* dict =
- pref_service->GetDictionary(proxy_config::prefs::kProxy);
- DCHECK(dict);
- ProxyConfigDictionary proxy_dict(dict->Clone());
+ const base::Value::Dict& dict =
+ pref_service->GetValueDict(proxy_config::prefs::kProxy);
+ ProxyConfigDictionary proxy_dict(base::Value(dict.Clone()));
if (PrefConfigToNetConfig(proxy_dict, config)) {
if (!pref->IsUserModifiable() || pref->HasUserSetting()) {
diff --git a/chromium/components/proxy_config/pref_proxy_config_tracker_impl.h b/chromium/components/proxy_config/pref_proxy_config_tracker_impl.h
index 539b00cd038..05effc4d5ef 100644
--- a/chromium/components/proxy_config/pref_proxy_config_tracker_impl.h
+++ b/chromium/components/proxy_config/pref_proxy_config_tracker_impl.h
@@ -28,7 +28,7 @@ class SingleThreadTaskRunner;
// settings (pushed from PrefProxyConfigTrackerImpl) as overrides to the proxy
// configuration determined by a baseline delegate ProxyConfigService on
// non-ChromeOS platforms. ChromeOS has its own implementation of overrides in
-// chromeos::ProxyConfigServiceImpl.
+// ash::ProxyConfigServiceImpl.
class ProxyConfigServiceImpl : public net::ProxyConfigService,
public net::ProxyConfigService::Observer {
public:
diff --git a/chromium/components/proxy_config/proxy_policy_handler.cc b/chromium/components/proxy_config/proxy_policy_handler.cc
index 926f2badb3b..f7a0207c111 100644
--- a/chromium/components/proxy_config/proxy_policy_handler.cc
+++ b/chromium/components/proxy_config/proxy_policy_handler.cc
@@ -276,11 +276,13 @@ void ProxyPolicyHandler::ApplyPolicySettings(const PolicyMap& policies,
const base::Value* ProxyPolicyHandler::GetProxyPolicyValue(
const base::Value* value,
const char* policy_name) {
- const base::DictionaryValue* settings;
- if (!value || !value->GetAsDictionary(&settings))
+ if (!value)
+ return nullptr;
+ const base::Value::Dict* settings = value->GetIfDict();
+ if (!settings)
return nullptr;
- const base::Value* policy_value = settings->FindPath(policy_name);
+ const base::Value* policy_value = settings->Find(policy_name);
if (!policy_value || policy_value->is_none())
return nullptr;
const std::string* tmp = policy_value->GetIfString();