| 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/profile_impl.h" | 5 #include "chrome/browser/profiles/profile_impl.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 #include "extensions/browser/extension_pref_value_map.h" | 104 #include "extensions/browser/extension_pref_value_map.h" |
| 105 #include "extensions/browser/extension_pref_value_map_factory.h" | 105 #include "extensions/browser/extension_pref_value_map_factory.h" |
| 106 #include "extensions/browser/extension_system.h" | 106 #include "extensions/browser/extension_system.h" |
| 107 #include "grit/chromium_strings.h" | 107 #include "grit/chromium_strings.h" |
| 108 #include "grit/generated_resources.h" | 108 #include "grit/generated_resources.h" |
| 109 #include "ui/base/l10n/l10n_util.h" | 109 #include "ui/base/l10n/l10n_util.h" |
| 110 | 110 |
| 111 #if defined(OS_ANDROID) | 111 #if defined(OS_ANDROID) |
| 112 #include "chrome/browser/media/protected_media_identifier_permission_context.h" | 112 #include "chrome/browser/media/protected_media_identifier_permission_context.h" |
| 113 #include "chrome/browser/media/protected_media_identifier_permission_context_fac
tory.h" | 113 #include "chrome/browser/media/protected_media_identifier_permission_context_fac
tory.h" |
| 114 #if defined(FULL_SAFE_BROWSING) | |
| 115 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | |
| 116 #endif | |
| 117 #endif | 114 #endif |
| 118 | 115 |
| 119 #if defined(OS_CHROMEOS) | 116 #if defined(OS_CHROMEOS) |
| 120 #include "chrome/browser/chromeos/locale_change_guard.h" | 117 #include "chrome/browser/chromeos/locale_change_guard.h" |
| 121 #include "chrome/browser/chromeos/login/users/user_manager.h" | 118 #include "chrome/browser/chromeos/login/users/user_manager.h" |
| 122 #include "chrome/browser/chromeos/preferences.h" | 119 #include "chrome/browser/chromeos/preferences.h" |
| 123 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 120 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 124 #endif | 121 #endif |
| 125 | 122 |
| 126 #if defined(ENABLE_CONFIGURATION_POLICY) | 123 #if defined(ENABLE_CONFIGURATION_POLICY) |
| (...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 } | 791 } |
| 795 | 792 |
| 796 Profile* ProfileImpl::GetOriginalProfile() { | 793 Profile* ProfileImpl::GetOriginalProfile() { |
| 797 return this; | 794 return this; |
| 798 } | 795 } |
| 799 | 796 |
| 800 bool ProfileImpl::IsSupervised() { | 797 bool ProfileImpl::IsSupervised() { |
| 801 return !GetPrefs()->GetString(prefs::kSupervisedUserId).empty(); | 798 return !GetPrefs()->GetString(prefs::kSupervisedUserId).empty(); |
| 802 } | 799 } |
| 803 | 800 |
| 804 ExtensionService* ProfileImpl::GetExtensionService() { | |
| 805 return extensions::ExtensionSystem::Get(this)->extension_service(); | |
| 806 } | |
| 807 | |
| 808 ExtensionSpecialStoragePolicy* | 801 ExtensionSpecialStoragePolicy* |
| 809 ProfileImpl::GetExtensionSpecialStoragePolicy() { | 802 ProfileImpl::GetExtensionSpecialStoragePolicy() { |
| 810 if (!extension_special_storage_policy_.get()) { | 803 if (!extension_special_storage_policy_.get()) { |
| 811 TRACE_EVENT0("browser", "ProfileImpl::GetExtensionSpecialStoragePolicy") | 804 TRACE_EVENT0("browser", "ProfileImpl::GetExtensionSpecialStoragePolicy") |
| 812 extension_special_storage_policy_ = new ExtensionSpecialStoragePolicy( | 805 extension_special_storage_policy_ = new ExtensionSpecialStoragePolicy( |
| 813 CookieSettings::Factory::GetForProfile(this).get()); | 806 CookieSettings::Factory::GetForProfile(this).get()); |
| 814 } | 807 } |
| 815 return extension_special_storage_policy_.get(); | 808 return extension_special_storage_policy_.get(); |
| 816 } | 809 } |
| 817 | 810 |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1316 ProfileImpl::CreateDomainReliabilityMonitor() { | 1309 ProfileImpl::CreateDomainReliabilityMonitor() { |
| 1317 domain_reliability::DomainReliabilityService* service = | 1310 domain_reliability::DomainReliabilityService* service = |
| 1318 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> | 1311 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> |
| 1319 GetForBrowserContext(this); | 1312 GetForBrowserContext(this); |
| 1320 if (!service) | 1313 if (!service) |
| 1321 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); | 1314 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); |
| 1322 | 1315 |
| 1323 return service->CreateMonitor( | 1316 return service->CreateMonitor( |
| 1324 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | 1317 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); |
| 1325 } | 1318 } |
| OLD | NEW |