Index: chrome/browser/resources/settings/people_page/manage_profile_browser_proxy.js |
diff --git a/chrome/browser/resources/settings/people_page/manage_profile_browser_proxy.js b/chrome/browser/resources/settings/people_page/manage_profile_browser_proxy.js |
index 34e2d34108bf0021885ffaf3cd7940dfbb70eb5b..85a72595893a6f5ef250a4a6346345bb7865e2fc 100644 |
--- a/chrome/browser/resources/settings/people_page/manage_profile_browser_proxy.js |
+++ b/chrome/browser/resources/settings/people_page/manage_profile_browser_proxy.js |
@@ -20,94 +20,90 @@ var ProfileShortcutStatus = { |
cr.define('settings', function() { |
/** @interface */ |
- function ManageProfileBrowserProxy() {} |
- |
- ManageProfileBrowserProxy.prototype = { |
+ class ManageProfileBrowserProxy { |
/** |
* Gets the available profile icons to choose from. |
* @return {!Promise<!Array<!AvatarIcon>>} |
*/ |
- getAvailableIcons: function() {}, |
+ getAvailableIcons() {} |
/** |
* Sets the profile's icon to the GAIA avatar. |
*/ |
- setProfileIconToGaiaAvatar: function() {}, |
+ setProfileIconToGaiaAvatar() {} |
/** |
* Sets the profile's icon to one of the default avatars. |
* @param {string} iconUrl The new profile URL. |
*/ |
- setProfileIconToDefaultAvatar: function(iconUrl) {}, |
+ setProfileIconToDefaultAvatar(iconUrl) {} |
/** |
* Sets the profile's name. |
* @param {string} name The new profile name. |
*/ |
- setProfileName: function(name) {}, |
+ setProfileName(name) {} |
/** |
* Returns whether the current profile has a shortcut. |
* @return {!Promise<ProfileShortcutStatus>} |
*/ |
- getProfileShortcutStatus: function() {}, |
+ getProfileShortcutStatus() {} |
/** |
* Adds a shortcut for the current profile. |
*/ |
- addProfileShortcut: function() {}, |
+ addProfileShortcut() {} |
/** |
* Removes the shortcut of the current profile. |
*/ |
- removeProfileShortcut: function() {}, |
- }; |
+ removeProfileShortcut() {} |
+ } |
/** |
- * @constructor |
* @implements {settings.ManageProfileBrowserProxy} |
*/ |
- function ManageProfileBrowserProxyImpl() {} |
- // The singleton instance_ is replaced with a test version of this wrapper |
- // during testing. |
- cr.addSingletonGetter(ManageProfileBrowserProxyImpl); |
- |
- ManageProfileBrowserProxyImpl.prototype = { |
+ class ManageProfileBrowserProxyImpl { |
/** @override */ |
- getAvailableIcons: function() { |
+ getAvailableIcons() { |
return cr.sendWithPromise('getAvailableIcons'); |
- }, |
+ } |
/** @override */ |
- setProfileIconToGaiaAvatar: function() { |
+ setProfileIconToGaiaAvatar() { |
chrome.send('setProfileIconToGaiaAvatar'); |
- }, |
+ } |
/** @override */ |
- setProfileIconToDefaultAvatar: function(iconUrl) { |
+ setProfileIconToDefaultAvatar(iconUrl) { |
chrome.send('setProfileIconToDefaultAvatar', [iconUrl]); |
- }, |
+ } |
/** @override */ |
- setProfileName: function(name) { |
+ setProfileName(name) { |
chrome.send('setProfileName', [name]); |
- }, |
+ } |
/** @override */ |
- getProfileShortcutStatus: function() { |
+ getProfileShortcutStatus() { |
return cr.sendWithPromise('requestProfileShortcutStatus'); |
- }, |
+ } |
/** @override */ |
- addProfileShortcut: function() { |
+ addProfileShortcut() { |
chrome.send('addProfileShortcut'); |
- }, |
+ } |
/** @override */ |
- removeProfileShortcut: function() { |
+ removeProfileShortcut() { |
chrome.send('removeProfileShortcut'); |
- }, |
- }; |
+ } |
+ } |
+ |
+ // The singleton instance_ is replaced with a test version of this wrapper |
+ // during testing. |
+ cr.addSingletonGetter(ManageProfileBrowserProxyImpl); |
return { |
ManageProfileBrowserProxy: ManageProfileBrowserProxy, |