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 12 matching lines...) Expand all Loading... |
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/themes/theme_service.h" | 31 #include "chrome/browser/themes/theme_service.h" |
32 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" | 32 #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" |
| 33 #include "chrome/browser/wake_lock/chrome_wake_lock_permission_context.h" |
| 34 #include "chrome/browser/wake_lock/chrome_wake_lock_permission_context_factory.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" |
41 #include "content/public/browser/host_zoom_map.h" | 43 #include "content/public/browser/host_zoom_map.h" |
42 #include "content/public/browser/render_process_host.h" | 44 #include "content/public/browser/render_process_host.h" |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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::WakeLockPermissionContext* |
| 385 OffTheRecordProfileImpl::GetWakeLockPermissionContext() { |
| 386 #if defined(OS_IOS) |
| 387 return NULL; |
| 388 #else |
| 389 return ChromeWakeLockPermissionContextFactory::GetForProfile(this); |
| 390 #endif |
| 391 } |
| 392 |
382 bool OffTheRecordProfileImpl::IsSameProfile(Profile* profile) { | 393 bool OffTheRecordProfileImpl::IsSameProfile(Profile* profile) { |
383 return (profile == this) || (profile == profile_); | 394 return (profile == this) || (profile == profile_); |
384 } | 395 } |
385 | 396 |
386 Time OffTheRecordProfileImpl::GetStartTime() const { | 397 Time OffTheRecordProfileImpl::GetStartTime() const { |
387 return start_time_; | 398 return start_time_; |
388 } | 399 } |
389 | 400 |
390 history::TopSites* OffTheRecordProfileImpl::GetTopSitesWithoutCreating() { | 401 history::TopSites* OffTheRecordProfileImpl::GetTopSitesWithoutCreating() { |
391 return NULL; | 402 return NULL; |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { | 535 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { |
525 #if defined(OS_CHROMEOS) | 536 #if defined(OS_CHROMEOS) |
526 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 537 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
527 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 538 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
528 g_browser_process->local_state()); | 539 g_browser_process->local_state()); |
529 } | 540 } |
530 #endif // defined(OS_CHROMEOS) | 541 #endif // defined(OS_CHROMEOS) |
531 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 542 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
532 GetPrefs(), g_browser_process->local_state()); | 543 GetPrefs(), g_browser_process->local_state()); |
533 } | 544 } |
OLD | NEW |