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

Side by Side Diff: chrome/browser/managed_mode/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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_MANAGED_MODE_SUPERVISED_USER_PREF_STORE_H_
6 #define CHROME_BROWSER_MANAGED_MODE_SUPERVISED_USER_PREF_STORE_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "base/observer_list.h"
10 #include "base/prefs/pref_store.h"
11 #include "chrome/browser/managed_mode/managed_users.h"
12
13 namespace base {
14 class DictionaryValue;
15 class Value;
16 }
17
18 class ManagedUserSettingsService;
19 class PrefValueMap;
20
21 // A PrefStore that gets its values from managed user settings via the
22 // ManagedUserSettingsService passed in at construction.
23 class SupervisedUserPrefStore : public PrefStore {
24 public:
25 SupervisedUserPrefStore(
26 ManagedUserSettingsService* managed_user_settings_service);
27
28 // PrefStore overrides:
29 virtual bool GetValue(const std::string& key,
30 const base::Value** value) const OVERRIDE;
31 virtual void AddObserver(PrefStore::Observer* observer) OVERRIDE;
32 virtual void RemoveObserver(PrefStore::Observer* observer) OVERRIDE;
33 virtual bool HasObservers() const OVERRIDE;
34 virtual bool IsInitializationComplete() const OVERRIDE;
35
36 private:
37 virtual ~SupervisedUserPrefStore();
38
39 void OnNewSettingsAvailable(const base::DictionaryValue* settings);
40
41 scoped_ptr<PrefValueMap> prefs_;
42
43 ObserverList<PrefStore::Observer, true> observers_;
44
45 base::WeakPtrFactory<SupervisedUserPrefStore> weak_ptr_factory_;
46 };
47
48 #endif // CHROME_BROWSER_MANAGED_MODE_SUPERVISED_USER_PREF_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698