Chromium Code Reviews| Index: chrome/browser/ui/webui/chromeos/login/encryption_migration_screen_handler.cc |
| diff --git a/chrome/browser/ui/webui/chromeos/login/encryption_migration_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/encryption_migration_screen_handler.cc |
| index e47c7ad10f96d3a801b44b0f14e9630dd8d51b20..dd152d7b269c420b98ce1f53884ee0aa8cef7a83 100644 |
| --- a/chrome/browser/ui/webui/chromeos/login/encryption_migration_screen_handler.cc |
| +++ b/chrome/browser/ui/webui/chromeos/login/encryption_migration_screen_handler.cc |
| @@ -29,6 +29,7 @@ |
| #include "chromeos/dbus/dbus_thread_manager.h" |
| #include "chromeos/dbus/power_manager/power_supply_properties.pb.h" |
| #include "chromeos/dbus/power_manager_client.h" |
| +#include "chromeos/dbus/power_policy_controller.h" |
| #include "components/login/localized_values_builder.h" |
| #include "components/user_manager/user_manager.h" |
| #include "content/public/browser/browser_thread.h" |
| @@ -282,11 +283,16 @@ void EncryptionMigrationScreenHandler::UpdateUIState(UIState state) { |
| if (state == UIState::READY) |
| DBusThreadManager::Get()->GetPowerManagerClient()->RequestStatusUpdate(); |
| - // We should block power save during migration. |
| - if (state == UIState::MIGRATING) |
| + // We should block power save and not poweroff on lid close during migration. |
| + if (state == UIState::MIGRATING) { |
| StartBlockingPowerSave(); |
| - else |
| + if (PowerPolicyController::IsInitialize()) |
|
Daniel Erat
2017/05/30 13:39:42
i don't think that this code should ever run befor
dspaid
2017/05/30 23:37:22
Done.
|
| + PowerPolicyController::Get()->SetEncryptionMigrationActive(true); |
| + } else { |
| StopBlockingPowerSave(); |
| + if (PowerPolicyController::IsInitialize()) |
| + PowerPolicyController::Get()->SetEncryptionMigrationActive(false); |
| + } |
| } |
| void EncryptionMigrationScreenHandler::CheckAvailableStorage() { |