OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 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 CHROMEOS_DBUS_POWER_POLICY_CONTROLLER_H_ | 5 #ifndef CHROMEOS_DBUS_POWER_POLICY_CONTROLLER_H_ |
6 #define CHROMEOS_DBUS_POWER_POLICY_CONTROLLER_H_ | 6 #define CHROMEOS_DBUS_POWER_POLICY_CONTROLLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
105 | 105 |
106 // Unregisters a request previously created via an Add*WakeLock() call | 106 // Unregisters a request previously created via an Add*WakeLock() call |
107 // and sends an updated policy. | 107 // and sends an updated policy. |
108 void RemoveWakeLock(int id); | 108 void RemoveWakeLock(int id); |
109 | 109 |
110 // Adjusts policy while Chrome is exiting. The lid-closed action | 110 // Adjusts policy while Chrome is exiting. The lid-closed action |
111 // is overridden to ensure that the system doesn't suspend or shut | 111 // is overridden to ensure that the system doesn't suspend or shut |
112 // down. | 112 // down. |
113 void NotifyChromeIsExiting(); | 113 void NotifyChromeIsExiting(); |
114 | 114 |
115 void SetEncryptionMigrationActive(bool active); | |
Daniel Erat
2017/05/30 13:39:42
add a comment documenting what this does, e.g.
//
dspaid
2017/05/30 23:37:22
Done.
| |
116 | |
115 // PowerManagerClient::Observer implementation: | 117 // PowerManagerClient::Observer implementation: |
116 void PowerManagerRestarted() override; | 118 void PowerManagerRestarted() override; |
117 | 119 |
118 private: | 120 private: |
119 explicit PowerPolicyController(PowerManagerClient* client); | 121 explicit PowerPolicyController(PowerManagerClient* client); |
120 ~PowerPolicyController() override; | 122 ~PowerPolicyController() override; |
121 | 123 |
122 friend class PowerPrefsTest; | 124 friend class PowerPrefsTest; |
123 | 125 |
124 // Details about a wake lock added via Add*WakeLock(). | 126 // Details about a wake lock added via Add*WakeLock(). |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
166 // Should TYPE_SCREEN or TYPE_DIM entries in |wake_locks_| be honored? | 168 // Should TYPE_SCREEN or TYPE_DIM entries in |wake_locks_| be honored? |
167 // If false, screen wake locks are just treated as TYPE_SYSTEM instead. | 169 // If false, screen wake locks are just treated as TYPE_SYSTEM instead. |
168 bool honor_screen_wake_locks_; | 170 bool honor_screen_wake_locks_; |
169 | 171 |
170 // Next ID to be used by an Add*WakeLock() request. | 172 // Next ID to be used by an Add*WakeLock() request. |
171 int next_wake_lock_id_; | 173 int next_wake_lock_id_; |
172 | 174 |
173 // True if Chrome is in the process of exiting. | 175 // True if Chrome is in the process of exiting. |
174 bool chrome_is_exiting_; | 176 bool chrome_is_exiting_; |
175 | 177 |
178 // True if a user homedir is in the process of migrating encryption formats. | |
179 bool encryption_migration_active_; | |
180 | |
176 DISALLOW_COPY_AND_ASSIGN(PowerPolicyController); | 181 DISALLOW_COPY_AND_ASSIGN(PowerPolicyController); |
177 }; | 182 }; |
178 | 183 |
179 } // namespace chromeos | 184 } // namespace chromeos |
180 | 185 |
181 #endif // CHROMEOS_DBUS_POWER_POLICY_CONTROLLER_H_ | 186 #endif // CHROMEOS_DBUS_POWER_POLICY_CONTROLLER_H_ |
OLD | NEW |