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

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: Created 3 years, 9 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
new file mode 100644
index 0000000000000000000000000000000000000000..9cfaee6d8e4ee9b474033f88306bbb82c1f4d2fa
--- /dev/null
+++ b/chrome/browser/resources/settings/about_page/update_warning_dialog.js
@@ -0,0 +1,49 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/**
+ * @fileoverview 'settings-update-warning-dialog' is a component warning the
+ * user about update over mobile data. By clicking 'Continue', the user
+ * agrees to download update using mobile data.
+ */
+Polymer({
+ is: 'settings-update-warning-dialog',
+
+ behaviors: [I18nBehavior],
+
+ properties: {
+ },
+
+ /** @private {?settings.AboutPageBrowserProxy} */
+ browserProxy_: null,
afakhry 2017/04/03 16:27:27 Why do you need this? I'm not seeing it being used
+
+ /** @override */
+ ready: function() {
+ this.browserProxy_ = settings.AboutPageBrowserProxyImpl.getInstance();
+ },
+
+ /** @override */
+ attached: function() {
+ this.$.dialog.showModal();
+ },
+
+ /** @private */
+ onCancelTap_: function() {
+ this.$.dialog.close();
+ },
+
+ /** @private */
+ onContinueTap_: function() {
+ 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);
+ },
+});

Powered by Google App Engine
This is Rietveld 408576698