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

Side by Side Diff: chrome/service/net/service_url_request_context.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
« no previous file with comments | « chrome/service/net/service_url_request_context.h ('k') | chrome/test/base/testing_profile.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 (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 "chrome/service/net/service_url_request_context.h" 5 #include "chrome/service/net/service_url_request_context.h"
6 6
7 #if defined(OS_POSIX) && !defined(OS_MACOSX) 7 #if defined(OS_POSIX) && !defined(OS_MACOSX)
8 #include <sys/utsname.h> 8 #include <sys/utsname.h>
9 #endif 9 #endif
10 10
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 // MessageLoopProxy* instead of MessageLoop*. 163 // MessageLoopProxy* instead of MessageLoop*.
164 DCHECK(g_service_process); 164 DCHECK(g_service_process);
165 proxy_config_service_.reset( 165 proxy_config_service_.reset(
166 net::ProxyService::CreateSystemProxyConfigService( 166 net::ProxyService::CreateSystemProxyConfigService(
167 g_service_process->io_thread()->message_loop(), 167 g_service_process->io_thread()->message_loop(),
168 g_service_process->file_thread()->message_loop())); 168 g_service_process->file_thread()->message_loop()));
169 } 169 }
170 170
171 net::URLRequestContext* 171 net::URLRequestContext*
172 ServiceURLRequestContextGetter::GetURLRequestContext() { 172 ServiceURLRequestContextGetter::GetURLRequestContext() {
173 if (!url_request_context_) 173 if (!url_request_context_.get())
174 url_request_context_ = 174 url_request_context_.reset(
175 new ServiceURLRequestContext(user_agent_, 175 new ServiceURLRequestContext(user_agent_,
176 proxy_config_service_.release()); 176 proxy_config_service_.release()));
177 return url_request_context_; 177 return url_request_context_.get();
178 } 178 }
179 179
180 scoped_refptr<base::MessageLoopProxy> 180 scoped_refptr<base::MessageLoopProxy>
181 ServiceURLRequestContextGetter::GetIOMessageLoopProxy() const { 181 ServiceURLRequestContextGetter::GetIOMessageLoopProxy() const {
182 return io_message_loop_proxy_; 182 return io_message_loop_proxy_;
183 } 183 }
184 184
185 ServiceURLRequestContextGetter::~ServiceURLRequestContextGetter() {} 185 ServiceURLRequestContextGetter::~ServiceURLRequestContextGetter() {}
OLDNEW
« no previous file with comments | « chrome/service/net/service_url_request_context.h ('k') | chrome/test/base/testing_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698