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

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

Issue 2692203007: Add PrefStore::GetValues (Closed)
Patch Set: Add GetValues to FilesystemJsonPrefStore 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
20 void DefaultPrefStore::AddObserver(PrefStore::Observer* observer) { 24 void DefaultPrefStore::AddObserver(PrefStore::Observer* observer) {
21 observers_.AddObserver(observer); 25 observers_.AddObserver(observer);
22 } 26 }
23 27
24 void DefaultPrefStore::RemoveObserver(PrefStore::Observer* observer) { 28 void DefaultPrefStore::RemoveObserver(PrefStore::Observer* observer) {
25 observers_.RemoveObserver(observer); 29 observers_.RemoveObserver(observer);
26 } 30 }
27 31
28 bool DefaultPrefStore::HasObservers() const { 32 bool DefaultPrefStore::HasObservers() const {
29 return observers_.might_have_observers(); 33 return observers_.might_have_observers();
(...skipping 19 matching lines...) Expand all
49 53
50 DefaultPrefStore::const_iterator DefaultPrefStore::begin() const { 54 DefaultPrefStore::const_iterator DefaultPrefStore::begin() const {
51 return prefs_.begin(); 55 return prefs_.begin();
52 } 56 }
53 57
54 DefaultPrefStore::const_iterator DefaultPrefStore::end() const { 58 DefaultPrefStore::const_iterator DefaultPrefStore::end() const {
55 return prefs_.end(); 59 return prefs_.end();
56 } 60 }
57 61
58 DefaultPrefStore::~DefaultPrefStore() {} 62 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