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

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

Issue 1100003006: Certificate Transparency: Fetching of Signed Tree Heads (DRAFT) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merging with master Created 5 years, 7 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 <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 22 matching lines...) Expand all
33 #include "chrome/browser/net/chrome_net_log.h" 33 #include "chrome/browser/net/chrome_net_log.h"
34 #include "chrome/browser/net/chrome_network_delegate.h" 34 #include "chrome/browser/net/chrome_network_delegate.h"
35 #include "chrome/browser/net/connect_interceptor.h" 35 #include "chrome/browser/net/connect_interceptor.h"
36 #include "chrome/browser/net/dns_probe_service.h" 36 #include "chrome/browser/net/dns_probe_service.h"
37 #include "chrome/browser/net/pref_proxy_config_tracker.h" 37 #include "chrome/browser/net/pref_proxy_config_tracker.h"
38 #include "chrome/browser/net/proxy_service_factory.h" 38 #include "chrome/browser/net/proxy_service_factory.h"
39 #include "chrome/common/chrome_content_client.h" 39 #include "chrome/common/chrome_content_client.h"
40 #include "chrome/common/chrome_switches.h" 40 #include "chrome/common/chrome_switches.h"
41 #include "chrome/common/chrome_version_info.h" 41 #include "chrome/common/chrome_version_info.h"
42 #include "chrome/common/pref_names.h" 42 #include "chrome/common/pref_names.h"
43 #include "components/certificate_transparency/log_proofs_fetcher.h"
44 #include "components/certificate_transparency/new_scts_observer.h"
43 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_pref s.h" 45 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_pref s.h"
44 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param s.h" 46 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param s.h"
45 #include "components/policy/core/common/policy_service.h" 47 #include "components/policy/core/common/policy_service.h"
46 #include "components/variations/variations_associated_data.h" 48 #include "components/variations/variations_associated_data.h"
47 #include "content/public/browser/browser_thread.h" 49 #include "content/public/browser/browser_thread.h"
48 #include "content/public/browser/cookie_store_factory.h" 50 #include "content/public/browser/cookie_store_factory.h"
49 #include "net/base/host_mapping_rules.h" 51 #include "net/base/host_mapping_rules.h"
50 #include "net/base/net_util.h" 52 #include "net/base/net_util.h"
51 #include "net/base/sdch_manager.h" 53 #include "net/base/sdch_manager.h"
52 #include "net/cert/cert_policy_enforcer.h" 54 #include "net/cert/cert_policy_enforcer.h"
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 globals_->proxy_script_fetcher_url_request_job_factory = job_factory.Pass(); 893 globals_->proxy_script_fetcher_url_request_job_factory = job_factory.Pass();
892 894
893 globals_->throttler_manager.reset(new net::URLRequestThrottlerManager()); 895 globals_->throttler_manager.reset(new net::URLRequestThrottlerManager());
894 globals_->throttler_manager->set_net_log(net_log_); 896 globals_->throttler_manager->set_net_log(net_log_);
895 // Always done in production, disabled only for unit tests. 897 // Always done in production, disabled only for unit tests.
896 globals_->throttler_manager->set_enable_thread_checks(true); 898 globals_->throttler_manager->set_enable_thread_checks(true);
897 899
898 globals_->proxy_script_fetcher_context.reset( 900 globals_->proxy_script_fetcher_context.reset(
899 ConstructProxyScriptFetcherContext(globals_, net_log_)); 901 ConstructProxyScriptFetcherContext(globals_, net_log_));
900 902
903 certificate_transparency::NewSCTsObserver* scts_observer =
904 new certificate_transparency::NewSCTsObserver(
905 new certificate_transparency::LogProofsFetcher(
906 globals_->system_request_context.get()));
907 ct_verifier->AddObserver(scts_observer);
908
901 #if defined(OS_MACOSX) && !defined(OS_IOS) 909 #if defined(OS_MACOSX) && !defined(OS_IOS)
902 // Start observing Keychain events. This needs to be done on the UI thread, 910 // Start observing Keychain events. This needs to be done on the UI thread,
903 // as Keychain services requires a CFRunLoop. 911 // as Keychain services requires a CFRunLoop.
904 BrowserThread::PostTask(BrowserThread::UI, 912 BrowserThread::PostTask(BrowserThread::UI,
905 FROM_HERE, 913 FROM_HERE,
906 base::Bind(&ObserveKeychainEvents)); 914 base::Bind(&ObserveKeychainEvents));
907 #endif 915 #endif
908 916
909 // InitSystemRequestContext turns right around and posts a task back 917 // InitSystemRequestContext turns right around and posts a task back
910 // to the IO thread, so we can't let it run until we know the IO 918 // to the IO thread, so we can't let it run until we know the IO
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
1641 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); 1649 net::QuicVersionVector supported_versions = net::QuicSupportedVersions();
1642 for (size_t i = 0; i < supported_versions.size(); ++i) { 1650 for (size_t i = 0; i < supported_versions.size(); ++i) {
1643 net::QuicVersion version = supported_versions[i]; 1651 net::QuicVersion version = supported_versions[i];
1644 if (net::QuicVersionToString(version) == quic_version) { 1652 if (net::QuicVersionToString(version) == quic_version) {
1645 return version; 1653 return version;
1646 } 1654 }
1647 } 1655 }
1648 1656
1649 return net::QUIC_VERSION_UNSUPPORTED; 1657 return net::QUIC_VERSION_UNSUPPORTED;
1650 } 1658 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698