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

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

Issue 137553004: NSS Cros multiprofile: trust roots added by a profile shouldn't apply to other profiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ios fix Created 6 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 | Annotate | Revision Log
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 <vector> 7 #include <vector>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "chrome/common/pref_names.h" 45 #include "chrome/common/pref_names.h"
46 #include "chrome/common/url_constants.h" 46 #include "chrome/common/url_constants.h"
47 #include "components/policy/core/common/policy_service.h" 47 #include "components/policy/core/common/policy_service.h"
48 #include "content/public/browser/browser_thread.h" 48 #include "content/public/browser/browser_thread.h"
49 #include "content/public/browser/cookie_store_factory.h" 49 #include "content/public/browser/cookie_store_factory.h"
50 #include "net/base/host_mapping_rules.h" 50 #include "net/base/host_mapping_rules.h"
51 #include "net/base/net_util.h" 51 #include "net/base/net_util.h"
52 #include "net/base/network_time_notifier.h" 52 #include "net/base/network_time_notifier.h"
53 #include "net/base/sdch_manager.h" 53 #include "net/base/sdch_manager.h"
54 #include "net/cert/cert_verifier.h" 54 #include "net/cert/cert_verifier.h"
55 #include "net/cert/cert_verify_proc.h"
55 #include "net/cert/ct_known_logs.h" 56 #include "net/cert/ct_known_logs.h"
56 #include "net/cert/ct_verifier.h" 57 #include "net/cert/ct_verifier.h"
58 #include "net/cert/multi_threaded_cert_verifier.h"
57 #include "net/cookies/cookie_store.h" 59 #include "net/cookies/cookie_store.h"
58 #include "net/dns/host_cache.h" 60 #include "net/dns/host_cache.h"
59 #include "net/dns/host_resolver.h" 61 #include "net/dns/host_resolver.h"
60 #include "net/dns/mapped_host_resolver.h" 62 #include "net/dns/mapped_host_resolver.h"
61 #include "net/ftp/ftp_network_layer.h" 63 #include "net/ftp/ftp_network_layer.h"
62 #include "net/http/http_auth_filter.h" 64 #include "net/http/http_auth_filter.h"
63 #include "net/http/http_auth_handler_factory.h" 65 #include "net/http/http_auth_handler_factory.h"
64 #include "net/http/http_network_layer.h" 66 #include "net/http/http_network_layer.h"
65 #include "net/http/http_server_properties_impl.h" 67 #include "net/http/http_server_properties_impl.h"
66 #include "net/proxy/proxy_config_service.h" 68 #include "net/proxy/proxy_config_service.h"
(...skipping 30 matching lines...) Expand all
97 #endif 99 #endif
98 100
99 #if !defined(OS_IOS) && !defined(OS_ANDROID) 101 #if !defined(OS_IOS) && !defined(OS_ANDROID)
100 #include "net/proxy/proxy_resolver_v8.h" 102 #include "net/proxy/proxy_resolver_v8.h"
101 #endif 103 #endif
102 104
103 #if defined(OS_ANDROID) || defined(OS_IOS) 105 #if defined(OS_ANDROID) || defined(OS_IOS)
104 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_settings.h" 106 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_settings.h"
105 #endif 107 #endif
106 108
109 #if defined(OS_CHROMEOS)
110 #include "chrome/browser/chromeos/net/cert_verify_proc_chromeos.h"
111 #endif
112
107 using content::BrowserThread; 113 using content::BrowserThread;
108 114
109 class SafeBrowsingURLRequestContext; 115 class SafeBrowsingURLRequestContext;
110 116
111 // The IOThread object must outlive any tasks posted to the IO thread before the 117 // The IOThread object must outlive any tasks posted to the IO thread before the
112 // Quit task, so base::Bind() calls are not refcounted. 118 // Quit task, so base::Bind() calls are not refcounted.
113 119
114 namespace { 120 namespace {
115 121
116 const char kQuicFieldTrialName[] = "QUIC"; 122 const char kQuicFieldTrialName[] = "QUIC";
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 ChromeNetworkDelegate* network_delegate = 544 ChromeNetworkDelegate* network_delegate =
539 new ChromeNetworkDelegate(extension_event_router_forwarder_, 545 new ChromeNetworkDelegate(extension_event_router_forwarder_,
540 &system_enable_referrers_); 546 &system_enable_referrers_);
541 if (command_line.HasSwitch(switches::kEnableClientHints)) 547 if (command_line.HasSwitch(switches::kEnableClientHints))
542 network_delegate->SetEnableClientHints(); 548 network_delegate->SetEnableClientHints();
543 if (command_line.HasSwitch(switches::kDisableExtensionsHttpThrottling)) 549 if (command_line.HasSwitch(switches::kDisableExtensionsHttpThrottling))
544 network_delegate->NeverThrottleRequests(); 550 network_delegate->NeverThrottleRequests();
545 globals_->system_network_delegate.reset(network_delegate); 551 globals_->system_network_delegate.reset(network_delegate);
546 globals_->host_resolver = CreateGlobalHostResolver(net_log_); 552 globals_->host_resolver = CreateGlobalHostResolver(net_log_);
547 UpdateDnsClientEnabled(); 553 UpdateDnsClientEnabled();
548 globals_->cert_verifier.reset(net::CertVerifier::CreateDefault()); 554 #if defined(OS_CHROMEOS)
555 // Creates a CertVerifyProc that doesn't allow any profile-provided certs.
556 globals_->cert_verifier.reset(new net::MultiThreadedCertVerifier(
557 new chromeos::CertVerifyProcChromeOS()));
558 #else
559 globals_->cert_verifier.reset(
560 new net::MultiThreadedCertVerifier(net::CertVerifyProc::CreateDefault()));
561 #endif
549 globals_->transport_security_state.reset(new net::TransportSecurityState()); 562 globals_->transport_security_state.reset(new net::TransportSecurityState());
550 #if !defined(USE_OPENSSL) 563 #if !defined(USE_OPENSSL)
551 // For now, Certificate Transparency is only implemented for platforms 564 // For now, Certificate Transparency is only implemented for platforms
552 // that use NSS. 565 // that use NSS.
553 net::MultiLogCTVerifier* ct_verifier = new net::MultiLogCTVerifier(); 566 net::MultiLogCTVerifier* ct_verifier = new net::MultiLogCTVerifier();
554 globals_->cert_transparency_verifier.reset(ct_verifier); 567 globals_->cert_transparency_verifier.reset(ct_verifier);
555 568
556 // Add built-in logs 569 // Add built-in logs
557 ct_verifier->AddLog(net::ct::CreateGooglePilotLogVerifier().Pass()); 570 ct_verifier->AddLog(net::ct::CreateGooglePilotLogVerifier().Pass());
558 ct_verifier->AddLog(net::ct::CreateGoogleAviatorLogVerifier().Pass()); 571 ct_verifier->AddLog(net::ct::CreateGoogleAviatorLogVerifier().Pass());
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
1191 std::string version_flag = 1204 std::string version_flag =
1192 command_line.GetSwitchValueASCII(switches::kQuicVersion); 1205 command_line.GetSwitchValueASCII(switches::kQuicVersion);
1193 for (size_t i = 0; i < supported_versions.size(); ++i) { 1206 for (size_t i = 0; i < supported_versions.size(); ++i) {
1194 net::QuicVersion version = supported_versions[i]; 1207 net::QuicVersion version = supported_versions[i];
1195 if (net::QuicVersionToString(version) == version_flag) { 1208 if (net::QuicVersionToString(version) == version_flag) {
1196 return version; 1209 return version;
1197 } 1210 }
1198 } 1211 }
1199 return net::QUIC_VERSION_UNSUPPORTED; 1212 return net::QUIC_VERSION_UNSUPPORTED;
1200 } 1213 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/policy/policy_cert_verifier_browsertest.cc ('k') | chrome/browser/profiles/profile_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698