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

Unified Diff: chrome/browser/resources/settings/people_page/import_data_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/import_data_browser_proxy.js
diff --git a/chrome/browser/resources/settings/people_page/import_data_browser_proxy.js b/chrome/browser/resources/settings/people_page/import_data_browser_proxy.js
index 24c108ec339dca52a30964ea449631c0850590a3..5458bab65e236f9a536be238697a68670fa2817a 100644
--- a/chrome/browser/resources/settings/people_page/import_data_browser_proxy.js
+++ b/chrome/browser/resources/settings/people_page/import_data_browser_proxy.js
@@ -36,53 +36,49 @@ settings.ImportDataStatus = {
cr.define('settings', function() {
/** @interface */
- function ImportDataBrowserProxy() {}
-
- ImportDataBrowserProxy.prototype = {
+ class ImportDataBrowserProxy {
/**
* Returns the source profiles available for importing from other browsers.
* @return {!Promise<!Array<!settings.BrowserProfile>>}
*/
- initializeImportDialog: function() {},
+ initializeImportDialog() {}
/**
* Starts importing data for the specificed source browser profile. The C++
* responds with the 'import-data-status-changed' WebUIListener event.
* @param {number} sourceBrowserProfileIndex
*/
- importData: function(sourceBrowserProfileIndex) {},
+ importData(sourceBrowserProfileIndex) {}
/**
* Prompts the user to choose a bookmarks file to import bookmarks from.
*/
- importFromBookmarksFile: function() {},
- };
+ importFromBookmarksFile() {}
+ }
/**
- * @constructor
* @implements {settings.ImportDataBrowserProxy}
*/
- function ImportDataBrowserProxyImpl() {}
- // The singleton instance_ is replaced with a test version of this wrapper
- // during testing.
- cr.addSingletonGetter(ImportDataBrowserProxyImpl);
-
- ImportDataBrowserProxyImpl.prototype = {
+ class ImportDataBrowserProxyImpl {
/** @override */
- initializeImportDialog: function() {
+ initializeImportDialog() {
return cr.sendWithPromise('initializeImportDialog');
- },
+ }
/** @override */
- importData: function(sourceBrowserProfileIndex) {
+ importData(sourceBrowserProfileIndex) {
chrome.send('importData', [sourceBrowserProfileIndex]);
- },
+ }
/** @override */
- importFromBookmarksFile: function() {
+ importFromBookmarksFile() {
chrome.send('importFromBookmarksFile');
- },
- };
+ }
+ }
+
+ // The singleton instance_ is replaced with a test version of this wrapper
+ // during testing.
+ cr.addSingletonGetter(ImportDataBrowserProxyImpl);
return {
ImportDataBrowserProxy: ImportDataBrowserProxy,

Powered by Google App Engine
This is Rietveld 408576698