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" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
14 #include "base/memory/ptr_util.h" | 14 #include "base/memory/ptr_util.h" |
15 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
16 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
17 #include "build/build_config.h" | 17 #include "build/build_config.h" |
18 #include "chrome/browser/background/background_contents_service_factory.h" | 18 #include "chrome/browser/background/background_contents_service_factory.h" |
| 19 #include "chrome/browser/background_fetch/background_fetch_client_factory.h" |
| 20 #include "chrome/browser/background_fetch/background_fetch_client_impl.h" |
19 #include "chrome/browser/background_sync/background_sync_controller_factory.h" | 21 #include "chrome/browser/background_sync/background_sync_controller_factory.h" |
20 #include "chrome/browser/background_sync/background_sync_controller_impl.h" | 22 #include "chrome/browser/background_sync/background_sync_controller_impl.h" |
21 #include "chrome/browser/browser_process.h" | 23 #include "chrome/browser/browser_process.h" |
22 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 24 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
23 #include "chrome/browser/dom_distiller/profile_utils.h" | 25 #include "chrome/browser/dom_distiller/profile_utils.h" |
24 #include "chrome/browser/download/chrome_download_manager_delegate.h" | 26 #include "chrome/browser/download/chrome_download_manager_delegate.h" |
25 #include "chrome/browser/download/download_service.h" | 27 #include "chrome/browser/download/download_service.h" |
26 #include "chrome/browser/download/download_service_factory.h" | 28 #include "chrome/browser/download/download_service_factory.h" |
27 #include "chrome/browser/io_thread.h" | 29 #include "chrome/browser/io_thread.h" |
28 #include "chrome/browser/net/chrome_url_request_context_getter.h" | 30 #include "chrome/browser/net/chrome_url_request_context_getter.h" |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 OffTheRecordProfileImpl::GetSSLHostStateDelegate() { | 395 OffTheRecordProfileImpl::GetSSLHostStateDelegate() { |
394 return ChromeSSLHostStateDelegateFactory::GetForProfile(this); | 396 return ChromeSSLHostStateDelegateFactory::GetForProfile(this); |
395 } | 397 } |
396 | 398 |
397 // TODO(mlamouri): we should all these BrowserContext implementation to Profile | 399 // TODO(mlamouri): we should all these BrowserContext implementation to Profile |
398 // instead of repeating them inside all Profile implementations. | 400 // instead of repeating them inside all Profile implementations. |
399 content::PermissionManager* OffTheRecordProfileImpl::GetPermissionManager() { | 401 content::PermissionManager* OffTheRecordProfileImpl::GetPermissionManager() { |
400 return PermissionManagerFactory::GetForProfile(this); | 402 return PermissionManagerFactory::GetForProfile(this); |
401 } | 403 } |
402 | 404 |
| 405 content::BackgroundFetchClient* |
| 406 OffTheRecordProfileImpl::GetBackgroundFetchClient() { |
| 407 return BackgroundFetchClientFactory::GetForProfile(this); |
| 408 } |
| 409 |
403 content::BackgroundSyncController* | 410 content::BackgroundSyncController* |
404 OffTheRecordProfileImpl::GetBackgroundSyncController() { | 411 OffTheRecordProfileImpl::GetBackgroundSyncController() { |
405 return BackgroundSyncControllerFactory::GetForProfile(this); | 412 return BackgroundSyncControllerFactory::GetForProfile(this); |
406 } | 413 } |
407 | 414 |
408 bool OffTheRecordProfileImpl::IsSameProfile(Profile* profile) { | 415 bool OffTheRecordProfileImpl::IsSameProfile(Profile* profile) { |
409 return (profile == this) || (profile == profile_); | 416 return (profile == this) || (profile == profile_); |
410 } | 417 } |
411 | 418 |
412 Time OffTheRecordProfileImpl::GetStartTime() const { | 419 Time OffTheRecordProfileImpl::GetStartTime() const { |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { | 561 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { |
555 #if defined(OS_CHROMEOS) | 562 #if defined(OS_CHROMEOS) |
556 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 563 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
557 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 564 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
558 g_browser_process->local_state()); | 565 g_browser_process->local_state()); |
559 } | 566 } |
560 #endif // defined(OS_CHROMEOS) | 567 #endif // defined(OS_CHROMEOS) |
561 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 568 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
562 GetPrefs(), g_browser_process->local_state()); | 569 GetPrefs(), g_browser_process->local_state()); |
563 } | 570 } |
OLD | NEW |