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

Unified Diff: chrome/browser/io_thread.cc

Issue 1547273003: Set trusted SPDY proxy dynamically on per-profile basis (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/io_thread.cc
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index cc7872f5efc962fa7e2d6533fe823dad312db444..8b2495a9ccf8692a8377ac7acebc05f5fbd0dc9e 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -59,6 +59,7 @@
#include "content/public/common/content_features.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/user_agent.h"
+#include "net/base/default_trusted_spdy_proxy_provider.h"
#include "net/base/external_estimate_provider.h"
#include "net/base/host_mapping_rules.h"
#include "net/base/net_util.h"
@@ -963,10 +964,18 @@ void IOThread::ConfigureSpdyGlobals(
base::StringPiece spdy_trial_group,
const VariationParameters& spdy_trial_params,
IOThread::Globals* globals) {
+ // Initialize trusted SPDY proxy based on command line switch.
+ std::string trusted_spdy_proxy;
if (command_line.HasSwitch(switches::kTrustedSpdyProxy)) {
- globals->trusted_spdy_proxy.set(
- command_line.GetSwitchValueASCII(switches::kTrustedSpdyProxy));
+ trusted_spdy_proxy =
+ command_line.GetSwitchValueASCII(switches::kTrustedSpdyProxy);
+ // Configure DefaultTrustedSpdyProxyGetter to return the trusted SPDY proxy
+ // set on the command line.
+ globals->trusted_spdy_proxy_provider.reset(
+ new net::DefaultTrustedSpdyProxyProvider(net::ProxyServer::FromURI(
+ trusted_spdy_proxy, net::ProxyServer::SCHEME_HTTP)));
bengr 2016/01/11 22:29:35 This should take a const ProxyServer&
tbansal1 2016/01/12 20:50:50 I do not understand. It is taking a const ProxySer
bengr 2016/01/12 21:43:03 Whoops. Ack.
}
+
if (command_line.HasSwitch(switches::kIgnoreUrlFetcherCertRequests))
net::URLFetcher::SetIgnoreCertificateRequests(true);
@@ -1132,7 +1141,6 @@ void IOThread::InitializeNetworkSessionParamsFromGlobals(
globals.spdy_default_protocol.CopyToIfSet(
&params->spdy_default_protocol);
params->next_protos = globals.next_protos;
- globals.trusted_spdy_proxy.CopyToIfSet(&params->trusted_spdy_proxy);
params->forced_spdy_exclusions = globals.forced_spdy_exclusions;
globals.use_alternative_services.CopyToIfSet(
&params->use_alternative_services);

Powered by Google App Engine
This is Rietveld 408576698