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

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

Issue 2811713002: Check the available storage size before starting encryption migration. (Closed)
Patch Set: Always check the available storage. 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..f78d68b8fe4ee3e55f65d6736899dde6922efe7b 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({
@@ -40,6 +42,14 @@ Polymer({
type: Number,
value: -1
},
+
+ /**
+ * Whether the current migration is resuming the previous one.
+ */
+ isResuming: {
+ type: Boolean,
+ value: false
+ },
},
/**
@@ -52,6 +62,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 +98,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