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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/prefs/json_pref_store.h" | 14 #include "base/prefs/json_pref_store.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/content_settings/host_content_settings_map_factory.h" | 22 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
23 #include "chrome/browser/dom_distiller/profile_utils.h" | 23 #include "chrome/browser/dom_distiller/profile_utils.h" |
24 #include "chrome/browser/download/chrome_download_manager_delegate.h" | 24 #include "chrome/browser/download/chrome_download_manager_delegate.h" |
25 #include "chrome/browser/download/download_service.h" | 25 #include "chrome/browser/download/download_service.h" |
26 #include "chrome/browser/download/download_service_factory.h" | 26 #include "chrome/browser/download/download_service_factory.h" |
27 #include "chrome/browser/io_thread.h" | 27 #include "chrome/browser/io_thread.h" |
28 #include "chrome/browser/net/chrome_url_request_context_getter.h" | 28 #include "chrome/browser/net/chrome_url_request_context_getter.h" |
29 #include "chrome/browser/net/proxy_service_factory.h" | 29 #include "chrome/browser/net/proxy_service_factory.h" |
| 30 #include "chrome/browser/permissions/chooser_permission_manager.h" |
| 31 #include "chrome/browser/permissions/chooser_permission_manager_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" |
32 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" | 34 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" |
33 #include "chrome/browser/plugins/plugin_prefs.h" | 35 #include "chrome/browser/plugins/plugin_prefs.h" |
34 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 36 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
35 #include "chrome/browser/prefs/pref_service_syncable_util.h" | 37 #include "chrome/browser/prefs/pref_service_syncable_util.h" |
36 #include "chrome/browser/profiles/profile_manager.h" | 38 #include "chrome/browser/profiles/profile_manager.h" |
37 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate.h" | 39 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate.h" |
38 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate_factory.h" | 40 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate_factory.h" |
39 #include "chrome/browser/themes/theme_service.h" | 41 #include "chrome/browser/themes/theme_service.h" |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 // instead of repeating them inside all Profile implementations. | 412 // instead of repeating them inside all Profile implementations. |
411 content::PermissionManager* OffTheRecordProfileImpl::GetPermissionManager() { | 413 content::PermissionManager* OffTheRecordProfileImpl::GetPermissionManager() { |
412 return PermissionManagerFactory::GetForProfile(this); | 414 return PermissionManagerFactory::GetForProfile(this); |
413 } | 415 } |
414 | 416 |
415 content::BackgroundSyncController* | 417 content::BackgroundSyncController* |
416 OffTheRecordProfileImpl::GetBackgroundSyncController() { | 418 OffTheRecordProfileImpl::GetBackgroundSyncController() { |
417 return BackgroundSyncControllerFactory::GetForProfile(this); | 419 return BackgroundSyncControllerFactory::GetForProfile(this); |
418 } | 420 } |
419 | 421 |
| 422 content::ChooserPermissionManager* |
| 423 OffTheRecordProfileImpl::GetChooserPermissionManager() { |
| 424 return ChooserPermissionManagerFactory::GetForProfile(this); |
| 425 } |
| 426 |
420 bool OffTheRecordProfileImpl::IsSameProfile(Profile* profile) { | 427 bool OffTheRecordProfileImpl::IsSameProfile(Profile* profile) { |
421 return (profile == this) || (profile == profile_); | 428 return (profile == this) || (profile == profile_); |
422 } | 429 } |
423 | 430 |
424 Time OffTheRecordProfileImpl::GetStartTime() const { | 431 Time OffTheRecordProfileImpl::GetStartTime() const { |
425 return start_time_; | 432 return start_time_; |
426 } | 433 } |
427 | 434 |
428 void OffTheRecordProfileImpl::SetExitType(ExitType exit_type) { | 435 void OffTheRecordProfileImpl::SetExitType(ExitType exit_type) { |
429 } | 436 } |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { | 573 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { |
567 #if defined(OS_CHROMEOS) | 574 #if defined(OS_CHROMEOS) |
568 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 575 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
569 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 576 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
570 g_browser_process->local_state()); | 577 g_browser_process->local_state()); |
571 } | 578 } |
572 #endif // defined(OS_CHROMEOS) | 579 #endif // defined(OS_CHROMEOS) |
573 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 580 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
574 GetPrefs(), g_browser_process->local_state()); | 581 GetPrefs(), g_browser_process->local_state()); |
575 } | 582 } |
OLD | NEW |