OLD | NEW |
(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 |
OLD | NEW |