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

Side by Side Diff: remoting/host/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 | « remoting/host/url_request_context.h ('k') | webkit/appcache/appcache_update_job_unittest.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 "remoting/host/url_request_context.h" 5 #include "remoting/host/url_request_context.h"
6 6
7 #include "base/message_loop_proxy.h" 7 #include "base/message_loop_proxy.h"
8 #include "net/base/cert_verifier.h" 8 #include "net/base/cert_verifier.h"
9 #include "net/base/host_resolver.h" 9 #include "net/base/host_resolver.h"
10 #include "net/base/ssl_config_service_defaults.h" 10 #include "net/base/ssl_config_service_defaults.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 URLRequestContextGetter::URLRequestContextGetter( 115 URLRequestContextGetter::URLRequestContextGetter(
116 base::MessageLoopProxy* ui_message_loop, 116 base::MessageLoopProxy* ui_message_loop,
117 MessageLoop* io_message_loop, 117 MessageLoop* io_message_loop,
118 MessageLoopForIO* file_message_loop) 118 MessageLoopForIO* file_message_loop)
119 : io_message_loop_proxy_(io_message_loop->message_loop_proxy()) { 119 : io_message_loop_proxy_(io_message_loop->message_loop_proxy()) {
120 proxy_config_service_.reset(CreateSystemProxyConfigService( 120 proxy_config_service_.reset(CreateSystemProxyConfigService(
121 ui_message_loop, io_message_loop, file_message_loop)); 121 ui_message_loop, io_message_loop, file_message_loop));
122 } 122 }
123 123
124 net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() { 124 net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() {
125 if (!url_request_context_) { 125 if (!url_request_context_.get()) {
126 url_request_context_ = 126 url_request_context_.reset(
127 new URLRequestContext(proxy_config_service_.Pass()); 127 new URLRequestContext(proxy_config_service_.Pass()));
128 } 128 }
129 return url_request_context_; 129 return url_request_context_.get();
130 } 130 }
131 131
132 scoped_refptr<base::MessageLoopProxy> 132 scoped_refptr<base::MessageLoopProxy>
133 URLRequestContextGetter::GetIOMessageLoopProxy() const { 133 URLRequestContextGetter::GetIOMessageLoopProxy() const {
134 return io_message_loop_proxy_; 134 return io_message_loop_proxy_;
135 } 135 }
136 136
137 URLRequestContextGetter::~URLRequestContextGetter() {} 137 URLRequestContextGetter::~URLRequestContextGetter() {}
138 138
139 } // namespace remoting 139 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/url_request_context.h ('k') | webkit/appcache/appcache_update_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698