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

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: More fixes 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 http_cache_enabled_(true) {} 167 http_cache_enabled_(true) {}
168 URLRequestContextBuilder::~URLRequestContextBuilder() {} 168 URLRequestContextBuilder::~URLRequestContextBuilder() {}
169 169
170 #if defined(OS_LINUX) 170 #if defined(OS_LINUX)
171 void URLRequestContextBuilder::set_proxy_config_service( 171 void URLRequestContextBuilder::set_proxy_config_service(
172 ProxyConfigService* proxy_config_service) { 172 ProxyConfigService* proxy_config_service) {
173 proxy_config_service_.reset(proxy_config_service); 173 proxy_config_service_.reset(proxy_config_service);
174 } 174 }
175 #endif // defined(OS_LINUX) 175 #endif // defined(OS_LINUX)
176 176
177 scoped_refptr<URLRequestContext> URLRequestContextBuilder::Build() { 177 URLRequestContext* URLRequestContextBuilder::Build() {
178 BasicURLRequestContext* context = new BasicURLRequestContext; 178 BasicURLRequestContext* context = new BasicURLRequestContext;
179 URLRequestContextStorage* storage = context->storage(); 179 URLRequestContextStorage* storage = context->storage();
180 180
181 context->set_user_agent(user_agent_); 181 context->set_user_agent(user_agent_);
182 182
183 BasicNetworkDelegate* network_delegate = new BasicNetworkDelegate; 183 BasicNetworkDelegate* network_delegate = new BasicNetworkDelegate;
184 storage->set_network_delegate(network_delegate); 184 storage->set_network_delegate(network_delegate);
185 185
186 net::HostResolver* host_resolver = net::CreateSystemHostResolver( 186 net::HostResolver* host_resolver = net::CreateSystemHostResolver(
187 host_resolver_params_.parallelism, 187 host_resolver_params_.parallelism,
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 http_transaction_factory = new HttpNetworkLayer(network_session); 266 http_transaction_factory = new HttpNetworkLayer(network_session);
267 } 267 }
268 storage->set_http_transaction_factory(http_transaction_factory); 268 storage->set_http_transaction_factory(http_transaction_factory);
269 269
270 // TODO(willchan): Support sdch. 270 // TODO(willchan): Support sdch.
271 271
272 return context; 272 return context;
273 } 273 }
274 274
275 } // namespace net 275 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698