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

Side by Side Diff: chrome/browser/supervised_user/supervised_user_pref_store.h

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 | « no previous file | chrome/browser/supervised_user/supervised_user_pref_store.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_PREF_STORE_H_ 5 #ifndef CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_PREF_STORE_H_
6 #define CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_PREF_STORE_H_ 6 #define CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_PREF_STORE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 17 matching lines...) Expand all
28 // SupervisedUserSettingsService passed in at construction. 28 // SupervisedUserSettingsService passed in at construction.
29 class SupervisedUserPrefStore : public PrefStore, 29 class SupervisedUserPrefStore : public PrefStore,
30 public content::NotificationObserver { 30 public content::NotificationObserver {
31 public: 31 public:
32 SupervisedUserPrefStore( 32 SupervisedUserPrefStore(
33 SupervisedUserSettingsService* supervised_user_settings_service); 33 SupervisedUserSettingsService* supervised_user_settings_service);
34 34
35 // PrefStore overrides: 35 // PrefStore overrides:
36 bool GetValue(const std::string& key, 36 bool GetValue(const std::string& key,
37 const base::Value** value) const override; 37 const base::Value** value) const override;
38 std::unique_ptr<base::DictionaryValue> GetValues() const override;
38 void AddObserver(PrefStore::Observer* observer) override; 39 void AddObserver(PrefStore::Observer* observer) override;
39 void RemoveObserver(PrefStore::Observer* observer) override; 40 void RemoveObserver(PrefStore::Observer* observer) override;
40 bool HasObservers() const override; 41 bool HasObservers() const override;
41 bool IsInitializationComplete() const override; 42 bool IsInitializationComplete() const override;
42 43
43 // NotificationObserver implementation. 44 // NotificationObserver implementation.
44 void Observe(int type, 45 void Observe(int type,
45 const content::NotificationSource& src, 46 const content::NotificationSource& src,
46 const content::NotificationDetails& details) override; 47 const content::NotificationDetails& details) override;
47 48
48 private: 49 private:
49 ~SupervisedUserPrefStore() override; 50 ~SupervisedUserPrefStore() override;
50 51
51 void OnNewSettingsAvailable(const base::DictionaryValue* settings); 52 void OnNewSettingsAvailable(const base::DictionaryValue* settings);
52 53
53 std::unique_ptr< 54 std::unique_ptr<
54 base::CallbackList<void(const base::DictionaryValue*)>::Subscription> 55 base::CallbackList<void(const base::DictionaryValue*)>::Subscription>
55 user_settings_subscription_; 56 user_settings_subscription_;
56 content::NotificationRegistrar unsubscriber_registrar_; 57 content::NotificationRegistrar unsubscriber_registrar_;
57 58
58 std::unique_ptr<PrefValueMap> prefs_; 59 std::unique_ptr<PrefValueMap> prefs_;
59 60
60 base::ObserverList<PrefStore::Observer, true> observers_; 61 base::ObserverList<PrefStore::Observer, true> observers_;
61 }; 62 };
62 63
63 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_PREF_STORE_H_ 64 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_PREF_STORE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/supervised_user/supervised_user_pref_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698