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

Side by Side Diff: components/prefs/default_pref_store.cc

Issue 2704133006: Revert of Add PrefStore::GetValues (Closed)
Patch Set: Created 3 years, 10 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 | « components/prefs/default_pref_store.h ('k') | components/prefs/in_memory_pref_store.h » ('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 (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 "components/prefs/default_pref_store.h" 5 #include "components/prefs/default_pref_store.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 10
11 using base::Value; 11 using base::Value;
12 12
13 DefaultPrefStore::DefaultPrefStore() {} 13 DefaultPrefStore::DefaultPrefStore() {}
14 14
15 bool DefaultPrefStore::GetValue(const std::string& key, 15 bool DefaultPrefStore::GetValue(const std::string& key,
16 const Value** result) const { 16 const Value** result) const {
17 return prefs_.GetValue(key, result); 17 return prefs_.GetValue(key, result);
18 } 18 }
19 19
20 std::unique_ptr<base::DictionaryValue> DefaultPrefStore::GetValues() const {
21 return prefs_.AsDictionaryValue();
22 }
23
24 void DefaultPrefStore::AddObserver(PrefStore::Observer* observer) { 20 void DefaultPrefStore::AddObserver(PrefStore::Observer* observer) {
25 observers_.AddObserver(observer); 21 observers_.AddObserver(observer);
26 } 22 }
27 23
28 void DefaultPrefStore::RemoveObserver(PrefStore::Observer* observer) { 24 void DefaultPrefStore::RemoveObserver(PrefStore::Observer* observer) {
29 observers_.RemoveObserver(observer); 25 observers_.RemoveObserver(observer);
30 } 26 }
31 27
32 bool DefaultPrefStore::HasObservers() const { 28 bool DefaultPrefStore::HasObservers() const {
33 return observers_.might_have_observers(); 29 return observers_.might_have_observers();
(...skipping 19 matching lines...) Expand all
53 49
54 DefaultPrefStore::const_iterator DefaultPrefStore::begin() const { 50 DefaultPrefStore::const_iterator DefaultPrefStore::begin() const {
55 return prefs_.begin(); 51 return prefs_.begin();
56 } 52 }
57 53
58 DefaultPrefStore::const_iterator DefaultPrefStore::end() const { 54 DefaultPrefStore::const_iterator DefaultPrefStore::end() const {
59 return prefs_.end(); 55 return prefs_.end();
60 } 56 }
61 57
62 DefaultPrefStore::~DefaultPrefStore() {} 58 DefaultPrefStore::~DefaultPrefStore() {}
OLDNEW
« no previous file with comments | « components/prefs/default_pref_store.h ('k') | components/prefs/in_memory_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698