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

Side by Side Diff: chrome/browser/chromeos/power/power_prefs.h

Issue 18153007: Add policies to control power management on the Chrome OS login screen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 (c) 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_CHROMEOS_POWER_POWER_PREFS_H_
6 #define CHROME_BROWSER_CHROMEOS_POWER_POWER_PREFS_H_
7
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "content/public/browser/notification_observer.h"
12 #include "content/public/browser/notification_registrar.h"
13
14 class PrefChangeRegistrar;
15 class Profile;
16
17 namespace user_prefs {
18 class PrefRegistrySyncable;
19 }
20
21 namespace chromeos {
22
23 class PowerPolicyController;
24
25 class PowerPrefs : public content::NotificationObserver {
Daniel Erat 2013/06/28 17:05:09 nit: add a comment describing what this class does
bartfab (slow) 2013/07/01 12:32:59 Done.
26 public:
27 explicit PowerPrefs(PowerPolicyController* power_policy_controller);
28 virtual ~PowerPrefs();
29
30 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry,
31 bool for_signin_profile);
32
33 // content::NotificationObserver:
34 virtual void Observe(int type,
35 const content::NotificationSource& source,
36 const content::NotificationDetails& details) OVERRIDE;
37
38 void UpdatePowerPolicyFromPrefs();
39
40 private:
41 friend class PowerPrefsTest;
42
43 void SetProfile(Profile* profile);
44
45 PowerPolicyController* power_policy_controller_; // Not owned.
46
47 content::NotificationRegistrar notification_registrar_;
48
49 Profile* profile_; // Not owned.
50 scoped_ptr<PrefChangeRegistrar> pref_change_registrar_;
51
52 DISALLOW_COPY_AND_ASSIGN(PowerPrefs);
53 };
54
55 } // namespace chromeos
56
57 #endif // CHROME_BROWSER_CHROMEOS_POWER_POWER_PREFS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698