OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/leak_tracker.h" | 10 #include "base/debug/leak_tracker.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "chrome/browser/net/chrome_url_request_context.h" | 21 #include "chrome/browser/net/chrome_url_request_context.h" |
22 #include "chrome/browser/net/connect_interceptor.h" | 22 #include "chrome/browser/net/connect_interceptor.h" |
23 #include "chrome/browser/net/passive_log_collector.h" | 23 #include "chrome/browser/net/passive_log_collector.h" |
24 #include "chrome/browser/net/predictor_api.h" | 24 #include "chrome/browser/net/predictor_api.h" |
25 #include "chrome/browser/prefs/pref_service.h" | 25 #include "chrome/browser/prefs/pref_service.h" |
26 #include "chrome/browser/prerender/prerender_interceptor.h" | 26 #include "chrome/browser/prerender/prerender_interceptor.h" |
27 #include "chrome/common/chrome_switches.h" | 27 #include "chrome/common/chrome_switches.h" |
28 #include "chrome/common/net/raw_host_resolver_proc.h" | 28 #include "chrome/common/net/raw_host_resolver_proc.h" |
29 #include "chrome/common/net/url_fetcher.h" | 29 #include "chrome/common/net/url_fetcher.h" |
30 #include "chrome/common/pref_names.h" | 30 #include "chrome/common/pref_names.h" |
| 31 #include "net/base/cert_verifier.h" |
31 #include "net/base/dnsrr_resolver.h" | 32 #include "net/base/dnsrr_resolver.h" |
32 #include "net/base/host_cache.h" | 33 #include "net/base/host_cache.h" |
33 #include "net/base/host_resolver.h" | 34 #include "net/base/host_resolver.h" |
34 #include "net/base/host_resolver_impl.h" | 35 #include "net/base/host_resolver_impl.h" |
35 #include "net/base/mapped_host_resolver.h" | 36 #include "net/base/mapped_host_resolver.h" |
36 #include "net/base/net_util.h" | 37 #include "net/base/net_util.h" |
37 #include "net/http/http_auth_filter.h" | 38 #include "net/http/http_auth_filter.h" |
38 #include "net/http/http_auth_handler_factory.h" | 39 #include "net/http/http_auth_handler_factory.h" |
39 #if defined(USE_NSS) | 40 #if defined(USE_NSS) |
40 #include "net/ocsp/nss_ocsp.h" | 41 #include "net/ocsp/nss_ocsp.h" |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 globals_ = new Globals; | 326 globals_ = new Globals; |
326 | 327 |
327 // Add an observer that will emit network change events to the ChromeNetLog. | 328 // Add an observer that will emit network change events to the ChromeNetLog. |
328 // Assuming NetworkChangeNotifier dispatches in FIFO order, we should be | 329 // Assuming NetworkChangeNotifier dispatches in FIFO order, we should be |
329 // logging the network change before other IO thread consumers respond to it. | 330 // logging the network change before other IO thread consumers respond to it. |
330 network_change_observer_.reset( | 331 network_change_observer_.reset( |
331 new LoggingNetworkChangeObserver(net_log_)); | 332 new LoggingNetworkChangeObserver(net_log_)); |
332 | 333 |
333 globals_->host_resolver.reset( | 334 globals_->host_resolver.reset( |
334 CreateGlobalHostResolver(net_log_)); | 335 CreateGlobalHostResolver(net_log_)); |
| 336 globals_->cert_verifier.reset(new net::CertVerifier); |
335 globals_->dnsrr_resolver.reset(new net::DnsRRResolver); | 337 globals_->dnsrr_resolver.reset(new net::DnsRRResolver); |
336 globals_->http_auth_handler_factory.reset(CreateDefaultAuthHandlerFactory( | 338 globals_->http_auth_handler_factory.reset(CreateDefaultAuthHandlerFactory( |
337 globals_->host_resolver.get())); | 339 globals_->host_resolver.get())); |
338 | 340 |
339 if (CommandLine::ForCurrentProcess()->HasSwitch( | 341 if (CommandLine::ForCurrentProcess()->HasSwitch( |
340 switches::kEnablePagePrerender)) { | 342 switches::kEnablePagePrerender)) { |
341 prerender_interceptor_.reset(new PrerenderInterceptor()); | 343 prerender_interceptor_.reset(new PrerenderInterceptor()); |
342 } | 344 } |
343 } | 345 } |
344 | 346 |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 net::HostCache* host_cache = | 517 net::HostCache* host_cache = |
516 globals_->host_resolver.get()->GetAsHostResolverImpl()->cache(); | 518 globals_->host_resolver.get()->GetAsHostResolverImpl()->cache(); |
517 if (host_cache) | 519 if (host_cache) |
518 host_cache->clear(); | 520 host_cache->clear(); |
519 } | 521 } |
520 // Clear all of the passively logged data. | 522 // Clear all of the passively logged data. |
521 // TODO(eroman): this is a bit heavy handed, really all we need to do is | 523 // TODO(eroman): this is a bit heavy handed, really all we need to do is |
522 // clear the data pertaining to off the record context. | 524 // clear the data pertaining to off the record context. |
523 net_log_->ClearAllPassivelyCapturedEvents(); | 525 net_log_->ClearAllPassivelyCapturedEvents(); |
524 } | 526 } |
OLD | NEW |