| 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" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 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/extension_special_storage_policy.h" | 23 #include "chrome/browser/extensions/extension_special_storage_policy.h" |
| 24 #include "chrome/browser/io_thread.h" | 24 #include "chrome/browser/io_thread.h" |
| 25 #include "chrome/browser/net/pref_proxy_config_tracker.h" | 25 #include "chrome/browser/net/pref_proxy_config_tracker.h" |
| 26 #include "chrome/browser/net/proxy_service_factory.h" | 26 #include "chrome/browser/net/proxy_service_factory.h" |
| 27 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" | 27 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" |
| 28 #include "chrome/browser/plugins/plugin_prefs.h" | 28 #include "chrome/browser/plugins/plugin_prefs.h" |
| 29 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 29 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
| 30 #include "chrome/browser/prefs/pref_service_syncable.h" | 30 #include "chrome/browser/prefs/pref_service_syncable.h" |
| 31 #include "chrome/browser/ssl/chrome_ssl_host_state_decisions.h" |
| 32 #include "chrome/browser/ssl/chrome_ssl_host_state_decisions_factory.h" |
| 31 #include "chrome/browser/themes/theme_service.h" | 33 #include "chrome/browser/themes/theme_service.h" |
| 32 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" | 34 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" |
| 33 #include "chrome/common/chrome_constants.h" | 35 #include "chrome/common/chrome_constants.h" |
| 34 #include "chrome/common/chrome_paths.h" | 36 #include "chrome/common/chrome_paths.h" |
| 35 #include "chrome/common/chrome_switches.h" | 37 #include "chrome/common/chrome_switches.h" |
| 36 #include "chrome/common/pref_names.h" | 38 #include "chrome/common/pref_names.h" |
| 37 #include "chrome/common/render_messages.h" | 39 #include "chrome/common/render_messages.h" |
| 38 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 40 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
| 39 #include "components/user_prefs/user_prefs.h" | 41 #include "components/user_prefs/user_prefs.h" |
| 40 #include "content/public/browser/browser_thread.h" | 42 #include "content/public/browser/browser_thread.h" |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 #if defined(ENABLE_EXTENSIONS) | 354 #if defined(ENABLE_EXTENSIONS) |
| 353 ExtensionService* extension_service = | 355 ExtensionService* extension_service = |
| 354 extensions::ExtensionSystem::Get(this)->extension_service(); | 356 extensions::ExtensionSystem::Get(this)->extension_service(); |
| 355 if (extension_service) | 357 if (extension_service) |
| 356 host_content_settings_map_->RegisterExtensionService(extension_service); | 358 host_content_settings_map_->RegisterExtensionService(extension_service); |
| 357 #endif | 359 #endif |
| 358 } | 360 } |
| 359 return host_content_settings_map_.get(); | 361 return host_content_settings_map_.get(); |
| 360 } | 362 } |
| 361 | 363 |
| 362 content::BrowserPluginGuestManager* | 364 content::BrowserPluginGuestManager* OffTheRecordProfileImpl::GetGuestManager() { |
| 363 OffTheRecordProfileImpl::GetGuestManager() { | |
| 364 #if defined(ENABLE_EXTENSIONS) | 365 #if defined(ENABLE_EXTENSIONS) |
| 365 return GuestViewManager::FromBrowserContext(this); | 366 return GuestViewManager::FromBrowserContext(this); |
| 366 #else | 367 #else |
| 367 return NULL; | 368 return NULL; |
| 368 #endif | 369 #endif |
| 369 } | 370 } |
| 370 | 371 |
| 371 quota::SpecialStoragePolicy* | 372 quota::SpecialStoragePolicy* |
| 372 OffTheRecordProfileImpl::GetSpecialStoragePolicy() { | 373 OffTheRecordProfileImpl::GetSpecialStoragePolicy() { |
| 373 return GetExtensionSpecialStoragePolicy(); | 374 return GetExtensionSpecialStoragePolicy(); |
| 374 } | 375 } |
| 375 | 376 |
| 376 content::PushMessagingService* | 377 content::PushMessagingService* |
| 377 OffTheRecordProfileImpl::GetPushMessagingService() { | 378 OffTheRecordProfileImpl::GetPushMessagingService() { |
| 378 // TODO(johnme): Support push messaging in incognito if possible. | 379 // TODO(johnme): Support push messaging in incognito if possible. |
| 379 return NULL; | 380 return NULL; |
| 380 } | 381 } |
| 381 | 382 |
| 383 content::SSLHostStateDecisions* |
| 384 OffTheRecordProfileImpl::GetSSLHostStateDecisions() { |
| 385 return ChromeSSLHostStateDecisionsFactory::GetForProfile(this); |
| 386 } |
| 387 |
| 382 bool OffTheRecordProfileImpl::IsSameProfile(Profile* profile) { | 388 bool OffTheRecordProfileImpl::IsSameProfile(Profile* profile) { |
| 383 return (profile == this) || (profile == profile_); | 389 return (profile == this) || (profile == profile_); |
| 384 } | 390 } |
| 385 | 391 |
| 386 Time OffTheRecordProfileImpl::GetStartTime() const { | 392 Time OffTheRecordProfileImpl::GetStartTime() const { |
| 387 return start_time_; | 393 return start_time_; |
| 388 } | 394 } |
| 389 | 395 |
| 390 history::TopSites* OffTheRecordProfileImpl::GetTopSitesWithoutCreating() { | 396 history::TopSites* OffTheRecordProfileImpl::GetTopSitesWithoutCreating() { |
| 391 return NULL; | 397 return NULL; |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { | 530 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { |
| 525 #if defined(OS_CHROMEOS) | 531 #if defined(OS_CHROMEOS) |
| 526 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 532 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
| 527 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 533 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
| 528 g_browser_process->local_state()); | 534 g_browser_process->local_state()); |
| 529 } | 535 } |
| 530 #endif // defined(OS_CHROMEOS) | 536 #endif // defined(OS_CHROMEOS) |
| 531 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 537 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
| 532 GetPrefs(), g_browser_process->local_state()); | 538 GetPrefs(), g_browser_process->local_state()); |
| 533 } | 539 } |
| OLD | NEW |