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

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

Issue 1301333002: make ProxyService::CreateSystemProxyConfigService return scoped_ptrs NOT FOR REVIEW (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: try merging again... Created 5 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
« no previous file with comments | « content/browser/resolve_proxy_msg_helper_unittest.cc ('k') | ios/crnet/crnet_environment.mm » ('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/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 ShellURLRequestContextGetter::~ShellURLRequestContextGetter() { 89 ShellURLRequestContextGetter::~ShellURLRequestContextGetter() {
90 } 90 }
91 91
92 scoped_ptr<net::NetworkDelegate> 92 scoped_ptr<net::NetworkDelegate>
93 ShellURLRequestContextGetter::CreateNetworkDelegate() { 93 ShellURLRequestContextGetter::CreateNetworkDelegate() {
94 return scoped_ptr<net::NetworkDelegate>(new ShellNetworkDelegate); 94 return scoped_ptr<net::NetworkDelegate>(new ShellNetworkDelegate);
95 } 95 }
96 96
97 scoped_ptr<net::ProxyConfigService> 97 scoped_ptr<net::ProxyConfigService>
98 ShellURLRequestContextGetter::GetProxyConfigService() { 98 ShellURLRequestContextGetter::GetProxyConfigService() {
99 return make_scoped_ptr(net::ProxyService::CreateSystemProxyConfigService( 99 return net::ProxyService::CreateSystemProxyConfigService(
100 io_loop_->task_runner(), file_loop_->task_runner())); 100 io_loop_->task_runner(), file_loop_->task_runner()).Pass();
101 } 101 }
102 102
103 scoped_ptr<net::ProxyService> ShellURLRequestContextGetter::GetProxyService() { 103 scoped_ptr<net::ProxyService> ShellURLRequestContextGetter::GetProxyService() {
104 // TODO(jam): use v8 if possible, look at chrome code. 104 // TODO(jam): use v8 if possible, look at chrome code.
105 return net::ProxyService::CreateUsingSystemProxyResolver( 105 return net::ProxyService::CreateUsingSystemProxyResolver(
106 proxy_config_service_.release(), 0, url_request_context_->net_log()); 106 proxy_config_service_.Pass(), 0, url_request_context_->net_log());
107 } 107 }
108 108
109 net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() { 109 net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() {
110 DCHECK_CURRENTLY_ON(BrowserThread::IO); 110 DCHECK_CURRENTLY_ON(BrowserThread::IO);
111 111
112 if (!url_request_context_) { 112 if (!url_request_context_) {
113 const base::CommandLine& command_line = 113 const base::CommandLine& command_line =
114 *base::CommandLine::ForCurrentProcess(); 114 *base::CommandLine::ForCurrentProcess();
115 115
116 url_request_context_.reset(new net::URLRequestContext()); 116 url_request_context_.reset(new net::URLRequestContext());
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 scoped_refptr<base::SingleThreadTaskRunner> 243 scoped_refptr<base::SingleThreadTaskRunner>
244 ShellURLRequestContextGetter::GetNetworkTaskRunner() const { 244 ShellURLRequestContextGetter::GetNetworkTaskRunner() const {
245 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); 245 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO);
246 } 246 }
247 247
248 net::HostResolver* ShellURLRequestContextGetter::host_resolver() { 248 net::HostResolver* ShellURLRequestContextGetter::host_resolver() {
249 return url_request_context_->host_resolver(); 249 return url_request_context_->host_resolver();
250 } 250 }
251 251
252 } // namespace content 252 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/resolve_proxy_msg_helper_unittest.cc ('k') | ios/crnet/crnet_environment.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698