| 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/browser/profiles/off_the_record_profile_impl.h" | 5 #include "chrome/browser/profiles/off_the_record_profile_impl.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 | 307 |
| 308 PrefService* OffTheRecordProfileImpl::GetOffTheRecordPrefs() { | 308 PrefService* OffTheRecordProfileImpl::GetOffTheRecordPrefs() { |
| 309 return prefs_; | 309 return prefs_; |
| 310 } | 310 } |
| 311 | 311 |
| 312 DownloadManagerDelegate* OffTheRecordProfileImpl::GetDownloadManagerDelegate() { | 312 DownloadManagerDelegate* OffTheRecordProfileImpl::GetDownloadManagerDelegate() { |
| 313 return DownloadServiceFactory::GetForBrowserContext(this)-> | 313 return DownloadServiceFactory::GetForBrowserContext(this)-> |
| 314 GetDownloadManagerDelegate(); | 314 GetDownloadManagerDelegate(); |
| 315 } | 315 } |
| 316 | 316 |
| 317 net::URLRequestContextGetter* OffTheRecordProfileImpl::GetRequestContext() { |
| 318 return GetDefaultStoragePartition(this)->GetURLRequestContext(); |
| 319 } |
| 320 |
| 317 net::URLRequestContextGetter* OffTheRecordProfileImpl::CreateRequestContext( | 321 net::URLRequestContextGetter* OffTheRecordProfileImpl::CreateRequestContext( |
| 318 content::ProtocolHandlerMap* protocol_handlers, | 322 content::ProtocolHandlerMap* protocol_handlers, |
| 319 content::URLRequestInterceptorScopedVector request_interceptors) { | 323 content::URLRequestInterceptorScopedVector request_interceptors) { |
| 320 return io_data_->CreateMainRequestContextGetter( | 324 return io_data_->CreateMainRequestContextGetter( |
| 321 protocol_handlers, std::move(request_interceptors)) | 325 protocol_handlers, std::move(request_interceptors)) |
| 322 .get(); | 326 .get(); |
| 323 } | 327 } |
| 324 | 328 |
| 325 net::URLRequestContextGetter* | 329 net::URLRequestContextGetter* |
| 326 OffTheRecordProfileImpl::GetMediaRequestContext() { | 330 OffTheRecordProfileImpl::GetMediaRequestContext() { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 337 } | 341 } |
| 338 | 342 |
| 339 net::URLRequestContextGetter* | 343 net::URLRequestContextGetter* |
| 340 OffTheRecordProfileImpl::GetMediaRequestContextForStoragePartition( | 344 OffTheRecordProfileImpl::GetMediaRequestContextForStoragePartition( |
| 341 const base::FilePath& partition_path, | 345 const base::FilePath& partition_path, |
| 342 bool in_memory) { | 346 bool in_memory) { |
| 343 return io_data_->GetIsolatedAppRequestContextGetter(partition_path, in_memory) | 347 return io_data_->GetIsolatedAppRequestContextGetter(partition_path, in_memory) |
| 344 .get(); | 348 .get(); |
| 345 } | 349 } |
| 346 | 350 |
| 347 net::URLRequestContextGetter* OffTheRecordProfileImpl::GetRequestContext() { | |
| 348 return GetDefaultStoragePartition(this)->GetURLRequestContext(); | |
| 349 } | |
| 350 | |
| 351 net::URLRequestContextGetter* | 351 net::URLRequestContextGetter* |
| 352 OffTheRecordProfileImpl::GetRequestContextForExtensions() { | 352 OffTheRecordProfileImpl::GetRequestContextForExtensions() { |
| 353 return io_data_->GetExtensionsRequestContextGetter().get(); | 353 return io_data_->GetExtensionsRequestContextGetter().get(); |
| 354 } | 354 } |
| 355 | 355 |
| 356 net::URLRequestContextGetter* | 356 net::URLRequestContextGetter* |
| 357 OffTheRecordProfileImpl::CreateRequestContextForStoragePartition( | 357 OffTheRecordProfileImpl::CreateRequestContextForStoragePartition( |
| 358 const base::FilePath& partition_path, | 358 const base::FilePath& partition_path, |
| 359 bool in_memory, | 359 bool in_memory, |
| 360 content::ProtocolHandlerMap* protocol_handlers, | 360 content::ProtocolHandlerMap* protocol_handlers, |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { | 561 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { |
| 562 #if defined(OS_CHROMEOS) | 562 #if defined(OS_CHROMEOS) |
| 563 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 563 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
| 564 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 564 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
| 565 g_browser_process->local_state()); | 565 g_browser_process->local_state()); |
| 566 } | 566 } |
| 567 #endif // defined(OS_CHROMEOS) | 567 #endif // defined(OS_CHROMEOS) |
| 568 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 568 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
| 569 GetPrefs(), g_browser_process->local_state()); | 569 GetPrefs(), g_browser_process->local_state()); |
| 570 } | 570 } |
| OLD | NEW |