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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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* |
363 OffTheRecordProfileImpl::GetGuestManager() { | 365 OffTheRecordProfileImpl::GetGuestManager() { |
364 #if defined(ENABLE_EXTENSIONS) | 366 #if defined(ENABLE_EXTENSIONS) |
365 return GuestViewManager::FromBrowserContext(this); | 367 return GuestViewManager::FromBrowserContext(this); |
366 #else | 368 #else |
367 return NULL; | 369 return NULL; |
368 #endif | 370 #endif |
369 } | 371 } |
370 | 372 |
371 quota::SpecialStoragePolicy* | 373 quota::SpecialStoragePolicy* |
372 OffTheRecordProfileImpl::GetSpecialStoragePolicy() { | 374 OffTheRecordProfileImpl::GetSpecialStoragePolicy() { |
373 return GetExtensionSpecialStoragePolicy(); | 375 return GetExtensionSpecialStoragePolicy(); |
374 } | 376 } |
375 | 377 |
376 content::PushMessagingService* | 378 content::PushMessagingService* |
377 OffTheRecordProfileImpl::GetPushMessagingService() { | 379 OffTheRecordProfileImpl::GetPushMessagingService() { |
378 // TODO(johnme): Support push messaging in incognito if possible. | 380 // TODO(johnme): Support push messaging in incognito if possible. |
379 return NULL; | 381 return NULL; |
380 } | 382 } |
381 | 383 |
384 content::SSLHostStateDecisions* | |
385 OffTheRecordProfileImpl::GetSSLHostStateDecisions() { | |
386 return ChromeSSLHostStateDecisionsFactory::GetForProfile(this); | |
felt
2014/07/07 22:26:39
how do these changes play with incognito? I assume
jww
2014/07/08 17:35:41
Right. Incognito's behavior effectively remains un
| |
387 } | |
388 | |
382 bool OffTheRecordProfileImpl::IsSameProfile(Profile* profile) { | 389 bool OffTheRecordProfileImpl::IsSameProfile(Profile* profile) { |
383 return (profile == this) || (profile == profile_); | 390 return (profile == this) || (profile == profile_); |
384 } | 391 } |
385 | 392 |
386 Time OffTheRecordProfileImpl::GetStartTime() const { | 393 Time OffTheRecordProfileImpl::GetStartTime() const { |
387 return start_time_; | 394 return start_time_; |
388 } | 395 } |
389 | 396 |
390 history::TopSites* OffTheRecordProfileImpl::GetTopSitesWithoutCreating() { | 397 history::TopSites* OffTheRecordProfileImpl::GetTopSitesWithoutCreating() { |
391 return NULL; | 398 return NULL; |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
524 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { | 531 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { |
525 #if defined(OS_CHROMEOS) | 532 #if defined(OS_CHROMEOS) |
526 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 533 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
527 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 534 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
528 g_browser_process->local_state()); | 535 g_browser_process->local_state()); |
529 } | 536 } |
530 #endif // defined(OS_CHROMEOS) | 537 #endif // defined(OS_CHROMEOS) |
531 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 538 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
532 GetPrefs(), g_browser_process->local_state()); | 539 GetPrefs(), g_browser_process->local_state()); |
533 } | 540 } |
OLD | NEW |