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

Side by Side Diff: net/url_request/url_request_context_builder.cc

Issue 10299002: Stop refcounting URLRequestContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initialize to NULL Created 8 years, 7 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
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 "net/url_request/url_request_context_builder.h" 5 #include "net/url_request/url_request_context_builder.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 http_cache_enabled_(true) {} 172 http_cache_enabled_(true) {}
173 URLRequestContextBuilder::~URLRequestContextBuilder() {} 173 URLRequestContextBuilder::~URLRequestContextBuilder() {}
174 174
175 #if defined(OS_LINUX) 175 #if defined(OS_LINUX)
176 void URLRequestContextBuilder::set_proxy_config_service( 176 void URLRequestContextBuilder::set_proxy_config_service(
177 ProxyConfigService* proxy_config_service) { 177 ProxyConfigService* proxy_config_service) {
178 proxy_config_service_.reset(proxy_config_service); 178 proxy_config_service_.reset(proxy_config_service);
179 } 179 }
180 #endif // defined(OS_LINUX) 180 #endif // defined(OS_LINUX)
181 181
182 scoped_refptr<URLRequestContext> URLRequestContextBuilder::Build() { 182 URLRequestContext* URLRequestContextBuilder::Build() {
183 BasicURLRequestContext* context = new BasicURLRequestContext; 183 BasicURLRequestContext* context = new BasicURLRequestContext;
184 URLRequestContextStorage* storage = context->storage(); 184 URLRequestContextStorage* storage = context->storage();
185 185
186 context->set_user_agent(user_agent_); 186 context->set_user_agent(user_agent_);
187 187
188 BasicNetworkDelegate* network_delegate = new BasicNetworkDelegate; 188 BasicNetworkDelegate* network_delegate = new BasicNetworkDelegate;
189 storage->set_network_delegate(network_delegate); 189 storage->set_network_delegate(network_delegate);
190 190
191 net::HostResolver* host_resolver = net::CreateSystemHostResolver( 191 net::HostResolver* host_resolver = net::CreateSystemHostResolver(
192 host_resolver_params_.parallelism, 192 host_resolver_params_.parallelism,
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 http_transaction_factory = new HttpNetworkLayer(network_session); 271 http_transaction_factory = new HttpNetworkLayer(network_session);
272 } 272 }
273 storage->set_http_transaction_factory(http_transaction_factory); 273 storage->set_http_transaction_factory(http_transaction_factory);
274 274
275 // TODO(willchan): Support sdch. 275 // TODO(willchan): Support sdch.
276 276
277 return context; 277 return context;
278 } 278 }
279 279
280 } // namespace net 280 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request_context_builder.h ('k') | net/url_request/url_request_context_builder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698