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" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/path_service.h" | 12 #include "base/path_service.h" |
13 #include "base/prefs/json_pref_store.h" | 13 #include "base/prefs/json_pref_store.h" |
14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
15 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
16 #include "build/build_config.h" | 16 #include "build/build_config.h" |
17 #include "chrome/browser/background/background_contents_service_factory.h" | 17 #include "chrome/browser/background/background_contents_service_factory.h" |
18 #include "chrome/browser/browser_process.h" | 18 #include "chrome/browser/browser_process.h" |
19 #include "chrome/browser/content_settings/host_content_settings_map.h" | 19 #include "chrome/browser/content_settings/host_content_settings_map.h" |
20 #include "chrome/browser/dom_distiller/profile_utils.h" | 20 #include "chrome/browser/dom_distiller/profile_utils.h" |
21 #include "chrome/browser/download/chrome_download_manager_delegate.h" | 21 #include "chrome/browser/download/chrome_download_manager_delegate.h" |
22 #include "chrome/browser/download/download_service.h" | 22 #include "chrome/browser/download/download_service.h" |
23 #include "chrome/browser/download/download_service_factory.h" | 23 #include "chrome/browser/download/download_service_factory.h" |
24 #include "chrome/browser/extensions/extension_special_storage_policy.h" | |
25 #include "chrome/browser/io_thread.h" | 24 #include "chrome/browser/io_thread.h" |
26 #include "chrome/browser/net/chrome_url_request_context_getter.h" | 25 #include "chrome/browser/net/chrome_url_request_context_getter.h" |
27 #include "chrome/browser/net/pref_proxy_config_tracker.h" | 26 #include "chrome/browser/net/pref_proxy_config_tracker.h" |
28 #include "chrome/browser/net/proxy_service_factory.h" | 27 #include "chrome/browser/net/proxy_service_factory.h" |
29 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" | 28 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" |
30 #include "chrome/browser/plugins/plugin_prefs.h" | 29 #include "chrome/browser/plugins/plugin_prefs.h" |
31 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 30 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
32 #include "chrome/browser/prefs/pref_service_syncable.h" | 31 #include "chrome/browser/prefs/pref_service_syncable.h" |
33 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate.h" | 32 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate.h" |
34 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate_factory.h" | 33 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate_factory.h" |
(...skipping 30 matching lines...) Expand all Loading... |
65 #include "chrome/browser/chromeos/preferences.h" | 64 #include "chrome/browser/chromeos/preferences.h" |
66 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 65 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
67 #endif | 66 #endif |
68 | 67 |
69 #if defined(ENABLE_CONFIGURATION_POLICY) && !defined(OS_CHROMEOS) | 68 #if defined(ENABLE_CONFIGURATION_POLICY) && !defined(OS_CHROMEOS) |
70 #include "chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h" | 69 #include "chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h" |
71 #endif | 70 #endif |
72 | 71 |
73 #if defined(ENABLE_EXTENSIONS) | 72 #if defined(ENABLE_EXTENSIONS) |
74 #include "chrome/browser/extensions/extension_service.h" | 73 #include "chrome/browser/extensions/extension_service.h" |
| 74 #include "chrome/browser/extensions/extension_special_storage_policy.h" |
75 #include "extensions/browser/api/web_request/web_request_api.h" | 75 #include "extensions/browser/api/web_request/web_request_api.h" |
76 #include "extensions/browser/extension_system.h" | 76 #include "extensions/browser/extension_system.h" |
77 #include "extensions/browser/guest_view/guest_view_manager.h" | 77 #include "extensions/browser/guest_view/guest_view_manager.h" |
78 #include "extensions/common/extension.h" | 78 #include "extensions/common/extension.h" |
79 #endif | 79 #endif |
80 | 80 |
81 using content::BrowserThread; | 81 using content::BrowserThread; |
82 using content::DownloadManagerDelegate; | 82 using content::DownloadManagerDelegate; |
83 using content::HostZoomMap; | 83 using content::HostZoomMap; |
84 | 84 |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 content::BrowserPluginGuestManager* OffTheRecordProfileImpl::GetGuestManager() { | 375 content::BrowserPluginGuestManager* OffTheRecordProfileImpl::GetGuestManager() { |
376 #if defined(ENABLE_EXTENSIONS) | 376 #if defined(ENABLE_EXTENSIONS) |
377 return extensions::GuestViewManager::FromBrowserContext(this); | 377 return extensions::GuestViewManager::FromBrowserContext(this); |
378 #else | 378 #else |
379 return NULL; | 379 return NULL; |
380 #endif | 380 #endif |
381 } | 381 } |
382 | 382 |
383 storage::SpecialStoragePolicy* | 383 storage::SpecialStoragePolicy* |
384 OffTheRecordProfileImpl::GetSpecialStoragePolicy() { | 384 OffTheRecordProfileImpl::GetSpecialStoragePolicy() { |
| 385 #if defined(ENABLE_EXTENSIONS) |
385 return GetExtensionSpecialStoragePolicy(); | 386 return GetExtensionSpecialStoragePolicy(); |
| 387 #else |
| 388 return NULL; |
| 389 #endif |
386 } | 390 } |
387 | 391 |
388 content::PushMessagingService* | 392 content::PushMessagingService* |
389 OffTheRecordProfileImpl::GetPushMessagingService() { | 393 OffTheRecordProfileImpl::GetPushMessagingService() { |
390 // TODO(johnme): Support push messaging in incognito if possible. | 394 // TODO(johnme): Support push messaging in incognito if possible. |
391 return NULL; | 395 return NULL; |
392 } | 396 } |
393 | 397 |
394 content::SSLHostStateDelegate* | 398 content::SSLHostStateDelegate* |
395 OffTheRecordProfileImpl::GetSSLHostStateDelegate() { | 399 OffTheRecordProfileImpl::GetSSLHostStateDelegate() { |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { | 545 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { |
542 #if defined(OS_CHROMEOS) | 546 #if defined(OS_CHROMEOS) |
543 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 547 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
544 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 548 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
545 g_browser_process->local_state()); | 549 g_browser_process->local_state()); |
546 } | 550 } |
547 #endif // defined(OS_CHROMEOS) | 551 #endif // defined(OS_CHROMEOS) |
548 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 552 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
549 GetPrefs(), g_browser_process->local_state()); | 553 GetPrefs(), g_browser_process->local_state()); |
550 } | 554 } |
OLD | NEW |