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

Side by Side Diff: chrome/browser/resources/settings/about_page/about_page.js

Issue 2325193002: MD Settings/About: Implement update progress percentage (Closed)
Patch Set: also add % to cross-channel cros message Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « chrome/app/settings_strings.grdp ('k') | chrome/test/data/webui/settings/about_page_tests.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 'settings-about-page' contains version and OS related 6 * @fileoverview 'settings-about-page' contains version and OS related
7 * information. 7 * information.
8 */ 8 */
9 Polymer({ 9 Polymer({
10 is: 'settings-about-page', 10 is: 'settings-about-page',
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 return this.i18n('aboutUpgradeCheckStarted'); 153 return this.i18n('aboutUpgradeCheckStarted');
154 case UpdateStatus.NEARLY_UPDATED: 154 case UpdateStatus.NEARLY_UPDATED:
155 <if expr="chromeos"> 155 <if expr="chromeos">
156 if (this.currentChannel_ != this.targetChannel_) 156 if (this.currentChannel_ != this.targetChannel_)
157 return this.i18n('aboutUpgradeSuccessChannelSwitch'); 157 return this.i18n('aboutUpgradeSuccessChannelSwitch');
158 </if> 158 </if>
159 return this.i18n('aboutUpgradeRelaunch'); 159 return this.i18n('aboutUpgradeRelaunch');
160 case UpdateStatus.UPDATED: 160 case UpdateStatus.UPDATED:
161 return this.i18n('aboutUpgradeUpToDate'); 161 return this.i18n('aboutUpgradeUpToDate');
162 case UpdateStatus.UPDATING: 162 case UpdateStatus.UPDATING:
163 assert(typeof this.currentUpdateStatusEvent_.progress == 'number');
164 var progressPercent = this.currentUpdateStatusEvent_.progress + '%';
165
163 <if expr="chromeos"> 166 <if expr="chromeos">
164 if (this.currentChannel_ != this.targetChannel_) { 167 if (this.currentChannel_ != this.targetChannel_) {
165 return this.i18n('aboutUpgradeUpdatingChannelSwitch', 168 return this.i18n('aboutUpgradeUpdatingChannelSwitch',
166 this.i18n(settings.browserChannelToI18nId(this.targetChannel_))); 169 this.i18n(settings.browserChannelToI18nId(this.targetChannel_)),
170 progressPercent);
167 } 171 }
168 </if> 172 </if>
169 return this.i18n('aboutUpgradeUpdating'); 173 return this.i18n('aboutUpgradeUpdating', progressPercent);
170 default: 174 default:
171 var message = this.currentUpdateStatusEvent_.message; 175 var message = this.currentUpdateStatusEvent_.message;
172 return message ? 176 return message ?
173 parseHtmlSubset('<b>' + message + '</b>').firstChild.innerHTML : 177 parseHtmlSubset('<b>' + message + '</b>').firstChild.innerHTML :
174 ''; 178 '';
175 } 179 }
176 }, 180 },
177 181
178 /** 182 /**
179 * @return {?string} 183 * @return {?string}
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 }); 293 });
290 }, 294 },
291 295
292 <if expr="_google_chrome"> 296 <if expr="_google_chrome">
293 /** @private */ 297 /** @private */
294 onReportIssueTap_: function() { 298 onReportIssueTap_: function() {
295 this.aboutBrowserProxy_.openFeedbackDialog(); 299 this.aboutBrowserProxy_.openFeedbackDialog();
296 }, 300 },
297 </if> 301 </if>
298 }); 302 });
OLDNEW
« no previous file with comments | « chrome/app/settings_strings.grdp ('k') | chrome/test/data/webui/settings/about_page_tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698