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/download/chrome_download_manager_delegate.h" | 20 #include "chrome/browser/download/chrome_download_manager_delegate.h" |
21 #include "chrome/browser/download/download_service.h" | 21 #include "chrome/browser/download/download_service.h" |
22 #include "chrome/browser/download/download_service_factory.h" | 22 #include "chrome/browser/download/download_service_factory.h" |
23 #include "chrome/browser/extensions/api/web_request/web_request_api.h" | 23 #include "chrome/browser/extensions/api/web_request/web_request_api.h" |
24 #include "chrome/browser/extensions/extension_service.h" | 24 #include "chrome/browser/extensions/extension_service.h" |
25 #include "chrome/browser/extensions/extension_special_storage_policy.h" | 25 #include "chrome/browser/extensions/extension_special_storage_policy.h" |
26 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h" | |
27 #include "chrome/browser/geolocation/chrome_geolocation_permission_context_facto
ry.h" | |
28 #include "chrome/browser/io_thread.h" | 26 #include "chrome/browser/io_thread.h" |
29 #include "chrome/browser/media/chrome_midi_permission_context.h" | 27 #include "chrome/browser/media/chrome_midi_permission_context.h" |
30 #include "chrome/browser/media/chrome_midi_permission_context_factory.h" | 28 #include "chrome/browser/media/chrome_midi_permission_context_factory.h" |
31 #include "chrome/browser/net/pref_proxy_config_tracker.h" | 29 #include "chrome/browser/net/pref_proxy_config_tracker.h" |
32 #include "chrome/browser/net/proxy_service_factory.h" | 30 #include "chrome/browser/net/proxy_service_factory.h" |
33 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" | 31 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" |
34 #include "chrome/browser/plugins/plugin_prefs.h" | 32 #include "chrome/browser/plugins/plugin_prefs.h" |
35 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 33 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
36 #include "chrome/browser/prefs/pref_service_syncable.h" | 34 #include "chrome/browser/prefs/pref_service_syncable.h" |
37 #include "chrome/browser/themes/theme_service.h" | 35 #include "chrome/browser/themes/theme_service.h" |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), true); | 412 host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), true); |
415 #if defined(ENABLE_EXTENSIONS) | 413 #if defined(ENABLE_EXTENSIONS) |
416 ExtensionService* extension_service = GetExtensionService(); | 414 ExtensionService* extension_service = GetExtensionService(); |
417 if (extension_service) | 415 if (extension_service) |
418 host_content_settings_map_->RegisterExtensionService(extension_service); | 416 host_content_settings_map_->RegisterExtensionService(extension_service); |
419 #endif | 417 #endif |
420 } | 418 } |
421 return host_content_settings_map_.get(); | 419 return host_content_settings_map_.get(); |
422 } | 420 } |
423 | 421 |
424 content::GeolocationPermissionContext* | |
425 OffTheRecordProfileImpl::GetGeolocationPermissionContext() { | |
426 return ChromeGeolocationPermissionContextFactory::GetForProfile(this); | |
427 } | |
428 | |
429 content::BrowserPluginGuestManager* | 422 content::BrowserPluginGuestManager* |
430 OffTheRecordProfileImpl::GetGuestManager() { | 423 OffTheRecordProfileImpl::GetGuestManager() { |
431 #if defined(ENABLE_EXTENSIONS) | 424 #if defined(ENABLE_EXTENSIONS) |
432 return GuestViewManager::FromBrowserContext(this); | 425 return GuestViewManager::FromBrowserContext(this); |
433 #else | 426 #else |
434 return NULL; | 427 return NULL; |
435 #endif | 428 #endif |
436 } | 429 } |
437 | 430 |
438 quota::SpecialStoragePolicy* | 431 quota::SpecialStoragePolicy* |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { | 594 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { |
602 #if defined(OS_CHROMEOS) | 595 #if defined(OS_CHROMEOS) |
603 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 596 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
604 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 597 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
605 g_browser_process->local_state()); | 598 g_browser_process->local_state()); |
606 } | 599 } |
607 #endif // defined(OS_CHROMEOS) | 600 #endif // defined(OS_CHROMEOS) |
608 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 601 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
609 GetPrefs(), g_browser_process->local_state()); | 602 GetPrefs(), g_browser_process->local_state()); |
610 } | 603 } |
OLD | NEW |