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

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

Issue 2795603002: Add an update warning for downloading over mobile data (Closed)
Patch Set: Ignore this as I uploaded a new CL 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..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)));
},
});
« 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