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

Unified Diff: chrome/browser/resources/chromeos/login/encryption_migration.js

Issue 2811713002: Check the available storage size before starting encryption migration. (Closed)
Patch Set: . 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/chromeos/login/encryption_migration.js
diff --git a/chrome/browser/resources/chromeos/login/encryption_migration.js b/chrome/browser/resources/chromeos/login/encryption_migration.js
index 86f8e435979b40c9e6a6e29f20f7e827177738fd..0004af3d28ccbc9d7835c016499ff1260fbd3e06 100644
--- a/chrome/browser/resources/chromeos/login/encryption_migration.js
+++ b/chrome/browser/resources/chromeos/login/encryption_migration.js
@@ -14,9 +14,11 @@
*/
var EncryptionMigrationUIState = {
INITIAL: 0,
- MIGRATING: 1,
- MIGRATION_SUCCEEDED: 2,
- MIGRATION_FAILED: 3
+ READY: 1,
+ MIGRATING: 2,
+ MIGRATION_SUCCEEDED: 3,
+ MIGRATION_FAILED: 4,
+ NOT_ENOUGH_SPACE: 5
};
Polymer({
@@ -52,6 +54,15 @@ Polymer({
},
/**
+ * Returns true if the migration is ready to start.
+ * @param {EncryptionMigrationUIState} state Current UI state
+ * @private
+ */
+ isReady_: function(state) {
+ return state == EncryptionMigrationUIState.READY;
+ },
+
+ /**
* Returns true if the migration is in progress.
* @param {EncryptionMigrationUIState} state Current UI state
* @private
@@ -79,6 +90,15 @@ Polymer({
},
/**
+ * Returns true if the available space is not enough to start migration.
+ * @param {EncryptionMigrationUIState} state Current UI state
+ * @private
+ */
+ isNotEnoughSpace_: function(state) {
+ return state == EncryptionMigrationUIState.NOT_ENOUGH_SPACE;
+ },
+
+ /**
* Returns true if the current migration progress is unknown.
* @param {number} progress
* @private

Powered by Google App Engine
This is Rietveld 408576698