| 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 DownloadManagerDelegate* OffTheRecordProfileImpl::GetDownloadManagerDelegate() { | 260 DownloadManagerDelegate* OffTheRecordProfileImpl::GetDownloadManagerDelegate() { |
| 261 return DownloadServiceFactory::GetForBrowserContext(this)-> | 261 return DownloadServiceFactory::GetForBrowserContext(this)-> |
| 262 GetDownloadManagerDelegate(); | 262 GetDownloadManagerDelegate(); |
| 263 } | 263 } |
| 264 | 264 |
| 265 net::URLRequestContextGetter* OffTheRecordProfileImpl::GetRequestContext() { | 265 net::URLRequestContextGetter* OffTheRecordProfileImpl::GetRequestContext() { |
| 266 return GetDefaultStoragePartition(this)->GetURLRequestContext(); | 266 return GetDefaultStoragePartition(this)->GetURLRequestContext(); |
| 267 } | 267 } |
| 268 | 268 |
| 269 net::URLRequestContextGetter* OffTheRecordProfileImpl::CreateRequestContext( | 269 net::URLRequestContextGetter* OffTheRecordProfileImpl::CreateRequestContext( |
| 270 content::ProtocolHandlerMap* protocol_handlers) { | 270 content::ProtocolHandlerMap* protocol_handlers, |
| 271 return io_data_.CreateMainRequestContextGetter(protocol_handlers).get(); | 271 content::ProtocolHandlerScopedVector protocol_interceptors) { |
| 272 return io_data_.CreateMainRequestContextGetter( |
| 273 protocol_handlers, protocol_interceptors.Pass()).get(); |
| 272 } | 274 } |
| 273 | 275 |
| 274 net::URLRequestContextGetter* | 276 net::URLRequestContextGetter* |
| 275 OffTheRecordProfileImpl::GetRequestContextForRenderProcess( | 277 OffTheRecordProfileImpl::GetRequestContextForRenderProcess( |
| 276 int renderer_child_id) { | 278 int renderer_child_id) { |
| 277 content::RenderProcessHost* rph = content::RenderProcessHost::FromID( | 279 content::RenderProcessHost* rph = content::RenderProcessHost::FromID( |
| 278 renderer_child_id); | 280 renderer_child_id); |
| 279 return rph->GetStoragePartition()->GetURLRequestContext(); | 281 return rph->GetStoragePartition()->GetURLRequestContext(); |
| 280 } | 282 } |
| 281 | 283 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 NOTIMPLEMENTED(); | 360 NOTIMPLEMENTED(); |
| 359 #endif // defined(OS_ANDROID) | 361 #endif // defined(OS_ANDROID) |
| 360 } | 362 } |
| 361 | 363 |
| 362 net::URLRequestContextGetter* | 364 net::URLRequestContextGetter* |
| 363 OffTheRecordProfileImpl::GetRequestContextForExtensions() { | 365 OffTheRecordProfileImpl::GetRequestContextForExtensions() { |
| 364 return io_data_.GetExtensionsRequestContextGetter().get(); | 366 return io_data_.GetExtensionsRequestContextGetter().get(); |
| 365 } | 367 } |
| 366 | 368 |
| 367 net::URLRequestContextGetter* | 369 net::URLRequestContextGetter* |
| 368 OffTheRecordProfileImpl::CreateRequestContextForStoragePartition( | 370 OffTheRecordProfileImpl::CreateRequestContextForStoragePartition( |
| 369 const base::FilePath& partition_path, | 371 const base::FilePath& partition_path, |
| 370 bool in_memory, | 372 bool in_memory, |
| 371 content::ProtocolHandlerMap* protocol_handlers) { | 373 content::ProtocolHandlerMap* protocol_handlers, |
| 374 content::ProtocolHandlerScopedVector protocol_interceptors) { |
| 372 return io_data_.CreateIsolatedAppRequestContextGetter( | 375 return io_data_.CreateIsolatedAppRequestContextGetter( |
| 373 partition_path, in_memory, protocol_handlers).get(); | 376 partition_path, |
| 377 in_memory, |
| 378 protocol_handlers, |
| 379 protocol_interceptors.Pass()).get(); |
| 374 } | 380 } |
| 375 | 381 |
| 376 content::ResourceContext* OffTheRecordProfileImpl::GetResourceContext() { | 382 content::ResourceContext* OffTheRecordProfileImpl::GetResourceContext() { |
| 377 return io_data_.GetResourceContext(); | 383 return io_data_.GetResourceContext(); |
| 378 } | 384 } |
| 379 | 385 |
| 380 net::SSLConfigService* OffTheRecordProfileImpl::GetSSLConfigService() { | 386 net::SSLConfigService* OffTheRecordProfileImpl::GetSSLConfigService() { |
| 381 return profile_->GetSSLConfigService(); | 387 return profile_->GetSSLConfigService(); |
| 382 } | 388 } |
| 383 | 389 |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { | 548 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { |
| 543 #if defined(OS_CHROMEOS) | 549 #if defined(OS_CHROMEOS) |
| 544 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 550 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
| 545 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 551 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
| 546 g_browser_process->local_state()); | 552 g_browser_process->local_state()); |
| 547 } | 553 } |
| 548 #endif // defined(OS_CHROMEOS) | 554 #endif // defined(OS_CHROMEOS) |
| 549 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 555 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
| 550 GetPrefs(), g_browser_process->local_state()); | 556 GetPrefs(), g_browser_process->local_state()); |
| 551 } | 557 } |
| OLD | NEW |