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

Unified Diff: chrome/browser/ui/webui/chromeos/login/encryption_migration_screen_handler.cc

Issue 2902093003: arc: Message for a low-battery case of migration notification. (Closed)
Patch Set: Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/arc/arc_migration_guide_notification.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c63f247b7e35d5ffae68d0de34e9a99751c4d9b2..58d4fa9f48c8d5557697ef75d0e73da7999bbb3f 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
@@ -17,6 +17,7 @@
#include "base/sys_info.h"
#include "base/task_scheduler/post_task.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/chromeos/arc/arc_migration_constants.h"
#include "chrome/browser/chromeos/login/ui/login_feedback.h"
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/profiles/profile.h"
@@ -44,9 +45,6 @@ constexpr char kCheckStoragePath[] = "/home";
// The minimum size of available space to start the migration.
constexpr int64_t kMinimumAvailableStorage = 10LL * 1024 * 1024; // 10MB
fukino 2017/05/24 08:15:32 optional nit: Maybe we should move kMinimumAvailab
kinaba 2017/05/24 21:58:06 Done.
-// The minimum battery level to start the migration.
-constexpr double kMinimumBatteryPercent = 30;
-
// JS API callbacks names.
constexpr char kJsApiStartMigration[] = "startMigration";
constexpr char kJsApiSkipMigration[] = "skipMigration";
@@ -219,13 +217,13 @@ void EncryptionMigrationScreenHandler::PowerChanged(
const power_manager::PowerSupplyProperties& proto) {
current_battery_percent_ = proto.battery_percent();
CallJS("setBatteryState", current_battery_percent_,
- current_battery_percent_ >= kMinimumBatteryPercent,
+ current_battery_percent_ >= arc::kMigrationMinimumBatteryPercent,
proto.battery_state() ==
power_manager::PowerSupplyProperties_BatteryState_CHARGING);
// If the migration was already requested and the bettery level is enough now,
// The migration should start immediately.
- if (current_battery_percent_ >= kMinimumBatteryPercent &&
+ if (current_battery_percent_ >= arc::kMigrationMinimumBatteryPercent &&
should_migrate_on_enough_battery_) {
should_migrate_on_enough_battery_ = false;
StartMigration();
@@ -310,7 +308,7 @@ void EncryptionMigrationScreenHandler::OnGetAvailableStorage(int64_t size) {
}
void EncryptionMigrationScreenHandler::WaitBatteryAndMigrate() {
- if (current_battery_percent_ >= kMinimumBatteryPercent) {
+ if (current_battery_percent_ >= arc::kMigrationMinimumBatteryPercent) {
StartMigration();
return;
}
« no previous file with comments | « chrome/browser/chromeos/arc/arc_migration_guide_notification.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698