OLD | NEW |
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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 // A PrefStore that gets its values from supervised user settings via the | 23 // A PrefStore that gets its values from supervised user settings via the |
24 // SupervisedUserSettingsService passed in at construction. | 24 // SupervisedUserSettingsService passed in at construction. |
25 class SupervisedUserPrefStore : public PrefStore { | 25 class SupervisedUserPrefStore : public PrefStore { |
26 public: | 26 public: |
27 SupervisedUserPrefStore( | 27 SupervisedUserPrefStore( |
28 SupervisedUserSettingsService* supervised_user_settings_service); | 28 SupervisedUserSettingsService* supervised_user_settings_service); |
29 | 29 |
30 // PrefStore overrides: | 30 // PrefStore overrides: |
31 virtual bool GetValue(const std::string& key, | 31 virtual bool GetValue(const std::string& key, |
32 const base::Value** value) const OVERRIDE; | 32 const base::Value** value) const override; |
33 virtual void AddObserver(PrefStore::Observer* observer) OVERRIDE; | 33 virtual void AddObserver(PrefStore::Observer* observer) override; |
34 virtual void RemoveObserver(PrefStore::Observer* observer) OVERRIDE; | 34 virtual void RemoveObserver(PrefStore::Observer* observer) override; |
35 virtual bool HasObservers() const OVERRIDE; | 35 virtual bool HasObservers() const override; |
36 virtual bool IsInitializationComplete() const OVERRIDE; | 36 virtual bool IsInitializationComplete() const override; |
37 | 37 |
38 private: | 38 private: |
39 virtual ~SupervisedUserPrefStore(); | 39 virtual ~SupervisedUserPrefStore(); |
40 | 40 |
41 void OnNewSettingsAvailable(const base::DictionaryValue* settings); | 41 void OnNewSettingsAvailable(const base::DictionaryValue* settings); |
42 | 42 |
43 scoped_ptr<PrefValueMap> prefs_; | 43 scoped_ptr<PrefValueMap> prefs_; |
44 | 44 |
45 ObserverList<PrefStore::Observer, true> observers_; | 45 ObserverList<PrefStore::Observer, true> observers_; |
46 | 46 |
47 base::WeakPtrFactory<SupervisedUserPrefStore> weak_ptr_factory_; | 47 base::WeakPtrFactory<SupervisedUserPrefStore> weak_ptr_factory_; |
48 }; | 48 }; |
49 | 49 |
50 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_PREF_STORE_H_ | 50 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_PREF_STORE_H_ |
OLD | NEW |