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

Unified Diff: chrome/browser/resources/settings/lifetime_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/lifetime_browser_proxy.js
diff --git a/chrome/browser/resources/settings/lifetime_browser_proxy.js b/chrome/browser/resources/settings/lifetime_browser_proxy.js
index b9915c0216d976e4abed9a81e3dd335a8fb4fbe0..d97ac2d6b390c5347eaab1c60ab5b22212499186 100644
--- a/chrome/browser/resources/settings/lifetime_browser_proxy.js
+++ b/chrome/browser/resources/settings/lifetime_browser_proxy.js
@@ -4,54 +4,50 @@
cr.define('settings', function() {
/** @interface */
- function LifetimeBrowserProxy() {}
-
- LifetimeBrowserProxy.prototype = {
+ class LifetimeBrowserProxy {
// Triggers a browser restart.
- restart: function() {},
+ restart() {}
// Triggers a browser relaunch.
- relaunch: function() {},
+ relaunch() {}
// <if expr="chromeos">
// First signs out current user and then performs a restart.
- signOutAndRestart: function() {},
+ signOutAndRestart() {}
// Triggers a factory reset.
- factoryReset: function() {},
+ factoryReset() {}
// </if>
- };
+ }
/**
- * @constructor
* @implements {settings.LifetimeBrowserProxy}
*/
- function LifetimeBrowserProxyImpl() {}
- cr.addSingletonGetter(LifetimeBrowserProxyImpl);
-
- LifetimeBrowserProxyImpl.prototype = {
+ class LifetimeBrowserProxyImpl {
/** @override */
- restart: function() {
+ restart() {
chrome.send('restart');
- },
+ }
/** @override */
- relaunch: function() {
+ relaunch() {
chrome.send('relaunch');
- },
+ }
// <if expr="chromeos">
/** @override */
- signOutAndRestart: function() {
+ signOutAndRestart() {
chrome.send('signOutAndRestart');
- },
+ }
/** @override */
- factoryReset: function() {
+ factoryReset() {
chrome.send('factoryReset');
- },
+ }
// </if>
- };
+ }
+
+ cr.addSingletonGetter(LifetimeBrowserProxyImpl);
return {
LifetimeBrowserProxy: LifetimeBrowserProxy,

Powered by Google App Engine
This is Rietveld 408576698