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

Side by Side 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: Added net/base/test_proxy_delegate.{h,cc} Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/io_thread.h ('k') | chrome/browser/ui/startup/bad_flags_prompt.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/io_thread.h" 5 #include "chrome/browser/io_thread.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 // if indicated by user. 977 // if indicated by user.
978 net::CheckSupportAndMaybeEnableTCPFastOpen(always_enable_if_supported); 978 net::CheckSupportAndMaybeEnableTCPFastOpen(always_enable_if_supported);
979 } 979 }
980 980
981 // static 981 // static
982 void IOThread::ConfigureSpdyGlobals( 982 void IOThread::ConfigureSpdyGlobals(
983 const base::CommandLine& command_line, 983 const base::CommandLine& command_line,
984 base::StringPiece spdy_trial_group, 984 base::StringPiece spdy_trial_group,
985 const VariationParameters& spdy_trial_params, 985 const VariationParameters& spdy_trial_params,
986 IOThread::Globals* globals) { 986 IOThread::Globals* globals) {
987 if (command_line.HasSwitch(switches::kTrustedSpdyProxy)) {
988 globals->trusted_spdy_proxy.set(
989 command_line.GetSwitchValueASCII(switches::kTrustedSpdyProxy));
990 }
991 if (command_line.HasSwitch(switches::kIgnoreUrlFetcherCertRequests)) 987 if (command_line.HasSwitch(switches::kIgnoreUrlFetcherCertRequests))
992 net::URLFetcher::SetIgnoreCertificateRequests(true); 988 net::URLFetcher::SetIgnoreCertificateRequests(true);
993 989
994 if (command_line.HasSwitch(switches::kUseSpdy)) { 990 if (command_line.HasSwitch(switches::kUseSpdy)) {
995 std::string spdy_mode = 991 std::string spdy_mode =
996 command_line.GetSwitchValueASCII(switches::kUseSpdy); 992 command_line.GetSwitchValueASCII(switches::kUseSpdy);
997 ConfigureSpdyGlobalsFromUseSpdyArgument(spdy_mode, globals); 993 ConfigureSpdyGlobalsFromUseSpdyArgument(spdy_mode, globals);
998 // TODO(bnc): https://crbug.com/547781 994 // TODO(bnc): https://crbug.com/547781
999 // This command line flag is broken. 995 // This command line flag is broken.
1000 globals->enable_spdy31.set(false); 996 globals->enable_spdy31.set(false);
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
1163 globals.initial_max_spdy_concurrent_streams.CopyToIfSet( 1159 globals.initial_max_spdy_concurrent_streams.CopyToIfSet(
1164 &params->spdy_initial_max_concurrent_streams); 1160 &params->spdy_initial_max_concurrent_streams);
1165 globals.enable_spdy_compression.CopyToIfSet( 1161 globals.enable_spdy_compression.CopyToIfSet(
1166 &params->enable_spdy_compression); 1162 &params->enable_spdy_compression);
1167 globals.enable_spdy_ping_based_connection_checking.CopyToIfSet( 1163 globals.enable_spdy_ping_based_connection_checking.CopyToIfSet(
1168 &params->enable_spdy_ping_based_connection_checking); 1164 &params->enable_spdy_ping_based_connection_checking);
1169 globals.spdy_default_protocol.CopyToIfSet( 1165 globals.spdy_default_protocol.CopyToIfSet(
1170 &params->spdy_default_protocol); 1166 &params->spdy_default_protocol);
1171 globals.enable_spdy31.CopyToIfSet(&params->enable_spdy31); 1167 globals.enable_spdy31.CopyToIfSet(&params->enable_spdy31);
1172 globals.enable_http2.CopyToIfSet(&params->enable_http2); 1168 globals.enable_http2.CopyToIfSet(&params->enable_http2);
1173 globals.trusted_spdy_proxy.CopyToIfSet(&params->trusted_spdy_proxy);
1174 params->forced_spdy_exclusions = globals.forced_spdy_exclusions; 1169 params->forced_spdy_exclusions = globals.forced_spdy_exclusions;
1175 globals.parse_alternative_services.CopyToIfSet( 1170 globals.parse_alternative_services.CopyToIfSet(
1176 &params->parse_alternative_services); 1171 &params->parse_alternative_services);
1177 globals.enable_alternative_service_with_different_host.CopyToIfSet( 1172 globals.enable_alternative_service_with_different_host.CopyToIfSet(
1178 &params->enable_alternative_service_with_different_host); 1173 &params->enable_alternative_service_with_different_host);
1179 globals.alternative_service_probability_threshold.CopyToIfSet( 1174 globals.alternative_service_probability_threshold.CopyToIfSet(
1180 &params->alternative_service_probability_threshold); 1175 &params->alternative_service_probability_threshold);
1181 1176
1182 globals.enable_npn.CopyToIfSet(&params->enable_npn); 1177 globals.enable_npn.CopyToIfSet(&params->enable_npn);
1183 1178
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
1841 std::move(job_factory); 1836 std::move(job_factory);
1842 1837
1843 context->set_job_factory( 1838 context->set_job_factory(
1844 globals->proxy_script_fetcher_url_request_job_factory.get()); 1839 globals->proxy_script_fetcher_url_request_job_factory.get());
1845 1840
1846 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the 1841 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the
1847 // system URLRequestContext too. There's no reason this should be tied to a 1842 // system URLRequestContext too. There's no reason this should be tied to a
1848 // profile. 1843 // profile.
1849 return context; 1844 return context;
1850 } 1845 }
OLDNEW
« no previous file with comments | « chrome/browser/io_thread.h ('k') | chrome/browser/ui/startup/bad_flags_prompt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698