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

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

Issue 335833003: Rename "managed (mode|user)" to "supervised user" (part 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments (+ a few other cleanups) Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_MANAGED_MODE_SUPERVISED_USER_PREF_STORE_H_ 5 #ifndef CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_PREF_STORE_H_
6 #define CHROME_BROWSER_MANAGED_MODE_SUPERVISED_USER_PREF_STORE_H_ 6 #define CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_PREF_STORE_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/observer_list.h" 9 #include "base/observer_list.h"
10 #include "base/prefs/pref_store.h" 10 #include "base/prefs/pref_store.h"
11 #include "chrome/browser/managed_mode/managed_users.h" 11 #include "chrome/browser/supervised_user/supervised_users.h"
12 12
13 namespace base { 13 namespace base {
14 class DictionaryValue; 14 class DictionaryValue;
15 class Value; 15 class Value;
16 } 16 }
17 17
18 class ManagedUserSettingsService;
19 class PrefValueMap; 18 class PrefValueMap;
19 class SupervisedUserSettingsService;
20 20
21 // A PrefStore that gets its values from managed user settings via the 21 // A PrefStore that gets its values from supervised user settings via the
22 // ManagedUserSettingsService passed in at construction. 22 // SupervisedUserSettingsService passed in at construction.
23 class SupervisedUserPrefStore : public PrefStore { 23 class SupervisedUserPrefStore : public PrefStore {
24 public: 24 public:
25 SupervisedUserPrefStore( 25 SupervisedUserPrefStore(
26 ManagedUserSettingsService* managed_user_settings_service); 26 SupervisedUserSettingsService* supervised_user_settings_service);
27 27
28 // PrefStore overrides: 28 // PrefStore overrides:
29 virtual bool GetValue(const std::string& key, 29 virtual bool GetValue(const std::string& key,
30 const base::Value** value) const OVERRIDE; 30 const base::Value** value) const OVERRIDE;
31 virtual void AddObserver(PrefStore::Observer* observer) OVERRIDE; 31 virtual void AddObserver(PrefStore::Observer* observer) OVERRIDE;
32 virtual void RemoveObserver(PrefStore::Observer* observer) OVERRIDE; 32 virtual void RemoveObserver(PrefStore::Observer* observer) OVERRIDE;
33 virtual bool HasObservers() const OVERRIDE; 33 virtual bool HasObservers() const OVERRIDE;
34 virtual bool IsInitializationComplete() const OVERRIDE; 34 virtual bool IsInitializationComplete() const OVERRIDE;
35 35
36 private: 36 private:
37 virtual ~SupervisedUserPrefStore(); 37 virtual ~SupervisedUserPrefStore();
38 38
39 void OnNewSettingsAvailable(const base::DictionaryValue* settings); 39 void OnNewSettingsAvailable(const base::DictionaryValue* settings);
40 40
41 scoped_ptr<PrefValueMap> prefs_; 41 scoped_ptr<PrefValueMap> prefs_;
42 42
43 ObserverList<PrefStore::Observer, true> observers_; 43 ObserverList<PrefStore::Observer, true> observers_;
44 44
45 base::WeakPtrFactory<SupervisedUserPrefStore> weak_ptr_factory_; 45 base::WeakPtrFactory<SupervisedUserPrefStore> weak_ptr_factory_;
46 }; 46 };
47 47
48 #endif // CHROME_BROWSER_MANAGED_MODE_SUPERVISED_USER_PREF_STORE_H_ 48 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_PREF_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698