| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 return DownloadServiceFactory::GetForBrowserContext(this)-> | 276 return DownloadServiceFactory::GetForBrowserContext(this)-> |
| 277 GetDownloadManagerDelegate(); | 277 GetDownloadManagerDelegate(); |
| 278 } | 278 } |
| 279 | 279 |
| 280 net::URLRequestContextGetter* OffTheRecordProfileImpl::GetRequestContext() { | 280 net::URLRequestContextGetter* OffTheRecordProfileImpl::GetRequestContext() { |
| 281 return GetDefaultStoragePartition(this)->GetURLRequestContext(); | 281 return GetDefaultStoragePartition(this)->GetURLRequestContext(); |
| 282 } | 282 } |
| 283 | 283 |
| 284 net::URLRequestContextGetter* OffTheRecordProfileImpl::CreateRequestContext( | 284 net::URLRequestContextGetter* OffTheRecordProfileImpl::CreateRequestContext( |
| 285 content::ProtocolHandlerMap* protocol_handlers, | 285 content::ProtocolHandlerMap* protocol_handlers, |
| 286 content::ProtocolHandlerScopedVector protocol_interceptors) { | 286 content::URLRequestInterceptorScopedVector request_interceptors) { |
| 287 return io_data_->CreateMainRequestContextGetter( | 287 return io_data_->CreateMainRequestContextGetter( |
| 288 protocol_handlers, protocol_interceptors.Pass()).get(); | 288 protocol_handlers, request_interceptors.Pass()).get(); |
| 289 } | 289 } |
| 290 | 290 |
| 291 net::URLRequestContextGetter* | 291 net::URLRequestContextGetter* |
| 292 OffTheRecordProfileImpl::GetRequestContextForRenderProcess( | 292 OffTheRecordProfileImpl::GetRequestContextForRenderProcess( |
| 293 int renderer_child_id) { | 293 int renderer_child_id) { |
| 294 content::RenderProcessHost* rph = content::RenderProcessHost::FromID( | 294 content::RenderProcessHost* rph = content::RenderProcessHost::FromID( |
| 295 renderer_child_id); | 295 renderer_child_id); |
| 296 return rph->GetStoragePartition()->GetURLRequestContext(); | 296 return rph->GetStoragePartition()->GetURLRequestContext(); |
| 297 } | 297 } |
| 298 | 298 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 net::URLRequestContextGetter* | 381 net::URLRequestContextGetter* |
| 382 OffTheRecordProfileImpl::GetRequestContextForExtensions() { | 382 OffTheRecordProfileImpl::GetRequestContextForExtensions() { |
| 383 return io_data_->GetExtensionsRequestContextGetter().get(); | 383 return io_data_->GetExtensionsRequestContextGetter().get(); |
| 384 } | 384 } |
| 385 | 385 |
| 386 net::URLRequestContextGetter* | 386 net::URLRequestContextGetter* |
| 387 OffTheRecordProfileImpl::CreateRequestContextForStoragePartition( | 387 OffTheRecordProfileImpl::CreateRequestContextForStoragePartition( |
| 388 const base::FilePath& partition_path, | 388 const base::FilePath& partition_path, |
| 389 bool in_memory, | 389 bool in_memory, |
| 390 content::ProtocolHandlerMap* protocol_handlers, | 390 content::ProtocolHandlerMap* protocol_handlers, |
| 391 content::ProtocolHandlerScopedVector protocol_interceptors) { | 391 content::URLRequestInterceptorScopedVector request_interceptors) { |
| 392 return io_data_->CreateIsolatedAppRequestContextGetter( | 392 return io_data_->CreateIsolatedAppRequestContextGetter( |
| 393 partition_path, | 393 partition_path, |
| 394 in_memory, | 394 in_memory, |
| 395 protocol_handlers, | 395 protocol_handlers, |
| 396 protocol_interceptors.Pass()).get(); | 396 request_interceptors.Pass()).get(); |
| 397 } | 397 } |
| 398 | 398 |
| 399 content::ResourceContext* OffTheRecordProfileImpl::GetResourceContext() { | 399 content::ResourceContext* OffTheRecordProfileImpl::GetResourceContext() { |
| 400 return io_data_->GetResourceContext(); | 400 return io_data_->GetResourceContext(); |
| 401 } | 401 } |
| 402 | 402 |
| 403 net::SSLConfigService* OffTheRecordProfileImpl::GetSSLConfigService() { | 403 net::SSLConfigService* OffTheRecordProfileImpl::GetSSLConfigService() { |
| 404 return profile_->GetSSLConfigService(); | 404 return profile_->GetSSLConfigService(); |
| 405 } | 405 } |
| 406 | 406 |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { | 584 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { |
| 585 #if defined(OS_CHROMEOS) | 585 #if defined(OS_CHROMEOS) |
| 586 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 586 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
| 587 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 587 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
| 588 g_browser_process->local_state()); | 588 g_browser_process->local_state()); |
| 589 } | 589 } |
| 590 #endif // defined(OS_CHROMEOS) | 590 #endif // defined(OS_CHROMEOS) |
| 591 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 591 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
| 592 GetPrefs(), g_browser_process->local_state()); | 592 GetPrefs(), g_browser_process->local_state()); |
| 593 } | 593 } |
| OLD | NEW |