| 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..d938891935132b85b0f33deacc4136046bdfda51 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,17 @@ Polymer({
|
|
|
| behaviors: [I18nBehavior],
|
|
|
| + properties: {
|
| + /** @type {!AboutPageUpdateInfo|undefined} */
|
| + updateInfo: {
|
| + type: Object,
|
| + observer: 'updateInfoChanged_',
|
| + },
|
| + },
|
| +
|
| + /** @private {?settings.AboutPageBrowserProxy} */
|
| + browserProxy_: null,
|
| +
|
| /** @override */
|
| ready: function() {
|
| this.browserProxy_ = settings.AboutPageBrowserProxyImpl.getInstance();
|
| @@ -24,22 +35,21 @@ 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.updateInfo.version,
|
| + this.updateInfo.size);
|
| this.$.dialog.close();
|
| },
|
|
|
| - /**
|
| - * @param {string} updateSizeMb Size of the update in megabytes.
|
| - * @private
|
| - */
|
| - setUpdateWarningMessage: function(updateSizeMb) {
|
| - this.$$("#update-warning-message").innerHTML =
|
| - this.i18n("aboutUpdateWarningMessage", updateSizeMb);
|
| + /** @private */
|
| + updateInfoChanged_: function() {
|
| + this.$$("#update-warning-message").innerHTML =
|
| + this.i18n("aboutUpdateWarningMessage",
|
| + // Convert bytes to megabytes
|
| + Math.floor(Number(this.updateInfo.size) / (1024 * 1024)));
|
| },
|
| });
|
|
|