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

Side by Side Diff: content/shell/shell_url_request_context_getter.cc

Issue 10836248: Turned job_factory into a pure virtual class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Latest merge Created 8 years, 3 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 | « chrome/chrome_browser.gypi ('k') | net/net.gyp » ('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) 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 "content/shell/shell_url_request_context_getter.h" 5 #include "content/shell/shell_url_request_context_getter.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/string_split.h" 8 #include "base/string_split.h"
9 #include "base/threading/worker_pool.h" 9 #include "base/threading/worker_pool.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
11 #include "content/shell/shell_network_delegate.h" 11 #include "content/shell/shell_network_delegate.h"
12 #include "net/base/cert_verifier.h" 12 #include "net/base/cert_verifier.h"
13 #include "net/base/default_server_bound_cert_store.h" 13 #include "net/base/default_server_bound_cert_store.h"
14 #include "net/base/host_resolver.h" 14 #include "net/base/host_resolver.h"
15 #include "net/base/server_bound_cert_service.h" 15 #include "net/base/server_bound_cert_service.h"
16 #include "net/base/ssl_config_service_defaults.h" 16 #include "net/base/ssl_config_service_defaults.h"
17 #include "net/cookies/cookie_monster.h" 17 #include "net/cookies/cookie_monster.h"
18 #include "net/http/http_auth_handler_factory.h" 18 #include "net/http/http_auth_handler_factory.h"
19 #include "net/http/http_cache.h" 19 #include "net/http/http_cache.h"
20 #include "net/http/http_server_properties_impl.h" 20 #include "net/http/http_server_properties_impl.h"
21 #include "net/proxy/proxy_service.h" 21 #include "net/proxy/proxy_service.h"
22 #include "net/url_request/url_request_context.h" 22 #include "net/url_request/url_request_context.h"
23 #include "net/url_request/url_request_context_storage.h" 23 #include "net/url_request/url_request_context_storage.h"
24 #include "net/url_request/url_request_job_factory.h" 24 #include "net/url_request/url_request_job_factory_impl.h"
25 25
26 namespace content { 26 namespace content {
27 27
28 ShellURLRequestContextGetter::ShellURLRequestContextGetter( 28 ShellURLRequestContextGetter::ShellURLRequestContextGetter(
29 const FilePath& base_path, 29 const FilePath& base_path,
30 MessageLoop* io_loop, 30 MessageLoop* io_loop,
31 MessageLoop* file_loop) 31 MessageLoop* file_loop)
32 : base_path_(base_path), 32 : base_path_(base_path),
33 io_loop_(io_loop), 33 io_loop_(io_loop),
34 file_loop_(file_loop) { 34 file_loop_(file_loop) {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 "", /* ssl_session_cache_shard */ 97 "", /* ssl_session_cache_shard */
98 url_request_context_->ssl_config_service(), 98 url_request_context_->ssl_config_service(),
99 url_request_context_->http_auth_handler_factory(), 99 url_request_context_->http_auth_handler_factory(),
100 url_request_context_->network_delegate(), 100 url_request_context_->network_delegate(),
101 url_request_context_->http_server_properties(), 101 url_request_context_->http_server_properties(),
102 NULL, 102 NULL,
103 main_backend, 103 main_backend,
104 "" /* trusted_spdy_proxy */ ); 104 "" /* trusted_spdy_proxy */ );
105 storage_->set_http_transaction_factory(main_cache); 105 storage_->set_http_transaction_factory(main_cache);
106 106
107 storage_->set_job_factory(new net::URLRequestJobFactory); 107 storage_->set_job_factory(new net::URLRequestJobFactoryImpl);
108 } 108 }
109 109
110 return url_request_context_.get(); 110 return url_request_context_.get();
111 } 111 }
112 112
113 scoped_refptr<base::SingleThreadTaskRunner> 113 scoped_refptr<base::SingleThreadTaskRunner>
114 ShellURLRequestContextGetter::GetNetworkTaskRunner() const { 114 ShellURLRequestContextGetter::GetNetworkTaskRunner() const {
115 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); 115 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO);
116 } 116 }
117 117
118 net::HostResolver* ShellURLRequestContextGetter::host_resolver() { 118 net::HostResolver* ShellURLRequestContextGetter::host_resolver() {
119 return url_request_context_->host_resolver(); 119 return url_request_context_->host_resolver();
120 } 120 }
121 121
122 } // namespace content 122 } // namespace content
OLDNEW
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698