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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 #if defined(ENABLE_EXTENSIONS) | 74 #if defined(ENABLE_EXTENSIONS) |
75 #include "chrome/browser/extensions/extension_service.h" | 75 #include "chrome/browser/extensions/extension_service.h" |
76 #include "chrome/browser/extensions/extension_special_storage_policy.h" | 76 #include "chrome/browser/extensions/extension_special_storage_policy.h" |
77 #include "extensions/browser/api/web_request/web_request_api.h" | 77 #include "extensions/browser/api/web_request/web_request_api.h" |
78 #include "extensions/browser/extension_system.h" | 78 #include "extensions/browser/extension_system.h" |
79 #include "extensions/browser/guest_view/guest_view_manager.h" | 79 #include "extensions/browser/guest_view/guest_view_manager.h" |
80 #include "extensions/common/extension.h" | 80 #include "extensions/common/extension.h" |
81 #endif | 81 #endif |
82 | 82 |
| 83 #if defined(ENABLE_SUPERVISED_USERS) |
| 84 #include "chrome/browser/supervised_user/supervised_user_settings_service.h" |
| 85 #include "chrome/browser/supervised_user/supervised_user_settings_service_factor
y.h" |
| 86 #endif |
| 87 |
83 using content::BrowserThread; | 88 using content::BrowserThread; |
84 using content::DownloadManagerDelegate; | 89 using content::DownloadManagerDelegate; |
85 using content::HostZoomMap; | 90 using content::HostZoomMap; |
86 | 91 |
87 #if defined(ENABLE_EXTENSIONS) | 92 #if defined(ENABLE_EXTENSIONS) |
88 namespace { | 93 namespace { |
89 | 94 |
90 void NotifyOTRProfileCreatedOnIOThread(void* original_profile, | 95 void NotifyOTRProfileCreatedOnIOThread(void* original_profile, |
91 void* otr_profile) { | 96 void* otr_profile) { |
92 ExtensionWebRequestEventRouter::GetInstance()->OnOTRBrowserContextCreated( | 97 ExtensionWebRequestEventRouter::GetInstance()->OnOTRBrowserContextCreated( |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 if (!host_content_settings_map_.get()) { | 390 if (!host_content_settings_map_.get()) { |
386 host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), true); | 391 host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), true); |
387 #if defined(ENABLE_EXTENSIONS) | 392 #if defined(ENABLE_EXTENSIONS) |
388 ExtensionService* extension_service = | 393 ExtensionService* extension_service = |
389 extensions::ExtensionSystem::Get(this)->extension_service(); | 394 extensions::ExtensionSystem::Get(this)->extension_service(); |
390 if (extension_service) { | 395 if (extension_service) { |
391 extension_service->RegisterContentSettings( | 396 extension_service->RegisterContentSettings( |
392 host_content_settings_map_.get()); | 397 host_content_settings_map_.get()); |
393 } | 398 } |
394 #endif | 399 #endif |
| 400 #if defined(ENABLE_SUPERVISED_USERS) |
| 401 SupervisedUserSettingsService* supervised_service = |
| 402 SupervisedUserSettingsServiceFactory::GetForProfile(this); |
| 403 supervised_service->RegisterContentSettings( |
| 404 host_content_settings_map_.get()); |
| 405 #endif |
395 } | 406 } |
396 return host_content_settings_map_.get(); | 407 return host_content_settings_map_.get(); |
397 } | 408 } |
398 | 409 |
399 content::BrowserPluginGuestManager* OffTheRecordProfileImpl::GetGuestManager() { | 410 content::BrowserPluginGuestManager* OffTheRecordProfileImpl::GetGuestManager() { |
400 #if defined(ENABLE_EXTENSIONS) | 411 #if defined(ENABLE_EXTENSIONS) |
401 return extensions::GuestViewManager::FromBrowserContext(this); | 412 return extensions::GuestViewManager::FromBrowserContext(this); |
402 #else | 413 #else |
403 return NULL; | 414 return NULL; |
404 #endif | 415 #endif |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { | 578 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { |
568 #if defined(OS_CHROMEOS) | 579 #if defined(OS_CHROMEOS) |
569 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 580 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
570 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 581 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
571 g_browser_process->local_state()); | 582 g_browser_process->local_state()); |
572 } | 583 } |
573 #endif // defined(OS_CHROMEOS) | 584 #endif // defined(OS_CHROMEOS) |
574 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 585 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
575 GetPrefs(), g_browser_process->local_state()); | 586 GetPrefs(), g_browser_process->local_state()); |
576 } | 587 } |
OLD | NEW |