| 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/content_settings/content_settings_supervised_provider.h
" |
| 85 #include "chrome/browser/supervised_user/supervised_user_settings_service.h" |
| 86 #include "chrome/browser/supervised_user/supervised_user_settings_service_factor
y.h" |
| 87 #endif |
| 88 |
| 83 using content::BrowserThread; | 89 using content::BrowserThread; |
| 84 using content::DownloadManagerDelegate; | 90 using content::DownloadManagerDelegate; |
| 85 using content::HostZoomMap; | 91 using content::HostZoomMap; |
| 86 | 92 |
| 87 #if defined(ENABLE_EXTENSIONS) | 93 #if defined(ENABLE_EXTENSIONS) |
| 88 namespace { | 94 namespace { |
| 89 | 95 |
| 90 void NotifyOTRProfileCreatedOnIOThread(void* original_profile, | 96 void NotifyOTRProfileCreatedOnIOThread(void* original_profile, |
| 91 void* otr_profile) { | 97 void* otr_profile) { |
| 92 ExtensionWebRequestEventRouter::GetInstance()->OnOTRBrowserContextCreated( | 98 ExtensionWebRequestEventRouter::GetInstance()->OnOTRBrowserContextCreated( |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 if (!host_content_settings_map_.get()) { | 391 if (!host_content_settings_map_.get()) { |
| 386 host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), true); | 392 host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), true); |
| 387 #if defined(ENABLE_EXTENSIONS) | 393 #if defined(ENABLE_EXTENSIONS) |
| 388 ExtensionService* extension_service = | 394 ExtensionService* extension_service = |
| 389 extensions::ExtensionSystem::Get(this)->extension_service(); | 395 extensions::ExtensionSystem::Get(this)->extension_service(); |
| 390 if (extension_service) { | 396 if (extension_service) { |
| 391 extension_service->RegisterContentSettings( | 397 extension_service->RegisterContentSettings( |
| 392 host_content_settings_map_.get()); | 398 host_content_settings_map_.get()); |
| 393 } | 399 } |
| 394 #endif | 400 #endif |
| 401 #if defined(ENABLE_SUPERVISED_USERS) |
| 402 SupervisedUserSettingsService* supervised_service = |
| 403 SupervisedUserSettingsServiceFactory::GetForProfile(this); |
| 404 scoped_ptr<content_settings::SupervisedProvider> supervised_provider( |
| 405 new content_settings::SupervisedProvider(supervised_service)); |
| 406 host_content_settings_map_->RegisterProvider( |
| 407 HostContentSettingsMap::SUPERVISED_PROVIDER, |
| 408 supervised_provider.Pass()); |
| 409 #endif |
| 395 } | 410 } |
| 396 return host_content_settings_map_.get(); | 411 return host_content_settings_map_.get(); |
| 397 } | 412 } |
| 398 | 413 |
| 399 content::BrowserPluginGuestManager* OffTheRecordProfileImpl::GetGuestManager() { | 414 content::BrowserPluginGuestManager* OffTheRecordProfileImpl::GetGuestManager() { |
| 400 #if defined(ENABLE_EXTENSIONS) | 415 #if defined(ENABLE_EXTENSIONS) |
| 401 return extensions::GuestViewManager::FromBrowserContext(this); | 416 return extensions::GuestViewManager::FromBrowserContext(this); |
| 402 #else | 417 #else |
| 403 return NULL; | 418 return NULL; |
| 404 #endif | 419 #endif |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { | 582 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { |
| 568 #if defined(OS_CHROMEOS) | 583 #if defined(OS_CHROMEOS) |
| 569 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 584 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
| 570 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 585 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
| 571 g_browser_process->local_state()); | 586 g_browser_process->local_state()); |
| 572 } | 587 } |
| 573 #endif // defined(OS_CHROMEOS) | 588 #endif // defined(OS_CHROMEOS) |
| 574 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 589 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
| 575 GetPrefs(), g_browser_process->local_state()); | 590 GetPrefs(), g_browser_process->local_state()); |
| 576 } | 591 } |
| OLD | NEW |