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

Side by Side Diff: chrome/browser/resources/chromeos/login/screen_encryption_migration.js

Issue 2818433002: Wait for the battery level before starting encryption migration. (Closed)
Patch Set: Update |isMigrationAccepted| inside encryption-migration element. Created 3 years, 8 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 login.createScreen('EncryptionMigrationScreen', 'encryption-migration', 5 login.createScreen('EncryptionMigrationScreen', 'encryption-migration',
6 function() { 6 function() {
7 return { 7 return {
8 EXTERNAL_API: [ 8 EXTERNAL_API: [
9 'setUIState', 9 'setUIState',
10 'setMigrationProgress', 10 'setMigrationProgress',
11 'setIsResuming', 11 'setIsResuming',
12 'setBatteryPercent',
12 ], 13 ],
13 14
14 /** 15 /**
15 * Ignore any accelerators the user presses on this screen. 16 * Ignore any accelerators the user presses on this screen.
16 */ 17 */
17 ignoreAccelerators: true, 18 ignoreAccelerators: true,
18 19
19 /** @override */ 20 /** @override */
20 decorate: function() { 21 decorate: function() {
21 var encryptionMigration = $('encryption-migration-element'); 22 var encryptionMigration = $('encryption-migration-element');
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 }, 61 },
61 62
62 /** 63 /**
63 * Updates the migration screen based on whether the migration process is 64 * Updates the migration screen based on whether the migration process is
64 * resuming the previous one. 65 * resuming the previous one.
65 * @param {boolean} isResuming 66 * @param {boolean} isResuming
66 */ 67 */
67 setIsResuming: function(isResuming) { 68 setIsResuming: function(isResuming) {
68 $('encryption-migration-element').isResuming = isResuming; 69 $('encryption-migration-element').isResuming = isResuming;
69 }, 70 },
71
72 /**
73 * Updates battery level of the device.
74 * @param {number} batteryPercent Battery level in percent.
75 * @param {boolean} isEnoughBattery True if the battery is enough.
76 */
77 setBatteryPercent: function(batteryPercent, isEnoughBattery) {
78 $('encryption-migration-element').batteryPercent =
79 Math.floor(batteryPercent);
80 $('encryption-migration-element').isEnoughBattery = isEnoughBattery;
81 },
70 }; 82 };
71 }); 83 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698