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

Unified Diff: chrome/browser/resources/settings/android_apps_page/android_apps_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/android_apps_page/android_apps_browser_proxy.js
diff --git a/chrome/browser/resources/settings/android_apps_page/android_apps_browser_proxy.js b/chrome/browser/resources/settings/android_apps_page/android_apps_browser_proxy.js
index c5b32bd9834ce36d81f883a9a75a5be7463b7bdb..6cb17f5f63aec8a75f0de9ad1ae68764ac9001ca 100644
--- a/chrome/browser/resources/settings/android_apps_page/android_apps_browser_proxy.js
+++ b/chrome/browser/resources/settings/android_apps_page/android_apps_browser_proxy.js
@@ -21,39 +21,34 @@ var AndroidAppsInfo;
cr.define('settings', function() {
/** @interface */
- function AndroidAppsBrowserProxy() {}
-
- AndroidAppsBrowserProxy.prototype = {
- requestAndroidAppsInfo: function() {},
+ class AndroidAppsBrowserProxy {
+ requestAndroidAppsInfo() {}
/**
* @param {boolean} keyboardAction True if the app was opened using a
* keyboard action.
*/
- showAndroidAppsSettings: function(keyboardAction) {},
- };
+ showAndroidAppsSettings(keyboardAction) {}
+ }
/**
- * @constructor
* @implements {settings.AndroidAppsBrowserProxy}
*/
- function AndroidAppsBrowserProxyImpl() {}
-
- // The singleton instance_ can be replaced with a test version of this wrapper
- // during testing.
- cr.addSingletonGetter(AndroidAppsBrowserProxyImpl);
-
- AndroidAppsBrowserProxyImpl.prototype = {
+ class AndroidAppsBrowserProxyImpl {
/** @override */
- requestAndroidAppsInfo: function() {
+ requestAndroidAppsInfo() {
chrome.send('requestAndroidAppsInfo');
- },
+ }
/** @override */
- showAndroidAppsSettings: function(keyboardAction) {
+ showAndroidAppsSettings(keyboardAction) {
chrome.send('showAndroidAppsSettings', [keyboardAction]);
- },
- };
+ }
+ }
+
+ // The singleton instance_ can be replaced with a test version of this wrapper
+ // during testing.
+ cr.addSingletonGetter(AndroidAppsBrowserProxyImpl);
return {
AndroidAppsBrowserProxy: AndroidAppsBrowserProxy,

Powered by Google App Engine
This is Rietveld 408576698