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

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

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