OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/browser/net/chrome_url_request_context_getter.h" | 5 #include "chrome/browser/net/chrome_url_request_context_getter.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 void ChromeURLRequestContextGetter::NotifyContextShuttingDown() { | 199 void ChromeURLRequestContextGetter::NotifyContextShuttingDown() { |
200 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 200 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
201 | 201 |
202 factory_.reset(); | 202 factory_.reset(); |
203 url_request_context_ = nullptr; | 203 url_request_context_ = nullptr; |
204 URLRequestContextGetter::NotifyContextShuttingDown(); | 204 URLRequestContextGetter::NotifyContextShuttingDown(); |
205 } | 205 } |
206 | 206 |
207 scoped_refptr<base::SingleThreadTaskRunner> | 207 scoped_refptr<base::SingleThreadTaskRunner> |
208 ChromeURLRequestContextGetter::GetNetworkTaskRunner() const { | 208 ChromeURLRequestContextGetter::GetNetworkTaskRunner() const { |
209 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); | 209 return BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); |
210 } | 210 } |
211 | 211 |
212 // static | 212 // static |
213 ChromeURLRequestContextGetter* ChromeURLRequestContextGetter::Create( | 213 ChromeURLRequestContextGetter* ChromeURLRequestContextGetter::Create( |
214 Profile* profile, | 214 Profile* profile, |
215 const ProfileIOData* profile_io_data, | 215 const ProfileIOData* profile_io_data, |
216 content::ProtocolHandlerMap* protocol_handlers, | 216 content::ProtocolHandlerMap* protocol_handlers, |
217 content::URLRequestInterceptorScopedVector request_interceptors) { | 217 content::URLRequestInterceptorScopedVector request_interceptors) { |
218 return new ChromeURLRequestContextGetter(new FactoryForMain( | 218 return new ChromeURLRequestContextGetter(new FactoryForMain( |
219 profile_io_data, protocol_handlers, std::move(request_interceptors))); | 219 profile_io_data, protocol_handlers, std::move(request_interceptors))); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 ChromeURLRequestContextGetter* | 257 ChromeURLRequestContextGetter* |
258 ChromeURLRequestContextGetter::CreateForIsolatedMedia( | 258 ChromeURLRequestContextGetter::CreateForIsolatedMedia( |
259 Profile* profile, | 259 Profile* profile, |
260 ChromeURLRequestContextGetter* app_context, | 260 ChromeURLRequestContextGetter* app_context, |
261 const ProfileIOData* profile_io_data, | 261 const ProfileIOData* profile_io_data, |
262 const StoragePartitionDescriptor& partition_descriptor) { | 262 const StoragePartitionDescriptor& partition_descriptor) { |
263 return new ChromeURLRequestContextGetter( | 263 return new ChromeURLRequestContextGetter( |
264 new FactoryForIsolatedMedia( | 264 new FactoryForIsolatedMedia( |
265 profile_io_data, partition_descriptor, app_context)); | 265 profile_io_data, partition_descriptor, app_context)); |
266 } | 266 } |
OLD | NEW |