| 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 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1060 return io_data_ | 1060 return io_data_ |
| 1061 .GetIsolatedMediaRequestContextGetter(partition_path, in_memory).get(); | 1061 .GetIsolatedMediaRequestContextGetter(partition_path, in_memory).get(); |
| 1062 } | 1062 } |
| 1063 | 1063 |
| 1064 void ProfileImpl::RegisterInProcessServices(StaticServiceMap* services) { | 1064 void ProfileImpl::RegisterInProcessServices(StaticServiceMap* services) { |
| 1065 if (base::FeatureList::IsEnabled(features::kPrefService)) { | 1065 if (base::FeatureList::IsEnabled(features::kPrefService)) { |
| 1066 content::ServiceInfo info; | 1066 content::ServiceInfo info; |
| 1067 info.factory = | 1067 info.factory = |
| 1068 base::Bind([]() -> std::unique_ptr<service_manager::Service> { | 1068 base::Bind([]() -> std::unique_ptr<service_manager::Service> { |
| 1069 return base::MakeUnique<prefs::PrefStoreManagerImpl>( | 1069 return base::MakeUnique<prefs::PrefStoreManagerImpl>( |
| 1070 prefs::PrefStoreManagerImpl::PrefStoreTypes()); | 1070 prefs::PrefStoreManagerImpl::PrefStoreTypes(), |
| 1071 content::BrowserThread::GetBlockingPool()); |
| 1071 }); | 1072 }); |
| 1072 services->insert(std::make_pair(prefs::mojom::kPrefStoreServiceName, info)); | 1073 services->insert(std::make_pair(prefs::mojom::kPrefStoreServiceName, info)); |
| 1073 } | 1074 } |
| 1074 } | 1075 } |
| 1075 | 1076 |
| 1076 bool ProfileImpl::IsSameProfile(Profile* profile) { | 1077 bool ProfileImpl::IsSameProfile(Profile* profile) { |
| 1077 if (profile == static_cast<Profile*>(this)) | 1078 if (profile == static_cast<Profile*>(this)) |
| 1078 return true; | 1079 return true; |
| 1079 Profile* otr_profile = off_the_record_profile_.get(); | 1080 Profile* otr_profile = off_the_record_profile_.get(); |
| 1080 return otr_profile && profile == otr_profile; | 1081 return otr_profile && profile == otr_profile; |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1322 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { | 1323 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { |
| 1323 domain_reliability::DomainReliabilityService* service = | 1324 domain_reliability::DomainReliabilityService* service = |
| 1324 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> | 1325 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> |
| 1325 GetForBrowserContext(this); | 1326 GetForBrowserContext(this); |
| 1326 if (!service) | 1327 if (!service) |
| 1327 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>(); | 1328 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>(); |
| 1328 | 1329 |
| 1329 return service->CreateMonitor( | 1330 return service->CreateMonitor( |
| 1330 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); | 1331 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); |
| 1331 } | 1332 } |
| OLD | NEW |