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

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

Issue 8234013: Add a content::GetUserAgent() to wrap webkit_glue::GetUserAgent() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clarify requirements around GetUserAgent Created 9 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/net/chrome_url_request_context.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 15 matching lines...) Expand all
26 #include "chrome/browser/net/passive_log_collector.h" 26 #include "chrome/browser/net/passive_log_collector.h"
27 #include "chrome/browser/net/pref_proxy_config_service.h" 27 #include "chrome/browser/net/pref_proxy_config_service.h"
28 #include "chrome/browser/net/proxy_service_factory.h" 28 #include "chrome/browser/net/proxy_service_factory.h"
29 #include "chrome/browser/net/sdch_dictionary_fetcher.h" 29 #include "chrome/browser/net/sdch_dictionary_fetcher.h"
30 #include "chrome/browser/prefs/pref_service.h" 30 #include "chrome/browser/prefs/pref_service.h"
31 #include "chrome/common/chrome_switches.h" 31 #include "chrome/common/chrome_switches.h"
32 #include "chrome/common/pref_names.h" 32 #include "chrome/common/pref_names.h"
33 #include "content/browser/browser_thread.h" 33 #include "content/browser/browser_thread.h"
34 #include "content/browser/gpu/gpu_process_host.h" 34 #include "content/browser/gpu/gpu_process_host.h"
35 #include "content/browser/in_process_webkit/indexed_db_key_utility_client.h" 35 #include "content/browser/in_process_webkit/indexed_db_key_utility_client.h"
36 #include "content/common/content_client.h"
36 #include "content/common/net/url_fetcher.h" 37 #include "content/common/net/url_fetcher.h"
37 #include "net/base/cert_verifier.h" 38 #include "net/base/cert_verifier.h"
38 #include "net/base/cookie_monster.h" 39 #include "net/base/cookie_monster.h"
39 #include "net/base/default_origin_bound_cert_store.h" 40 #include "net/base/default_origin_bound_cert_store.h"
40 #include "net/base/dnsrr_resolver.h" 41 #include "net/base/dnsrr_resolver.h"
41 #include "net/base/host_cache.h" 42 #include "net/base/host_cache.h"
42 #include "net/base/host_resolver.h" 43 #include "net/base/host_resolver.h"
43 #include "net/base/host_resolver_impl.h" 44 #include "net/base/host_resolver_impl.h"
44 #include "net/base/mapped_host_resolver.h" 45 #include "net/base/mapped_host_resolver.h"
45 #include "net/base/net_util.h" 46 #include "net/base/net_util.h"
46 #include "net/base/origin_bound_cert_service.h" 47 #include "net/base/origin_bound_cert_service.h"
47 #include "net/base/sdch_manager.h" 48 #include "net/base/sdch_manager.h"
48 #include "net/dns/async_host_resolver.h" 49 #include "net/dns/async_host_resolver.h"
49 #include "net/ftp/ftp_network_layer.h" 50 #include "net/ftp/ftp_network_layer.h"
50 #include "net/http/http_auth_filter.h" 51 #include "net/http/http_auth_filter.h"
51 #include "net/http/http_auth_handler_factory.h" 52 #include "net/http/http_auth_handler_factory.h"
52 #include "net/http/http_network_layer.h" 53 #include "net/http/http_network_layer.h"
53 #include "net/http/http_network_session.h" 54 #include "net/http/http_network_session.h"
54 #include "net/http/http_server_properties_impl.h" 55 #include "net/http/http_server_properties_impl.h"
55 #include "net/proxy/proxy_config_service.h" 56 #include "net/proxy/proxy_config_service.h"
56 #include "net/proxy/proxy_script_fetcher_impl.h" 57 #include "net/proxy/proxy_script_fetcher_impl.h"
57 #include "net/proxy/proxy_service.h" 58 #include "net/proxy/proxy_service.h"
58 #include "net/socket/dns_cert_provenance_checker.h" 59 #include "net/socket/dns_cert_provenance_checker.h"
59 #include "webkit/glue/webkit_glue.h"
60 60
61 #if defined(USE_NSS) 61 #if defined(USE_NSS)
62 #include "net/ocsp/nss_ocsp.h" 62 #include "net/ocsp/nss_ocsp.h"
63 #endif // defined(USE_NSS) 63 #endif // defined(USE_NSS)
64 64
65 namespace { 65 namespace {
66 66
67 // Custom URLRequestContext used by requests which aren't associated with a 67 // Custom URLRequestContext used by requests which aren't associated with a
68 // particular profile. We need to use a subclass of URLRequestContext in order 68 // particular profile. We need to use a subclass of URLRequestContext in order
69 // to provide the correct User-Agent. 69 // to provide the correct User-Agent.
70 class URLRequestContextWithUserAgent : public net::URLRequestContext { 70 class URLRequestContextWithUserAgent : public net::URLRequestContext {
71 public: 71 public:
72 virtual const std::string& GetUserAgent( 72 virtual const std::string& GetUserAgent(
73 const GURL& url) const OVERRIDE { 73 const GURL& url) const OVERRIDE {
74 return webkit_glue::GetUserAgent(url); 74 return content::GetUserAgent(url);
75 } 75 }
76 }; 76 };
77 77
78 // Used for the "system" URLRequestContext. If this grows more complicated, then 78 // Used for the "system" URLRequestContext. If this grows more complicated, then
79 // consider inheriting directly from URLRequestContext rather than using 79 // consider inheriting directly from URLRequestContext rather than using
80 // implementation inheritance. 80 // implementation inheritance.
81 class SystemURLRequestContext : public URLRequestContextWithUserAgent { 81 class SystemURLRequestContext : public URLRequestContextWithUserAgent {
82 public: 82 public:
83 SystemURLRequestContext() { 83 SystemURLRequestContext() {
84 #if defined(USE_NSS) 84 #if defined(USE_NSS)
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 system_params.network_delegate = globals_->system_network_delegate.get(); 625 system_params.network_delegate = globals_->system_network_delegate.get();
626 system_params.net_log = net_log_; 626 system_params.net_log = net_log_;
627 globals_->system_http_transaction_factory.reset( 627 globals_->system_http_transaction_factory.reset(
628 new net::HttpNetworkLayer( 628 new net::HttpNetworkLayer(
629 new net::HttpNetworkSession(system_params))); 629 new net::HttpNetworkSession(system_params)));
630 globals_->system_ftp_transaction_factory.reset( 630 globals_->system_ftp_transaction_factory.reset(
631 new net::FtpNetworkLayer(globals_->host_resolver.get())); 631 new net::FtpNetworkLayer(globals_->host_resolver.get()));
632 globals_->system_request_context = 632 globals_->system_request_context =
633 ConstructSystemRequestContext(globals_, net_log_); 633 ConstructSystemRequestContext(globals_, net_log_);
634 } 634 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/net/chrome_url_request_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698