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

Unified Diff: chrome/browser/resources/settings/chrome_cleanup_page/chrome_cleanup_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/chrome_cleanup_page/chrome_cleanup_proxy.js
diff --git a/chrome/browser/resources/settings/chrome_cleanup_page/chrome_cleanup_proxy.js b/chrome/browser/resources/settings/chrome_cleanup_page/chrome_cleanup_proxy.js
index 7edbab00559990f9ea79e2de6eb3a1366da8341c..b032a5cdd05601bab5d9b34f8c6139fa2a93888b 100644
--- a/chrome/browser/resources/settings/chrome_cleanup_page/chrome_cleanup_proxy.js
+++ b/chrome/browser/resources/settings/chrome_cleanup_page/chrome_cleanup_proxy.js
@@ -4,60 +4,55 @@
cr.define('settings', function() {
/** @interface */
- function ChromeCleanupProxy() {}
-
- ChromeCleanupProxy.prototype = {
+ class ChromeCleanupProxy {
/**
* Registers the current ChromeCleanupHandler as an observer of
* ChromeCleanerController events.
*/
- registerChromeCleanerObserver: assertNotReached,
+ registerChromeCleanerObserver() {}
/**
* Starts a cleanup on the user's computer.
*/
- startCleanup: assertNotReached,
+ startCleanup() {}
/**
* Restarts the user's computer.
*/
- restartComputer: assertNotReached,
+ restartComputer() {}
/**
* Hides the Cleanup page from the settings menu.
*/
- dismissCleanupPage: assertNotReached,
- };
+ dismissCleanupPage() {}
+ }
/**
* @implements {settings.ChromeCleanupProxy}
- * @constructor
*/
- function ChromeCleanupProxyImpl() {}
-
- cr.addSingletonGetter(ChromeCleanupProxyImpl);
-
- ChromeCleanupProxyImpl.prototype = {
+ class ChromeCleanupProxyImpl {
/** @override */
- registerChromeCleanerObserver: function() {
+ registerChromeCleanerObserver() {
chrome.send('registerChromeCleanerObserver');
- },
+ }
/** @override */
- startCleanup: function() {
+ startCleanup() {
chrome.send('startCleanup');
- },
+ }
/** @override */
- restartComputer: function() {
+ restartComputer() {
chrome.send('restartComputer');
- },
+ }
/** @override */
- dismissCleanupPage: function() {
+ dismissCleanupPage() {
chrome.send('dismissCleanupPage');
- },
- };
+ }
+ }
+
+ cr.addSingletonGetter(ChromeCleanupProxyImpl);
return {
ChromeCleanupProxy: ChromeCleanupProxy,

Powered by Google App Engine
This is Rietveld 408576698