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

Unified Diff: chrome/browser/resources/settings/about_page/update_warning_dialog.js

Issue 2873193002: Make update over cellular an option for user (Closed)
Patch Set: Put code in CHROME_OS wrapper to fix trybot error Created 3 years, 7 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/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)));
},
});
« no previous file with comments | « chrome/browser/resources/settings/about_page/about_page_browser_proxy.js ('k') | chrome/browser/ui/webui/help/help_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698