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

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

Issue 2954863003: MD Settings: Convert all browser proxies to use ES6 class syntax. (Closed)
Patch Set: Remove @constructor annotations. Created 3 years, 6 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_browser_proxy.js
diff --git a/chrome/browser/resources/settings/about_page/about_page_browser_proxy.js b/chrome/browser/resources/settings/about_page/about_page_browser_proxy.js
index 52f3ceddc4e2d4e1dfc829d0f94f2822a095132b..beb4b67e2ecc289f30d4ca22c1254b89345891de 100644
--- a/chrome/browser/resources/settings/about_page/about_page_browser_proxy.js
+++ b/chrome/browser/resources/settings/about_page/about_page_browser_proxy.js
@@ -130,35 +130,34 @@ cr.define('settings', function() {
}
/** @interface */
- function AboutPageBrowserProxy() {}
-
- AboutPageBrowserProxy.prototype = {
+ class AboutPageBrowserProxy {
/**
* Indicates to the browser that the page is ready.
*/
- pageReady: function() {},
+ pageReady() {}
/**
* Request update status from the browser. It results in one or more
* 'update-status-changed' WebUI events.
*/
- refreshUpdateStatus: function() {},
+ refreshUpdateStatus() {}
/** Opens the help page. */
- openHelpPage: function() {},
+ openHelpPage() {}
// <if expr="_google_chrome">
/**
* Opens the feedback dialog.
*/
- openFeedbackDialog: function() {},
+ openFeedbackDialog() {}
+
// </if>
// <if expr="chromeos">
/**
* Checks for available update and applies if it exists.
*/
- requestUpdate: function() {},
+ requestUpdate() {}
/**
* Checks for the update with specified version and size and applies over
@@ -170,101 +169,102 @@ cr.define('settings', function() {
* @param {string} target_version
* @param {string} target_size
*/
- requestUpdateOverCellular: function(target_version, target_size) {},
+ requestUpdateOverCellular(target_version, target_size) {}
/**
* @param {!BrowserChannel} channel
* @param {boolean} isPowerwashAllowed
*/
- setChannel: function(channel, isPowerwashAllowed) {},
+ setChannel(channel, isPowerwashAllowed) {}
/** @return {!Promise<!ChannelInfo>} */
- getChannelInfo: function() {},
+ getChannelInfo() {}
/** @return {!Promise<!VersionInfo>} */
- getVersionInfo: function() {},
+ getVersionInfo() {}
/** @return {!Promise<?RegulatoryInfo>} */
- getRegulatoryInfo: function() {},
+ getRegulatoryInfo() {}
+
// </if>
// <if expr="_google_chrome and is_macosx">
/**
* Triggers setting up auto-updates for all users.
*/
- promoteUpdater: function() {},
+ promoteUpdater() {}
// </if>
- };
+ }
/**
* @implements {settings.AboutPageBrowserProxy}
- * @constructor
*/
- function AboutPageBrowserProxyImpl() {}
- cr.addSingletonGetter(AboutPageBrowserProxyImpl);
-
- AboutPageBrowserProxyImpl.prototype = {
+ class AboutPageBrowserProxyImpl {
/** @override */
- pageReady: function() {
+ pageReady() {
chrome.send('aboutPageReady');
- },
+ }
/** @override */
- refreshUpdateStatus: function() {
+ refreshUpdateStatus() {
chrome.send('refreshUpdateStatus');
- },
+ }
// <if expr="_google_chrome and is_macosx">
/** @override */
- promoteUpdater: function() {
+ promoteUpdater() {
chrome.send('promoteUpdater');
- },
+ }
+
// </if>
/** @override */
- openHelpPage: function() {
+ openHelpPage() {
chrome.send('openHelpPage');
- },
+ }
// <if expr="_google_chrome">
/** @override */
- openFeedbackDialog: function() {
+ openFeedbackDialog() {
chrome.send('openFeedbackDialog');
- },
+ }
+
// </if>
// <if expr="chromeos">
/** @override */
- requestUpdate: function() {
+ requestUpdate() {
chrome.send('requestUpdate');
- },
+ }
/** @override */
- requestUpdateOverCellular: function(target_version, target_size) {
+ requestUpdateOverCellular(target_version, target_size) {
chrome.send('requestUpdateOverCellular', [target_version, target_size]);
- },
+ }
/** @override */
- setChannel: function(channel, isPowerwashAllowed) {
+ setChannel(channel, isPowerwashAllowed) {
chrome.send('setChannel', [channel, isPowerwashAllowed]);
- },
+ }
/** @override */
- getChannelInfo: function() {
+ getChannelInfo() {
return cr.sendWithPromise('getChannelInfo');
- },
+ }
/** @override */
- getVersionInfo: function() {
+ getVersionInfo() {
return cr.sendWithPromise('getVersionInfo');
- },
+ }
/** @override */
- getRegulatoryInfo: function() {
+ getRegulatoryInfo() {
return cr.sendWithPromise('getRegulatoryInfo');
}
// </if>
- };
+ }
+
+ cr.addSingletonGetter(AboutPageBrowserProxyImpl);
return {
AboutPageBrowserProxy: AboutPageBrowserProxy,

Powered by Google App Engine
This is Rietveld 408576698