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

Side by Side Diff: chrome/browser/io_thread.cc

Issue 1378613004: Set Token-Binding HTTP header (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tb-tls-ext-new
Patch Set: Remove sequence numbers from mock reads 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/io_thread.h ('k') | chrome/common/chrome_switches.h » ('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 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 SystemRequestContextLeakChecker::~SystemRequestContextLeakChecker() { 448 SystemRequestContextLeakChecker::~SystemRequestContextLeakChecker() {
449 if (globals_->system_request_context.get()) 449 if (globals_->system_request_context.get())
450 globals_->system_request_context->AssertNoURLRequests(); 450 globals_->system_request_context->AssertNoURLRequests();
451 } 451 }
452 452
453 IOThread::Globals::Globals() 453 IOThread::Globals::Globals()
454 : system_request_context_leak_checker(this), 454 : system_request_context_leak_checker(this),
455 ignore_certificate_errors(false), 455 ignore_certificate_errors(false),
456 testing_fixed_http_port(0), 456 testing_fixed_http_port(0),
457 testing_fixed_https_port(0), 457 testing_fixed_https_port(0),
458 enable_user_alternate_protocol_ports(false) { 458 enable_user_alternate_protocol_ports(false),
459 } 459 enable_token_binding(false) {}
460 460
461 IOThread::Globals::~Globals() {} 461 IOThread::Globals::~Globals() {}
462 462
463 // |local_state| is passed in explicitly in order to (1) reduce implicit 463 // |local_state| is passed in explicitly in order to (1) reduce implicit
464 // dependencies and (2) make IOThread more flexible for testing. 464 // dependencies and (2) make IOThread more flexible for testing.
465 IOThread::IOThread( 465 IOThread::IOThread(
466 PrefService* local_state, 466 PrefService* local_state,
467 policy::PolicyService* policy_service, 467 policy::PolicyService* policy_service,
468 net_log::ChromeNetLog* net_log, 468 net_log::ChromeNetLog* net_log,
469 extensions::EventRouterForwarder* extension_event_router_forwarder) 469 extensions::EventRouterForwarder* extension_event_router_forwarder)
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 tracked_objects::ScopedTracker tracking_profile12_5( 840 tracked_objects::ScopedTracker tracking_profile12_5(
841 FROM_HERE_WITH_EXPLICIT_FUNCTION( 841 FROM_HERE_WITH_EXPLICIT_FUNCTION(
842 "466432 IOThread::InitAsync::QuicConfiguration")); 842 "466432 IOThread::InitAsync::QuicConfiguration"));
843 ConfigureQuic(command_line); 843 ConfigureQuic(command_line);
844 if (command_line.HasSwitch( 844 if (command_line.HasSwitch(
845 switches::kEnableUserAlternateProtocolPorts)) { 845 switches::kEnableUserAlternateProtocolPorts)) {
846 globals_->enable_user_alternate_protocol_ports = true; 846 globals_->enable_user_alternate_protocol_ports = true;
847 } 847 }
848 globals_->enable_brotli.set( 848 globals_->enable_brotli.set(
849 base::FeatureList::IsEnabled(features::kBrotliEncoding)); 849 base::FeatureList::IsEnabled(features::kBrotliEncoding));
850 if (command_line.HasSwitch(switches::kEnableTokenBinding)) {
Ryan Sleevi 2016/01/26 22:53:47 As command-line switches are generally inaccessibl
nharper 2016/01/26 23:29:30 There is a plan to add it to about:flags - see htt
851 globals_->enable_token_binding = true;
852 }
850 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432 853 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432
851 // is fixed. 854 // is fixed.
852 tracked_objects::ScopedTracker tracking_profile13( 855 tracked_objects::ScopedTracker tracking_profile13(
853 FROM_HERE_WITH_EXPLICIT_FUNCTION( 856 FROM_HERE_WITH_EXPLICIT_FUNCTION(
854 "466432 IOThread::InitAsync::InitializeNetworkOptions")); 857 "466432 IOThread::InitAsync::InitializeNetworkOptions"));
855 InitializeNetworkOptions(command_line); 858 InitializeNetworkOptions(command_line);
856 859
857 TRACE_EVENT_BEGIN0("startup", 860 TRACE_EVENT_BEGIN0("startup",
858 "IOThread::Init:ProxyScriptFetcherRequestContext"); 861 "IOThread::Init:ProxyScriptFetcherRequestContext");
859 globals_->proxy_script_fetcher_context.reset( 862 globals_->proxy_script_fetcher_context.reset(
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
1181 globals.quic_disable_preconnect_if_0rtt.CopyToIfSet( 1184 globals.quic_disable_preconnect_if_0rtt.CopyToIfSet(
1182 &params->quic_disable_preconnect_if_0rtt); 1185 &params->quic_disable_preconnect_if_0rtt);
1183 if (!globals.quic_host_whitelist.empty()) 1186 if (!globals.quic_host_whitelist.empty())
1184 params->quic_host_whitelist = globals.quic_host_whitelist; 1187 params->quic_host_whitelist = globals.quic_host_whitelist;
1185 globals.quic_migrate_sessions_on_network_change.CopyToIfSet( 1188 globals.quic_migrate_sessions_on_network_change.CopyToIfSet(
1186 &params->quic_migrate_sessions_on_network_change); 1189 &params->quic_migrate_sessions_on_network_change);
1187 globals.origin_to_force_quic_on.CopyToIfSet( 1190 globals.origin_to_force_quic_on.CopyToIfSet(
1188 &params->origin_to_force_quic_on); 1191 &params->origin_to_force_quic_on);
1189 params->enable_user_alternate_protocol_ports = 1192 params->enable_user_alternate_protocol_ports =
1190 globals.enable_user_alternate_protocol_ports; 1193 globals.enable_user_alternate_protocol_ports;
1194 params->enable_token_binding = globals.enable_token_binding;
1191 } 1195 }
1192 1196
1193 base::TimeTicks IOThread::creation_time() const { 1197 base::TimeTicks IOThread::creation_time() const {
1194 return creation_time_; 1198 return creation_time_;
1195 } 1199 }
1196 1200
1197 net::SSLConfigService* IOThread::GetSSLConfigService() { 1201 net::SSLConfigService* IOThread::GetSSLConfigService() {
1198 return ssl_config_service_manager_->Get(); 1202 return ssl_config_service_manager_->Get();
1199 } 1203 }
1200 1204
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
1793 std::move(job_factory); 1797 std::move(job_factory);
1794 1798
1795 context->set_job_factory( 1799 context->set_job_factory(
1796 globals->proxy_script_fetcher_url_request_job_factory.get()); 1800 globals->proxy_script_fetcher_url_request_job_factory.get());
1797 1801
1798 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the 1802 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the
1799 // system URLRequestContext too. There's no reason this should be tied to a 1803 // system URLRequestContext too. There's no reason this should be tied to a
1800 // profile. 1804 // profile.
1801 return context; 1805 return context;
1802 } 1806 }
OLDNEW
« no previous file with comments | « chrome/browser/io_thread.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698