| OLD | NEW |
| 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', |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 /** @override */ | 22 /** @override */ |
| 23 decorate: function() { | 23 decorate: function() { |
| 24 var encryptionMigration = $('encryption-migration-element'); | 24 var encryptionMigration = $('encryption-migration-element'); |
| 25 encryptionMigration.addEventListener('upgrade', function() { | 25 encryptionMigration.addEventListener('upgrade', function() { |
| 26 chrome.send('startMigration'); | 26 chrome.send('startMigration'); |
| 27 }); | 27 }); |
| 28 encryptionMigration.addEventListener('skip', function() { | 28 encryptionMigration.addEventListener('skip', function() { |
| 29 chrome.send('skipMigration'); | 29 chrome.send('skipMigration'); |
| 30 }); | 30 }); |
| 31 encryptionMigration.addEventListener('restart', function() { | 31 encryptionMigration.addEventListener( |
| 32 chrome.send('requestRestart'); | 32 'restart-on-low-storage', function() { |
| 33 chrome.send('requestRestartOnLowStorage'); |
| 34 }); |
| 35 encryptionMigration.addEventListener('restart-on-failure', function() { |
| 36 chrome.send('requestRestartOnFailure'); |
| 33 }); | 37 }); |
| 34 encryptionMigration.addEventListener('openFeedbackDialog', function() { | 38 encryptionMigration.addEventListener('openFeedbackDialog', function() { |
| 35 chrome.send('openFeedbackDialog'); | 39 chrome.send('openFeedbackDialog'); |
| 36 }); | 40 }); |
| 37 }, | 41 }, |
| 38 | 42 |
| 39 /** | 43 /** |
| 40 * Event handler that is invoked just before the screen in shown. | 44 * Event handler that is invoked just before the screen in shown. |
| 41 */ | 45 */ |
| 42 onBeforeShow: function() { | 46 onBeforeShow: function() { |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 106 |
| 103 /** | 107 /** |
| 104 * Updates the string representation of necessary space size. | 108 * Updates the string representation of necessary space size. |
| 105 * @param {string} space | 109 * @param {string} space |
| 106 */ | 110 */ |
| 107 setNecessarySpaceInString: function(space) { | 111 setNecessarySpaceInString: function(space) { |
| 108 $('encryption-migration-element').necessarySpaceInString = space; | 112 $('encryption-migration-element').necessarySpaceInString = space; |
| 109 }, | 113 }, |
| 110 }; | 114 }; |
| 111 }); | 115 }); |
| OLD | NEW |