OLD | NEW |
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 Loading... |
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() {} |
OLD | NEW |