Index: chrome/browser/resources/settings/reset_page/reset_browser_proxy.js |
diff --git a/chrome/browser/resources/settings/reset_page/reset_browser_proxy.js b/chrome/browser/resources/settings/reset_page/reset_browser_proxy.js |
index ef80889a5964a882716f11871fe7c23b612af196..f43c9a08a38c3bf84c01a56252b56511b00de3a8 100644 |
--- a/chrome/browser/resources/settings/reset_page/reset_browser_proxy.js |
+++ b/chrome/browser/resources/settings/reset_page/reset_browser_proxy.js |
@@ -4,89 +4,83 @@ |
cr.define('settings', function() { |
/** @interface */ |
- function ResetBrowserProxy() {} |
- |
- ResetBrowserProxy.prototype = { |
+ class ResetBrowserProxy { |
/** |
* @param {boolean} sendSettings Whether the user gave consent to upload |
* broken settings to Google for analysis. |
* @param {string} requestOrigin The origin of the reset request. |
* @return {!Promise} A promise firing once resetting has completed. |
*/ |
- performResetProfileSettings: function(sendSettings, requestOrigin) {}, |
+ performResetProfileSettings(sendSettings, requestOrigin) {} |
/** |
* A method to be called when the reset profile dialog is hidden. |
*/ |
- onHideResetProfileDialog: function() {}, |
+ onHideResetProfileDialog() {} |
/** |
* A method to be called when the reset profile banner is hidden. |
*/ |
- onHideResetProfileBanner: function() {}, |
+ onHideResetProfileBanner() {} |
/** |
* A method to be called when the reset profile dialog is shown. |
*/ |
- onShowResetProfileDialog: function() {}, |
+ onShowResetProfileDialog() {} |
/** |
* Shows the settings that are about to be reset and which will be reported |
* to Google for analysis, in a new tab. |
*/ |
- showReportedSettings: function() {}, |
+ showReportedSettings() {} |
/** |
* Retrieves the triggered reset tool name. |
* @return {!Promise<string>} A promise firing with the tool name, once it |
* has been retrieved. |
*/ |
- getTriggeredResetToolName: function() {}, |
+ getTriggeredResetToolName() {} |
// <if expr="chromeos"> |
/** |
* A method to be called when the reset powerwash dialog is shown. |
*/ |
- onPowerwashDialogShow: function() {}, |
+ onPowerwashDialogShow() {} |
/** |
* Initiates a factory reset and restarts ChromeOS. |
*/ |
- requestFactoryResetRestart: function() {}, |
+ requestFactoryResetRestart() {} |
// </if> |
- }; |
+ } |
/** |
- * @constructor |
* @implements {settings.ResetBrowserProxy} |
*/ |
- function ResetBrowserProxyImpl() {} |
- cr.addSingletonGetter(ResetBrowserProxyImpl); |
- |
- ResetBrowserProxyImpl.prototype = { |
+ class ResetBrowserProxyImpl { |
/** @override */ |
- performResetProfileSettings: function(sendSettings, requestOrigin) { |
+ performResetProfileSettings(sendSettings, requestOrigin) { |
return cr.sendWithPromise( |
'performResetProfileSettings', sendSettings, requestOrigin); |
- }, |
+ } |
/** @override */ |
- onHideResetProfileDialog: function() { |
+ onHideResetProfileDialog() { |
chrome.send('onHideResetProfileDialog'); |
- }, |
+ } |
/** @override */ |
- onHideResetProfileBanner: function() { |
+ onHideResetProfileBanner() { |
chrome.send('onHideResetProfileBanner'); |
- }, |
+ } |
/** @override */ |
- onShowResetProfileDialog: function() { |
+ onShowResetProfileDialog() { |
chrome.send('onShowResetProfileDialog'); |
- }, |
+ } |
/** @override */ |
- showReportedSettings: function() { |
+ showReportedSettings() { |
cr.sendWithPromise('getReportedSettings').then(function(settings) { |
var output = settings.map(function(entry) { |
return entry.key + ': ' + entry.value.replace(/\n/g, ', '); |
@@ -97,25 +91,27 @@ cr.define('settings', function() { |
div.style.whiteSpace = 'pre'; |
win.document.body.appendChild(div); |
}); |
- }, |
+ } |
/** @override */ |
- getTriggeredResetToolName: function() { |
+ getTriggeredResetToolName() { |
return cr.sendWithPromise('getTriggeredResetToolName'); |
- }, |
+ } |
// <if expr="chromeos"> |
/** @override */ |
- onPowerwashDialogShow: function() { |
+ onPowerwashDialogShow() { |
chrome.send('onPowerwashDialogShow'); |
- }, |
+ } |
/** @override */ |
- requestFactoryResetRestart: function() { |
+ requestFactoryResetRestart() { |
chrome.send('requestFactoryResetRestart'); |
- }, |
+ } |
// </if> |
- }; |
+ } |
+ |
+ cr.addSingletonGetter(ResetBrowserProxyImpl); |
return { |
ResetBrowserProxyImpl: ResetBrowserProxyImpl, |