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

Unified Diff: services/preferences/public/cpp/persistent_pref_store_client.cc

Issue 2791903003: Pref service: have Mash and Chrome connect to the right pref stores (Closed)
Patch Set: ProfilePrefStoreManagerTest: explicit list stores to connect to Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: services/preferences/public/cpp/persistent_pref_store_client.cc
diff --git a/services/preferences/public/cpp/persistent_pref_store_client.cc b/services/preferences/public/cpp/persistent_pref_store_client.cc
index 62fdd27ad4f732bce06d58da5daaaa139b88b00f..353ac4c72d3a90a62b6cb62bd2d4d37e69642123 100644
--- a/services/preferences/public/cpp/persistent_pref_store_client.cc
+++ b/services/preferences/public/cpp/persistent_pref_store_client.cc
@@ -15,9 +15,11 @@ namespace prefs {
PersistentPrefStoreClient::PersistentPrefStoreClient(
mojom::PrefStoreConnectorPtr connector,
- scoped_refptr<PrefRegistry> pref_registry)
+ scoped_refptr<PrefRegistry> pref_registry,
+ std::vector<PrefValueStore::PrefStoreType> already_connected_types)
: connector_(std::move(connector)),
- pref_registry_(std::move(pref_registry)) {
+ pref_registry_(std::move(pref_registry)),
+ already_connected_types_(std::move(already_connected_types)) {
DCHECK(connector_);
}
@@ -84,7 +86,8 @@ PersistentPrefStore::PrefReadError PersistentPrefStoreClient::ReadPrefs() {
prefs::mojom::PrefStoreConnectionPtr>
other_pref_stores;
mojo::SyncCallRestrictions::ScopedAllowSyncCall allow_sync_calls;
- if (!connector_->Connect(SerializePrefRegistry(*pref_registry_), &connection,
+ if (!connector_->Connect(SerializePrefRegistry(*pref_registry_),
+ already_connected_types_, &connection,
&other_pref_stores)) {
NOTREACHED();
}
@@ -97,6 +100,7 @@ void PersistentPrefStoreClient::ReadPrefsAsync(
ReadErrorDelegate* error_delegate) {
error_delegate_.reset(error_delegate);
connector_->Connect(SerializePrefRegistry(*pref_registry_),
+ already_connected_types_,
base::Bind(&PersistentPrefStoreClient::OnConnect,
base::Unretained(this)));
pref_registry_ = nullptr;
« no previous file with comments | « services/preferences/public/cpp/persistent_pref_store_client.h ('k') | services/preferences/public/cpp/pref_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698