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_sync/background_sync_controller_factory.h" | 19 #include "chrome/browser/background_sync/background_sync_controller_factory.h" |
20 #include "chrome/browser/background_sync/background_sync_controller_impl.h" | 20 #include "chrome/browser/background_sync/background_sync_controller_impl.h" |
21 #include "chrome/browser/browser_process.h" | 21 #include "chrome/browser/browser_process.h" |
| 22 #include "chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h" |
| 23 #include "chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_fac
tory.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_core_service.h" | 27 #include "chrome/browser/download/download_core_service.h" |
26 #include "chrome/browser/download/download_core_service_factory.h" | 28 #include "chrome/browser/download/download_core_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" |
29 #include "chrome/browser/net/proxy_service_factory.h" | 31 #include "chrome/browser/net/proxy_service_factory.h" |
30 #include "chrome/browser/permissions/permission_manager.h" | 32 #include "chrome/browser/permissions/permission_manager.h" |
31 #include "chrome/browser/permissions/permission_manager_factory.h" | 33 #include "chrome/browser/permissions/permission_manager_factory.h" |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
403 content::BackgroundSyncController* | 405 content::BackgroundSyncController* |
404 OffTheRecordProfileImpl::GetBackgroundSyncController() { | 406 OffTheRecordProfileImpl::GetBackgroundSyncController() { |
405 return BackgroundSyncControllerFactory::GetForProfile(this); | 407 return BackgroundSyncControllerFactory::GetForProfile(this); |
406 } | 408 } |
407 | 409 |
| 410 content::BrowsingDataRemoverDelegate* |
| 411 OffTheRecordProfileImpl::GetBrowsingDataRemoverDelegate() { |
| 412 return ChromeBrowsingDataRemoverDelegateFactory::GetForProfile(this); |
| 413 } |
| 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 { |
413 return start_time_; | 420 return start_time_; |
414 } | 421 } |
415 | 422 |
416 void OffTheRecordProfileImpl::SetExitType(ExitType exit_type) { | 423 void OffTheRecordProfileImpl::SetExitType(ExitType exit_type) { |
417 } | 424 } |
(...skipping 136 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 |