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

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..775abee874a0cfc9ac5c60b33201399873d83269
--- /dev/null
+++ b/chrome/browser/resources/settings/about_page/update_warning_dialog.js
@@ -0,0 +1,48 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
michaelpg 2017/04/04 00:44:52 2017 :-)
weidongg 2017/04/04 04:25:11 Done.
+// 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: {
michaelpg 2017/04/04 00:44:52 omit empty properties object
weidongg 2017/04/04 04:25:12 Done.
+ },
+
+ /** @override */
+ ready: function() {
+ this.browserProxy_ = settings.AboutPageBrowserProxyImpl.getInstance();
+ },
+
+ /** @override */
+ attached: function() {
+ this.$.dialog.showModal();
+ },
+
+ /** @private */
+ onCancelTap_: function() {
+ //TODO(weidongg): implement the real behaviors here.
michaelpg 2017/04/04 00:44:52 nit here and below: "// TODO(..." (space after //)
weidongg 2017/04/04 04:25:11 Done.
+ this.$.dialog.close();
+ },
+
+ /** @private */
+ onContinueTap_: function() {
+ //TODO(weidongg): implement the real behaviors here.
+ this.$.dialog.close();
+ },
+
+ /**
+ * @param {string} updateSizeMb size of the update in megabytes.
michaelpg 2017/04/04 00:44:52 nit: capitalize Size
weidongg 2017/04/04 04:25:11 Done.
+ * @private
+ */
+ setUpdateWarningMessage: function(updateSizeMb) {
+ this.$$("#update-warning-message").innerHTML =
+ this.i18n("aboutUpdateWarningMessage", updateSizeMb);
michaelpg 2017/04/04 00:44:52 4-space indent (looks like 5)
weidongg 2017/04/04 04:25:11 Done.
+ },
+});

Powered by Google App Engine
This is Rietveld 408576698