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

Unified Diff: chrome/browser/resources/settings/people_page/easy_unlock_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/easy_unlock_browser_proxy.js
diff --git a/chrome/browser/resources/settings/people_page/easy_unlock_browser_proxy.js b/chrome/browser/resources/settings/people_page/easy_unlock_browser_proxy.js
index f43dfb66e2694049921d5cbdbae4756d768fb8fa..008e6c94931a3fe5e4b9cb4f73795f337f327879 100644
--- a/chrome/browser/resources/settings/people_page/easy_unlock_browser_proxy.js
+++ b/chrome/browser/resources/settings/people_page/easy_unlock_browser_proxy.js
@@ -10,72 +10,68 @@ cr.exportPath('settings');
cr.define('settings', function() {
/** @interface */
- function EasyUnlockBrowserProxy() {}
-
- EasyUnlockBrowserProxy.prototype = {
+ class EasyUnlockBrowserProxy {
/**
* Returns a true promise if Easy Unlock is already enabled on the device.
* @return {!Promise<boolean>}
*/
- getEnabledStatus: function() {},
+ getEnabledStatus() {}
/**
* Starts the Easy Unlock setup flow.
*/
- startTurnOnFlow: function() {},
+ startTurnOnFlow() {}
/**
* Returns the Easy Unlock turn off flow status.
* @return {!Promise<string>}
*/
- getTurnOffFlowStatus: function() {},
+ getTurnOffFlowStatus() {}
/**
* Begins the Easy Unlock turn off flow.
*/
- startTurnOffFlow: function() {},
+ startTurnOffFlow() {}
/**
* Cancels any in-progress Easy Unlock turn-off flows.
*/
- cancelTurnOffFlow: function() {},
- };
+ cancelTurnOffFlow() {}
+ }
/**
- * @constructor
* @implements {settings.EasyUnlockBrowserProxy}
*/
- function EasyUnlockBrowserProxyImpl() {}
- // The singleton instance_ is replaced with a test version of this wrapper
- // during testing.
- cr.addSingletonGetter(EasyUnlockBrowserProxyImpl);
-
- EasyUnlockBrowserProxyImpl.prototype = {
+ class EasyUnlockBrowserProxyImpl {
/** @override */
- getEnabledStatus: function() {
+ getEnabledStatus() {
return cr.sendWithPromise('easyUnlockGetEnabledStatus');
- },
+ }
/** @override */
- startTurnOnFlow: function() {
+ startTurnOnFlow() {
chrome.send('easyUnlockStartTurnOnFlow');
- },
+ }
/** @override */
- getTurnOffFlowStatus: function() {
+ getTurnOffFlowStatus() {
return cr.sendWithPromise('easyUnlockGetTurnOffFlowStatus');
- },
+ }
/** @override */
- startTurnOffFlow: function() {
+ startTurnOffFlow() {
chrome.send('easyUnlockStartTurnOffFlow');
- },
+ }
/** @override */
- cancelTurnOffFlow: function() {
+ cancelTurnOffFlow() {
chrome.send('easyUnlockCancelTurnOffFlow');
- },
- };
+ }
+ }
+
+ // The singleton instance_ is replaced with a test version of this wrapper
+ // during testing.
+ cr.addSingletonGetter(EasyUnlockBrowserProxyImpl);
return {
EasyUnlockBrowserProxy: EasyUnlockBrowserProxy,

Powered by Google App Engine
This is Rietveld 408576698