| 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 478 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 489       g_browser_process->safe_browsing_service()); | 489       g_browser_process->safe_browsing_service()); | 
| 490   if (safe_browsing_service.get()) { | 490   if (safe_browsing_service.get()) { | 
| 491     pref_validation_delegate_ = | 491     pref_validation_delegate_ = | 
| 492         safe_browsing_service->CreatePreferenceValidationDelegate(this); | 492         safe_browsing_service->CreatePreferenceValidationDelegate(this); | 
| 493   } | 493   } | 
| 494 | 494 | 
| 495   content::BrowserContext::Initialize(this, path_); | 495   content::BrowserContext::Initialize(this, path_); | 
| 496 | 496 | 
| 497   { | 497   { | 
| 498     service_manager::Connector* connector = nullptr; | 498     service_manager::Connector* connector = nullptr; | 
| 499     if (base::FeatureList::IsEnabled(features::kPrefService)) { | 499     if (features::PrefServiceEnabled()) { | 
| 500       connector = content::BrowserContext::GetConnectorFor(this); | 500       connector = content::BrowserContext::GetConnectorFor(this); | 
| 501     } | 501     } | 
| 502     prefs_ = chrome_prefs::CreateProfilePrefs( | 502     prefs_ = chrome_prefs::CreateProfilePrefs( | 
| 503         path_, sequenced_task_runner, pref_validation_delegate_.get(), | 503         path_, sequenced_task_runner, pref_validation_delegate_.get(), | 
| 504         profile_policy_connector_->policy_service(), supervised_user_settings, | 504         profile_policy_connector_->policy_service(), supervised_user_settings, | 
| 505         CreateExtensionPrefStore(this, false), pref_registry_, async_prefs, | 505         CreateExtensionPrefStore(this, false), pref_registry_, async_prefs, | 
| 506         connector); | 506         connector); | 
| 507     // Register on BrowserContext. | 507     // Register on BrowserContext. | 
| 508     user_prefs::UserPrefs::Set(this, prefs_.get()); | 508     user_prefs::UserPrefs::Set(this, prefs_.get()); | 
| 509   } | 509   } | 
| (...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1061 | 1061 | 
| 1062 net::URLRequestContextGetter* | 1062 net::URLRequestContextGetter* | 
| 1063 ProfileImpl::CreateMediaRequestContextForStoragePartition( | 1063 ProfileImpl::CreateMediaRequestContextForStoragePartition( | 
| 1064     const base::FilePath& partition_path, | 1064     const base::FilePath& partition_path, | 
| 1065     bool in_memory) { | 1065     bool in_memory) { | 
| 1066   return io_data_ | 1066   return io_data_ | 
| 1067       .GetIsolatedMediaRequestContextGetter(partition_path, in_memory).get(); | 1067       .GetIsolatedMediaRequestContextGetter(partition_path, in_memory).get(); | 
| 1068 } | 1068 } | 
| 1069 | 1069 | 
| 1070 void ProfileImpl::RegisterInProcessServices(StaticServiceMap* services) { | 1070 void ProfileImpl::RegisterInProcessServices(StaticServiceMap* services) { | 
| 1071   if (base::FeatureList::IsEnabled(features::kPrefService)) { | 1071   if (features::PrefServiceEnabled()) { | 
| 1072     content::ServiceInfo info; | 1072     content::ServiceInfo info; | 
| 1073     info.factory = base::Bind( | 1073     info.factory = base::Bind( | 
| 1074         &prefs::CreatePrefService, std::set<PrefValueStore::PrefStoreType>(), | 1074         &prefs::CreatePrefService, std::set<PrefValueStore::PrefStoreType>(), | 
| 1075         make_scoped_refptr(content::BrowserThread::GetBlockingPool())); | 1075         make_scoped_refptr(content::BrowserThread::GetBlockingPool())); | 
| 1076     info.task_runner = content::BrowserThread::GetTaskRunnerForThread( | 1076     info.task_runner = content::BrowserThread::GetTaskRunnerForThread( | 
| 1077         content::BrowserThread::IO); | 1077         content::BrowserThread::IO); | 
| 1078     services->insert(std::make_pair(prefs::mojom::kPrefStoreServiceName, info)); | 1078     services->insert(std::make_pair(prefs::mojom::kPrefStoreServiceName, info)); | 
| 1079   } | 1079   } | 
| 1080 | 1080 | 
| 1081   content::ServiceInfo identity_service_info; | 1081   content::ServiceInfo identity_service_info; | 
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1346     return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>(); | 1346     return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>(); | 
| 1347 | 1347 | 
| 1348   return service->CreateMonitor( | 1348   return service->CreateMonitor( | 
| 1349       BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); | 1349       BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); | 
| 1350 } | 1350 } | 
| 1351 | 1351 | 
| 1352 std::unique_ptr<service_manager::Service> ProfileImpl::CreateIdentityService() { | 1352 std::unique_ptr<service_manager::Service> ProfileImpl::CreateIdentityService() { | 
| 1353   SigninManagerBase* signin_manager = SigninManagerFactory::GetForProfile(this); | 1353   SigninManagerBase* signin_manager = SigninManagerFactory::GetForProfile(this); | 
| 1354   return base::MakeUnique<identity::IdentityService>(signin_manager); | 1354   return base::MakeUnique<identity::IdentityService>(signin_manager); | 
| 1355 } | 1355 } | 
| OLD | NEW | 
|---|