Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: chrome/browser/profiles/profile_impl.cc

Issue 2635153002: Pref service: expose all read-only PrefStores through Mojo (Closed)
Patch Set: Address review comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 pref_validation_delegate_ = 484 pref_validation_delegate_ =
485 safe_browsing_service->CreatePreferenceValidationDelegate(this); 485 safe_browsing_service->CreatePreferenceValidationDelegate(this);
486 } 486 }
487 487
488 content::BrowserContext::Initialize(this, path_); 488 content::BrowserContext::Initialize(this, path_);
489 489
490 { 490 {
491 prefs_ = chrome_prefs::CreateProfilePrefs( 491 prefs_ = chrome_prefs::CreateProfilePrefs(
492 path_, sequenced_task_runner, pref_validation_delegate_.get(), 492 path_, sequenced_task_runner, pref_validation_delegate_.get(),
493 profile_policy_connector_->policy_service(), supervised_user_settings, 493 profile_policy_connector_->policy_service(), supervised_user_settings,
494 CreateExtensionPrefStore(this, false), pref_registry_, async_prefs); 494 CreateExtensionPrefStore(this, false), pref_registry_, async_prefs,
495 content::BrowserContext::GetConnectorFor(this));
495 // Register on BrowserContext. 496 // Register on BrowserContext.
496 user_prefs::UserPrefs::Set(this, prefs_.get()); 497 user_prefs::UserPrefs::Set(this, prefs_.get());
497 } 498 }
498 499
499 if (async_prefs) { 500 if (async_prefs) {
500 // Wait for the notification that prefs has been loaded 501 // Wait for the notification that prefs has been loaded
501 // (successfully or not). Note that we can use base::Unretained 502 // (successfully or not). Note that we can use base::Unretained
502 // because the PrefService is owned by this class and lives on 503 // because the PrefService is owned by this class and lives on
503 // the same thread. 504 // the same thread.
504 prefs_->AddPrefInitObserver(base::Bind( 505 prefs_->AddPrefInitObserver(base::Bind(
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
1292 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { 1293 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) {
1293 domain_reliability::DomainReliabilityService* service = 1294 domain_reliability::DomainReliabilityService* service =
1294 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> 1295 domain_reliability::DomainReliabilityServiceFactory::GetInstance()->
1295 GetForBrowserContext(this); 1296 GetForBrowserContext(this);
1296 if (!service) 1297 if (!service)
1297 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>(); 1298 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>();
1298 1299
1299 return service->CreateMonitor( 1300 return service->CreateMonitor(
1300 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); 1301 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
1301 } 1302 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698