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

Unified Diff: chrome/browser/resources/settings/people_page/profile_info_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/people_page/profile_info_browser_proxy.js
diff --git a/chrome/browser/resources/settings/people_page/profile_info_browser_proxy.js b/chrome/browser/resources/settings/people_page/profile_info_browser_proxy.js
index 81eb71a2b1e3eb9dc782735a5de8751cc7aab07d..31f4824fd3bcdb1e975e9c43940307df76c95d8b 100644
--- a/chrome/browser/resources/settings/people_page/profile_info_browser_proxy.js
+++ b/chrome/browser/resources/settings/people_page/profile_info_browser_proxy.js
@@ -20,51 +20,47 @@ settings.ProfileInfo;
cr.define('settings', function() {
/** @interface */
- function ProfileInfoBrowserProxy() {}
-
- ProfileInfoBrowserProxy.prototype = {
+ class ProfileInfoBrowserProxy {
/**
* Returns a Promise for the profile info.
* @return {!Promise<!settings.ProfileInfo>}
*/
- getProfileInfo: function() {},
+ getProfileInfo() {}
/**
* Requests the profile stats count. The result is returned by the
* 'profile-stats-count-ready' WebUI listener event.
*/
- getProfileStatsCount: function() {},
+ getProfileStatsCount() {}
/**
* Returns a Promise that's true if the profile manages supervised users.
* @return {!Promise<boolean>}
*/
- getProfileManagesSupervisedUsers: function() {},
- };
+ getProfileManagesSupervisedUsers() {}
+ }
/**
- * @constructor
* @implements {ProfileInfoBrowserProxy}
*/
- function ProfileInfoBrowserProxyImpl() {}
- cr.addSingletonGetter(ProfileInfoBrowserProxyImpl);
-
- ProfileInfoBrowserProxyImpl.prototype = {
+ class ProfileInfoBrowserProxyImpl {
/** @override */
- getProfileInfo: function() {
+ getProfileInfo() {
return cr.sendWithPromise('getProfileInfo');
- },
+ }
/** @override */
- getProfileStatsCount: function() {
+ getProfileStatsCount() {
chrome.send('getProfileStatsCount');
- },
+ }
/** @override */
- getProfileManagesSupervisedUsers: function() {
+ getProfileManagesSupervisedUsers() {
return cr.sendWithPromise('getProfileManagesSupervisedUsers');
- },
- };
+ }
+ }
+
+ cr.addSingletonGetter(ProfileInfoBrowserProxyImpl);
return {
ProfileInfoBrowserProxyImpl: ProfileInfoBrowserProxyImpl,

Powered by Google App Engine
This is Rietveld 408576698