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

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

Issue 1170623003: Revert "content: Remove use of MessageLoopProxy and deprecated MessageLoop APIs" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « content/shell/browser/shell.cc ('k') | content/shell/renderer/layout_test/blink_test_runner.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/browser/shell_url_request_context_getter.h" 5 #include "content/shell/browser/shell_url_request_context_getter.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/single_thread_task_runner.h"
10 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
11 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
12 #include "base/strings/string_util.h" 11 #include "base/strings/string_util.h"
13 #include "base/threading/sequenced_worker_pool.h" 12 #include "base/threading/sequenced_worker_pool.h"
14 #include "base/threading/worker_pool.h" 13 #include "base/threading/worker_pool.h"
15 #include "content/public/browser/browser_thread.h" 14 #include "content/public/browser/browser_thread.h"
16 #include "content/public/browser/cookie_store_factory.h" 15 #include "content/public/browser/cookie_store_factory.h"
17 #include "content/public/common/content_switches.h" 16 #include "content/public/common/content_switches.h"
18 #include "content/shell/browser/shell_network_delegate.h" 17 #include "content/shell/browser/shell_network_delegate.h"
19 #include "content/shell/common/shell_content_client.h" 18 #include "content/shell/common/shell_content_client.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 86
88 ShellURLRequestContextGetter::~ShellURLRequestContextGetter() { 87 ShellURLRequestContextGetter::~ShellURLRequestContextGetter() {
89 } 88 }
90 89
91 net::NetworkDelegate* ShellURLRequestContextGetter::CreateNetworkDelegate() { 90 net::NetworkDelegate* ShellURLRequestContextGetter::CreateNetworkDelegate() {
92 return new ShellNetworkDelegate; 91 return new ShellNetworkDelegate;
93 } 92 }
94 93
95 net::ProxyConfigService* ShellURLRequestContextGetter::GetProxyConfigService() { 94 net::ProxyConfigService* ShellURLRequestContextGetter::GetProxyConfigService() {
96 return net::ProxyService::CreateSystemProxyConfigService( 95 return net::ProxyService::CreateSystemProxyConfigService(
97 io_loop_->task_runner(), file_loop_->task_runner()); 96 io_loop_->message_loop_proxy(), file_loop_->message_loop_proxy());
98 } 97 }
99 98
100 net::ProxyService* ShellURLRequestContextGetter::GetProxyService() { 99 net::ProxyService* ShellURLRequestContextGetter::GetProxyService() {
101 // TODO(jam): use v8 if possible, look at chrome code. 100 // TODO(jam): use v8 if possible, look at chrome code.
102 return net::ProxyService::CreateUsingSystemProxyResolver( 101 return net::ProxyService::CreateUsingSystemProxyResolver(
103 proxy_config_service_.release(), 0, url_request_context_->net_log()); 102 proxy_config_service_.release(), 0, url_request_context_->net_log());
104 } 103 }
105 104
106 net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() { 105 net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() {
107 DCHECK_CURRENTLY_ON(BrowserThread::IO); 106 DCHECK_CURRENTLY_ON(BrowserThread::IO);
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 scoped_refptr<base::SingleThreadTaskRunner> 240 scoped_refptr<base::SingleThreadTaskRunner>
242 ShellURLRequestContextGetter::GetNetworkTaskRunner() const { 241 ShellURLRequestContextGetter::GetNetworkTaskRunner() const {
243 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); 242 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO);
244 } 243 }
245 244
246 net::HostResolver* ShellURLRequestContextGetter::host_resolver() { 245 net::HostResolver* ShellURLRequestContextGetter::host_resolver() {
247 return url_request_context_->host_resolver(); 246 return url_request_context_->host_resolver();
248 } 247 }
249 248
250 } // namespace content 249 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/browser/shell.cc ('k') | content/shell/renderer/layout_test/blink_test_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698