Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1551)

Unified Diff: chrome/browser/net/proxy_service_factory.cc

Issue 2030193004: Add a policy for disabling the stripping of PAC URLs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add better documentatiob Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/net/proxy_service_factory.cc
diff --git a/chrome/browser/net/proxy_service_factory.cc b/chrome/browser/net/proxy_service_factory.cc
index 63e1062fbfb688e8674bc2e45a5a9dc5f3afdc5b..c67427c247ef97197d9e5bd54e1233e4b8df6f39 100644
--- a/chrome/browser/net/proxy_service_factory.cc
+++ b/chrome/browser/net/proxy_service_factory.cc
@@ -117,7 +117,8 @@ std::unique_ptr<net::ProxyService> ProxyServiceFactory::CreateProxyService(
net::NetworkDelegate* network_delegate,
std::unique_ptr<net::ProxyConfigService> proxy_config_service,
const base::CommandLine& command_line,
- bool quick_check_enabled) {
+ bool quick_check_enabled,
+ bool pac_https_url_stripping_enabled) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
bool use_v8 = !command_line.HasSwitch(switches::kWinHttpProxyResolver);
// TODO(eroman): Figure out why this doesn't work in single-process mode.
@@ -187,11 +188,10 @@ std::unique_ptr<net::ProxyService> ProxyServiceFactory::CreateProxyService(
}
proxy_service->set_quick_check_enabled(quick_check_enabled);
-
- if (command_line.HasSwitch(switches::kUnsafePacUrl)) {
- proxy_service->set_sanitize_url_policy(
- net::ProxyService::SanitizeUrlPolicy::UNSAFE);
- }
+ proxy_service->set_sanitize_url_policy(
+ pac_https_url_stripping_enabled
+ ? net::ProxyService::SanitizeUrlPolicy::SAFE
+ : net::ProxyService::SanitizeUrlPolicy::UNSAFE);
return proxy_service;
}
« no previous file with comments | « chrome/browser/net/proxy_service_factory.h ('k') | chrome/browser/policy/configuration_policy_handler_list_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698