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

Side by Side Diff: services/preferences/public/cpp/pref_store_adapter.cc

Issue 2635153002: Pref service: expose all read-only PrefStores through Mojo (Closed)
Patch Set: Address bauerb's 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "services/preferences/public/cpp/pref_store_adapter.h"
6
7 namespace prefs {
8
9 PrefStoreAdapter::PrefStoreAdapter(scoped_refptr<PrefStore> pref_store,
10 std::unique_ptr<PrefStoreImpl> impl)
11 : pref_store_(std::move(pref_store)), impl_(std::move(impl)) {}
12
13 void PrefStoreAdapter::AddObserver(PrefStore::Observer* observer) {
14 pref_store_->AddObserver(observer);
15 }
16
17 void PrefStoreAdapter::RemoveObserver(PrefStore::Observer* observer) {
18 pref_store_->RemoveObserver(observer);
19 }
20
21 bool PrefStoreAdapter::HasObservers() const {
22 return pref_store_->HasObservers();
23 }
24
25 bool PrefStoreAdapter::IsInitializationComplete() const {
26 return pref_store_->IsInitializationComplete();
27 }
28
29 bool PrefStoreAdapter::GetValue(const std::string& key,
30 const base::Value** result) const {
31 return pref_store_->GetValue(key, result);
32 }
33
34 std::unique_ptr<base::DictionaryValue> PrefStoreAdapter::GetValues() const {
35 return pref_store_->GetValues();
36 }
37
38 PrefStoreAdapter::~PrefStoreAdapter() = default;
39
40 } // namespace prefs
OLDNEW
« no previous file with comments | « services/preferences/public/cpp/pref_store_adapter.h ('k') | services/preferences/public/cpp/pref_store_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698