Index: chrome/browser/ui/webui/chromeos/login/encryption_migration_screen_handler.h |
diff --git a/chrome/browser/ui/webui/chromeos/login/encryption_migration_screen_handler.h b/chrome/browser/ui/webui/chromeos/login/encryption_migration_screen_handler.h |
index f5b5a212ec2627dab3d15be963fa3e2dcdce4c2b..1e194de6f08c714fe2b552a6745c6c85c34d4d05 100644 |
--- a/chrome/browser/ui/webui/chromeos/login/encryption_migration_screen_handler.h |
+++ b/chrome/browser/ui/webui/chromeos/login/encryption_migration_screen_handler.h |
@@ -5,6 +5,8 @@ |
#ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_ENCRYPTION_MIGRATION_SCREEN_HANDLER_H_ |
#define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_ENCRYPTION_MIGRATION_SCREEN_HANDLER_H_ |
+#include <memory> |
+ |
#include "base/macros.h" |
#include "chrome/browser/chromeos/login/screens/encryption_migration_screen_view.h" |
#include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" |
@@ -13,6 +15,10 @@ |
#include "chromeos/login/auth/user_context.h" |
#include "third_party/cros_system_api/dbus/cryptohome/dbus-constants.h" |
+namespace device { |
+class PowerSaveBlocker; |
+} // namespace device |
+ |
namespace chromeos { |
// WebUI implementation of EncryptionMigrationScreenView |
@@ -69,6 +75,9 @@ class EncryptionMigrationScreenHandler : public EncryptionMigrationScreenView, |
void OnMountExistingVault(bool success, |
cryptohome::MountError return_code, |
const std::string& mount_hash); |
+ void StartBlockingPowerSave(); |
+ void StopBlockingPowerSave(); |
+ |
// Creates authorization key for MountEx method using |user_context_|. |
cryptohome::KeyDefinition GetAuthKey(); |
@@ -101,6 +110,8 @@ class EncryptionMigrationScreenHandler : public EncryptionMigrationScreenView, |
// sufficient. |
bool should_migrate_on_enough_battery_ = false; |
+ std::unique_ptr<device::PowerSaveBlocker> power_save_blocker_; |
+ |
base::WeakPtrFactory<EncryptionMigrationScreenHandler> weak_ptr_factory_; |
DISALLOW_COPY_AND_ASSIGN(EncryptionMigrationScreenHandler); |