Chromium Code Reviews| Index: chrome/browser/resources/settings/about_page/update_warning_dialog.js |
| diff --git a/chrome/browser/resources/settings/about_page/update_warning_dialog.js b/chrome/browser/resources/settings/about_page/update_warning_dialog.js |
| index 1060fa4f02bce2c5b832d63f3f0ac5150a09a962..a73c91aac7bfa27361644dfe34851d3f9e3d4558 100644 |
| --- a/chrome/browser/resources/settings/about_page/update_warning_dialog.js |
| +++ b/chrome/browser/resources/settings/about_page/update_warning_dialog.js |
| @@ -12,6 +12,9 @@ Polymer({ |
| behaviors: [I18nBehavior], |
| + /** @private {?settings.AboutPageBrowserProxy} */ |
| + browserProxy_: null, |
| + |
| /** @override */ |
| ready: function() { |
| this.browserProxy_ = settings.AboutPageBrowserProxyImpl.getInstance(); |
| @@ -24,22 +27,26 @@ Polymer({ |
| /** @private */ |
| onCancelTap_: function() { |
| - // TODO(weidongg): implement the real behaviors here. |
| this.$.dialog.close(); |
| }, |
| /** @private */ |
| onContinueTap_: function() { |
| - // TODO(weidongg): implement the real behaviors here. |
| + this.browserProxy_.requestUpdateOverCellular(this.target_version, |
| + this.target_size); |
| this.$.dialog.close(); |
| }, |
| /** |
| - * @param {string} updateSizeMb Size of the update in megabytes. |
| + * @param {string} updateSize Size of the update in bytes. |
| * @private |
| */ |
| - setUpdateWarningMessage: function(updateSizeMb) { |
| - this.$$("#update-warning-message").innerHTML = |
| - this.i18n("aboutUpdateWarningMessage", updateSizeMb); |
| + setUpdateWarningMessage: function(version, size) { |
| + this.target_version = version; |
| + this.target_size = size; |
| + this.$$("#update-warning-message").innerHTML = |
| + this.i18n("aboutUpdateWarningMessage", |
| + // Convert bytes to megabytes |
| + Math.floor(Number(size) / (1024 * 1024))); |
|
stevenjb
2017/05/10 23:29:05
This can be accomplished with an updateInfo_ obser
weidongg
2017/05/11 16:34:06
Done.
|
| }, |
| }); |