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

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

Issue 2873193002: Make update over cellular an option for user (Closed)
Patch Set: Move update engine related code to another 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/about_page.js
diff --git a/chrome/browser/resources/settings/about_page/about_page.js b/chrome/browser/resources/settings/about_page/about_page.js
index 2e5464e0d1f8849ed2554c2dd1ff30d9c888a045..d4e3d4d4ccea941de6c8804ba5cc3a88b45beb97 100644
--- a/chrome/browser/resources/settings/about_page/about_page.js
+++ b/chrome/browser/resources/settings/about_page/about_page.js
@@ -1,7 +1,6 @@
// 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-about-page' contains version and OS related
* information.
@@ -84,7 +83,19 @@ Polymer({
'#detailed-build-info-trigger');
return map;
},
- }
+ },
+
+ /** @private */
+ showUpdateWarningDialog_: {
+ type: Boolean,
+ value: false,
+ },
+
+ /** @private */
+ updateInfo_: {
+ type: Object,
+ value: {version: '', size: ''},
+ },
stevenjb 2017/05/11 17:20:15 I think this can just be undefined initially; we w
weidongg 2017/05/11 18:09:29 Done.
// </if>
},
@@ -163,6 +174,13 @@ Polymer({
// <if expr="chromeos">
if (event.status == UpdateStatus.CHECKING)
this.hasCheckedForUpdates_ = true;
+ else if (event.status == UpdateStatus.NEED_PERMISSION_TO_UPDATE) {
+ this.showUpdateWarningDialog_ = true;
+ // Async to wait for dialog to appear in the DOM.
+ this.async(function() {
stevenjb 2017/05/11 17:20:15 This no longer needs to be async since we do not n
weidongg 2017/05/11 18:09:29 Done.
+ this.updateInfo_ = {version: event.version, size: event.size};
+ }.bind(this));
+ }
// </if>
this.currentUpdateStatusEvent_ = event;
},
@@ -258,6 +276,8 @@ Polymer({
switch (this.currentUpdateStatusEvent_.status) {
case UpdateStatus.CHECKING:
return this.i18n('aboutUpgradeCheckStarted');
+ case UpdateStatus.NEED_PERMISSION_TO_UPDATE:
+ return "";
case UpdateStatus.NEARLY_UPDATED:
// <if expr="chromeos">
if (this.currentChannel_ != this.targetChannel_)
@@ -399,7 +419,8 @@ Polymer({
var staleUpdatedStatus = !this.hasCheckedForUpdates_ &&
this.checkStatus_(UpdateStatus.UPDATED);
- return staleUpdatedStatus || this.checkStatus_(UpdateStatus.FAILED);
+ return staleUpdatedStatus || this.checkStatus_(UpdateStatus.FAILED) ||
+ this.checkStatus_(UpdateStatus.NEED_PERMISSION_TO_UPDATE);
},
/**
@@ -409,6 +430,11 @@ Polymer({
shouldShowRegulatoryInfo_: function() {
return this.regulatoryInfo_ !== null;
},
+
+ /** @private */
+ onUpdateWarningDialogClose_: function() {
+ this.showUpdateWarningDialog_ = false;
+ },
// </if>
/** @private */

Powered by Google App Engine
This is Rietveld 408576698