| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 | 794 |
| 795 bool ProfileImpl::IsLegacySupervised() const { | 795 bool ProfileImpl::IsLegacySupervised() const { |
| 796 return IsSupervised() && !IsChild(); | 796 return IsSupervised() && !IsChild(); |
| 797 } | 797 } |
| 798 | 798 |
| 799 ExtensionSpecialStoragePolicy* | 799 ExtensionSpecialStoragePolicy* |
| 800 ProfileImpl::GetExtensionSpecialStoragePolicy() { | 800 ProfileImpl::GetExtensionSpecialStoragePolicy() { |
| 801 #if defined(ENABLE_EXTENSIONS) | 801 #if defined(ENABLE_EXTENSIONS) |
| 802 if (!extension_special_storage_policy_.get()) { | 802 if (!extension_special_storage_policy_.get()) { |
| 803 TRACE_EVENT0("browser", "ProfileImpl::GetExtensionSpecialStoragePolicy") | 803 TRACE_EVENT0("browser", "ProfileImpl::GetExtensionSpecialStoragePolicy") |
| 804 extension_special_storage_policy_ = new ExtensionSpecialStoragePolicy(this); | 804 extension_special_storage_policy_ = new ExtensionSpecialStoragePolicy( |
| 805 CookieSettingsFactory::GetForProfile(this).get()); |
| 805 } | 806 } |
| 806 return extension_special_storage_policy_.get(); | 807 return extension_special_storage_policy_.get(); |
| 807 #else | 808 #else |
| 808 return NULL; | 809 return NULL; |
| 809 #endif | 810 #endif |
| 810 } | 811 } |
| 811 | 812 |
| 812 void ProfileImpl::OnLocaleReady() { | 813 void ProfileImpl::OnLocaleReady() { |
| 813 TRACE_EVENT0("browser", "ProfileImpl::OnLocaleReady"); | 814 TRACE_EVENT0("browser", "ProfileImpl::OnLocaleReady"); |
| 814 SCOPED_UMA_HISTOGRAM_TIMER("Profile.OnLocaleReadyTime"); | 815 SCOPED_UMA_HISTOGRAM_TIMER("Profile.OnLocaleReadyTime"); |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1270 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { | 1271 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { |
| 1271 domain_reliability::DomainReliabilityService* service = | 1272 domain_reliability::DomainReliabilityService* service = |
| 1272 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> | 1273 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> |
| 1273 GetForBrowserContext(this); | 1274 GetForBrowserContext(this); |
| 1274 if (!service) | 1275 if (!service) |
| 1275 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>(); | 1276 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>(); |
| 1276 | 1277 |
| 1277 return service->CreateMonitor( | 1278 return service->CreateMonitor( |
| 1278 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); | 1279 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); |
| 1279 } | 1280 } |
| OLD | NEW |