| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 #include "content/public/browser/storage_partition.h" | 112 #include "content/public/browser/storage_partition.h" |
| 113 #include "content/public/browser/url_data_source.h" | 113 #include "content/public/browser/url_data_source.h" |
| 114 #include "content/public/browser/user_metrics.h" | 114 #include "content/public/browser/user_metrics.h" |
| 115 #include "content/public/common/content_constants.h" | 115 #include "content/public/common/content_constants.h" |
| 116 #include "content/public/common/page_zoom.h" | 116 #include "content/public/common/page_zoom.h" |
| 117 #include "extensions/features/features.h" | 117 #include "extensions/features/features.h" |
| 118 #include "ppapi/features/features.h" | 118 #include "ppapi/features/features.h" |
| 119 #include "printing/features/features.h" | 119 #include "printing/features/features.h" |
| 120 #include "ui/base/l10n/l10n_util.h" | 120 #include "ui/base/l10n/l10n_util.h" |
| 121 | 121 |
| 122 #include "content/public/common/service_manager_connection.h" |
| 123 |
| 122 #if defined(OS_CHROMEOS) | 124 #if defined(OS_CHROMEOS) |
| 123 #include "chrome/browser/chromeos/locale_change_guard.h" | 125 #include "chrome/browser/chromeos/locale_change_guard.h" |
| 124 #include "chrome/browser/chromeos/preferences.h" | 126 #include "chrome/browser/chromeos/preferences.h" |
| 125 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 127 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 126 #include "components/user_manager/user_manager.h" | 128 #include "components/user_manager/user_manager.h" |
| 127 #endif | 129 #endif |
| 128 | 130 |
| 129 #if BUILDFLAG(ENABLE_BACKGROUND) | 131 #if BUILDFLAG(ENABLE_BACKGROUND) |
| 130 #include "chrome/browser/background/background_mode_manager.h" | 132 #include "chrome/browser/background/background_mode_manager.h" |
| 131 #endif | 133 #endif |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 pref_validation_delegate_ = | 483 pref_validation_delegate_ = |
| 482 safe_browsing_service->CreatePreferenceValidationDelegate(this); | 484 safe_browsing_service->CreatePreferenceValidationDelegate(this); |
| 483 } | 485 } |
| 484 | 486 |
| 485 content::BrowserContext::Initialize(this, path_); | 487 content::BrowserContext::Initialize(this, path_); |
| 486 | 488 |
| 487 { | 489 { |
| 488 prefs_ = chrome_prefs::CreateProfilePrefs( | 490 prefs_ = chrome_prefs::CreateProfilePrefs( |
| 489 path_, sequenced_task_runner, pref_validation_delegate_.get(), | 491 path_, sequenced_task_runner, pref_validation_delegate_.get(), |
| 490 profile_policy_connector_->policy_service(), supervised_user_settings, | 492 profile_policy_connector_->policy_service(), supervised_user_settings, |
| 491 CreateExtensionPrefStore(this, false), pref_registry_, async_prefs); | 493 CreateExtensionPrefStore(this, false), pref_registry_, async_prefs, |
| 494 // content::ServiceManagerConnection::GetForProcess()->GetConnector()); |
| 495 content::BrowserContext::GetConnectorFor(this)); |
| 492 // Register on BrowserContext. | 496 // Register on BrowserContext. |
| 493 user_prefs::UserPrefs::Set(this, prefs_.get()); | 497 user_prefs::UserPrefs::Set(this, prefs_.get()); |
| 494 } | 498 } |
| 495 | 499 |
| 496 if (async_prefs) { | 500 if (async_prefs) { |
| 497 // Wait for the notification that prefs has been loaded | 501 // Wait for the notification that prefs has been loaded |
| 498 // (successfully or not). Note that we can use base::Unretained | 502 // (successfully or not). Note that we can use base::Unretained |
| 499 // because the PrefService is owned by this class and lives on | 503 // because the PrefService is owned by this class and lives on |
| 500 // the same thread. | 504 // the same thread. |
| 501 prefs_->AddPrefInitObserver(base::Bind( | 505 prefs_->AddPrefInitObserver(base::Bind( |
| (...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1289 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { | 1293 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { |
| 1290 domain_reliability::DomainReliabilityService* service = | 1294 domain_reliability::DomainReliabilityService* service = |
| 1291 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> | 1295 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> |
| 1292 GetForBrowserContext(this); | 1296 GetForBrowserContext(this); |
| 1293 if (!service) | 1297 if (!service) |
| 1294 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>(); | 1298 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>(); |
| 1295 | 1299 |
| 1296 return service->CreateMonitor( | 1300 return service->CreateMonitor( |
| 1297 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); | 1301 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); |
| 1298 } | 1302 } |
| OLD | NEW |