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

Side by Side Diff: components/sync_preferences/pref_service_syncable_factory.cc

Issue 2778733003: Pref service: delete old implementation (Closed)
Patch Set: Fix missed merge 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 unified diff | Download patch
« no previous file with comments | « chrome/test/BUILD.gn ('k') | services/preferences/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/sync_preferences/pref_service_syncable_factory.h" 5 #include "components/sync_preferences/pref_service_syncable_factory.h"
6 6
7 #include "base/trace_event/trace_event.h" 7 #include "base/trace_event/trace_event.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "components/pref_registry/pref_registry_syncable.h" 9 #include "components/pref_registry/pref_registry_syncable.h"
10 #include "components/prefs/default_pref_store.h" 10 #include "components/prefs/default_pref_store.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 scoped_refptr<::PrefStore> CreateRegisteredPrefStore( 61 scoped_refptr<::PrefStore> CreateRegisteredPrefStore(
62 service_manager::Connector* connector, 62 service_manager::Connector* connector,
63 scoped_refptr<::PrefStore> backing_pref_store, 63 scoped_refptr<::PrefStore> backing_pref_store,
64 PrefValueStore::PrefStoreType type) { 64 PrefValueStore::PrefStoreType type) {
65 // If we're testing or if the prefs service feature flag is off we don't 65 // If we're testing or if the prefs service feature flag is off we don't
66 // register. 66 // register.
67 if (!connector || !backing_pref_store) 67 if (!connector || !backing_pref_store)
68 return backing_pref_store; 68 return backing_pref_store;
69 69
70 prefs::mojom::PrefStoreRegistryPtr registry_ptr; 70 prefs::mojom::PrefStoreRegistryPtr registry_ptr;
71 connector->BindInterface(prefs::mojom::kPrefStoreServiceName, &registry_ptr); 71 connector->BindInterface(prefs::mojom::kServiceName, &registry_ptr);
72 return make_scoped_refptr(new prefs::PrefStoreAdapter( 72 return make_scoped_refptr(new prefs::PrefStoreAdapter(
73 backing_pref_store, prefs::PrefStoreImpl::Create( 73 backing_pref_store, prefs::PrefStoreImpl::Create(
74 registry_ptr.get(), backing_pref_store, type))); 74 registry_ptr.get(), backing_pref_store, type)));
75 } 75 }
76 76
77 } // namespace 77 } // namespace
78 78
79 std::unique_ptr<PrefServiceSyncable> PrefServiceSyncableFactory::CreateSyncable( 79 std::unique_ptr<PrefServiceSyncable> PrefServiceSyncableFactory::CreateSyncable(
80 user_prefs::PrefRegistrySyncable* pref_registry, 80 user_prefs::PrefRegistrySyncable* pref_registry,
81 service_manager::Connector* connector) { 81 service_manager::Connector* connector) {
(...skipping 18 matching lines...) Expand all
100 new PrefValueStore(managed.get(), supervised.get(), extension.get(), 100 new PrefValueStore(managed.get(), supervised.get(), extension.get(),
101 command_line.get(), user_prefs_.get(), 101 command_line.get(), user_prefs_.get(),
102 recommended.get(), pref_registry->defaults().get(), 102 recommended.get(), pref_registry->defaults().get(),
103 pref_notifier), 103 pref_notifier),
104 user_prefs_.get(), pref_registry, pref_model_associator_client_, 104 user_prefs_.get(), pref_registry, pref_model_associator_client_,
105 read_error_callback_, async_)); 105 read_error_callback_, async_));
106 return pref_service; 106 return pref_service;
107 } 107 }
108 108
109 } // namespace sync_preferences 109 } // namespace sync_preferences
OLDNEW
« no previous file with comments | « chrome/test/BUILD.gn ('k') | services/preferences/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698