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

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: fix build issues 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
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)) {
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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
1179 globals.quic_disable_preconnect_if_0rtt.CopyToIfSet( 1182 globals.quic_disable_preconnect_if_0rtt.CopyToIfSet(
1180 &params->quic_disable_preconnect_if_0rtt); 1183 &params->quic_disable_preconnect_if_0rtt);
1181 if (!globals.quic_host_whitelist.empty()) 1184 if (!globals.quic_host_whitelist.empty())
1182 params->quic_host_whitelist = globals.quic_host_whitelist; 1185 params->quic_host_whitelist = globals.quic_host_whitelist;
1183 globals.quic_migrate_sessions_on_network_change.CopyToIfSet( 1186 globals.quic_migrate_sessions_on_network_change.CopyToIfSet(
1184 &params->quic_migrate_sessions_on_network_change); 1187 &params->quic_migrate_sessions_on_network_change);
1185 globals.origin_to_force_quic_on.CopyToIfSet( 1188 globals.origin_to_force_quic_on.CopyToIfSet(
1186 &params->origin_to_force_quic_on); 1189 &params->origin_to_force_quic_on);
1187 params->enable_user_alternate_protocol_ports = 1190 params->enable_user_alternate_protocol_ports =
1188 globals.enable_user_alternate_protocol_ports; 1191 globals.enable_user_alternate_protocol_ports;
1192 params->enable_token_binding = globals.enable_token_binding;
1189 } 1193 }
1190 1194
1191 base::TimeTicks IOThread::creation_time() const { 1195 base::TimeTicks IOThread::creation_time() const {
1192 return creation_time_; 1196 return creation_time_;
1193 } 1197 }
1194 1198
1195 net::SSLConfigService* IOThread::GetSSLConfigService() { 1199 net::SSLConfigService* IOThread::GetSSLConfigService() {
1196 return ssl_config_service_manager_->Get(); 1200 return ssl_config_service_manager_->Get();
1197 } 1201 }
1198 1202
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
1781 std::move(job_factory); 1785 std::move(job_factory);
1782 1786
1783 context->set_job_factory( 1787 context->set_job_factory(
1784 globals->proxy_script_fetcher_url_request_job_factory.get()); 1788 globals->proxy_script_fetcher_url_request_job_factory.get());
1785 1789
1786 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the 1790 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the
1787 // system URLRequestContext too. There's no reason this should be tied to a 1791 // system URLRequestContext too. There's no reason this should be tied to a
1788 // profile. 1792 // profile.
1789 return context; 1793 return context;
1790 } 1794 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698