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

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

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 | « 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;
39 void AddObserver(PrefStore::Observer* observer) override; 38 void AddObserver(PrefStore::Observer* observer) override;
40 void RemoveObserver(PrefStore::Observer* observer) override; 39 void RemoveObserver(PrefStore::Observer* observer) override;
41 bool HasObservers() const override; 40 bool HasObservers() const override;
42 bool IsInitializationComplete() const override; 41 bool IsInitializationComplete() const override;
43 42
44 // NotificationObserver implementation. 43 // NotificationObserver implementation.
45 void Observe(int type, 44 void Observe(int type,
46 const content::NotificationSource& src, 45 const content::NotificationSource& src,
47 const content::NotificationDetails& details) override; 46 const content::NotificationDetails& details) override;
48 47
49 private: 48 private:
50 ~SupervisedUserPrefStore() override; 49 ~SupervisedUserPrefStore() override;
51 50
52 void OnNewSettingsAvailable(const base::DictionaryValue* settings); 51 void OnNewSettingsAvailable(const base::DictionaryValue* settings);
53 52
54 std::unique_ptr< 53 std::unique_ptr<
55 base::CallbackList<void(const base::DictionaryValue*)>::Subscription> 54 base::CallbackList<void(const base::DictionaryValue*)>::Subscription>
56 user_settings_subscription_; 55 user_settings_subscription_;
57 content::NotificationRegistrar unsubscriber_registrar_; 56 content::NotificationRegistrar unsubscriber_registrar_;
58 57
59 std::unique_ptr<PrefValueMap> prefs_; 58 std::unique_ptr<PrefValueMap> prefs_;
60 59
61 base::ObserverList<PrefStore::Observer, true> observers_; 60 base::ObserverList<PrefStore::Observer, true> observers_;
62 }; 61 };
63 62
64 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_PREF_STORE_H_ 63 #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