Chromium Code Reviews| Index: chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_browser_proxy.js |
| diff --git a/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_browser_proxy.js b/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_browser_proxy.js |
| index b979d86434684b147f8ee44b860f7087a813358a..8eedf50033cf152c6f0b580960c0373c79c5948c 100644 |
| --- a/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_browser_proxy.js |
| +++ b/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_browser_proxy.js |
| @@ -7,15 +7,44 @@ |
| * to interact with the browser. |
| */ |
| +/** |
| + * @typedef {{ |
| + * registerableDomain: string, |
| + * reasonBitfield: number, |
| + * exampleOrigin: string, |
| + * isChecked: boolean, |
| + * storageSize: number, |
| + * hasNotifications: boolean |
| + * }} |
| + */ |
| +var ImportantSite; |
| + |
| +/** |
| + * @typedef {{ |
| + * importantSites: Array<ImportantSite>, |
|
dschuyler
2017/04/07 00:02:05
How about
importantSites: !Array<!ImportantSite>,
dullweber
2017/04/07 09:39:21
Done.
|
| + * flagEnabled: boolean |
| + * }} |
| + */ |
| +var ImportantSitesResponse; |
| + |
| cr.define('settings', function() { |
| /** @interface */ |
| function ClearBrowsingDataBrowserProxy() {} |
| ClearBrowsingDataBrowserProxy.prototype = { |
| /** |
| - * @return {!Promise} A promise resolved when data clearing has completed. |
| + * @param importantSites {!Array<ImportantSite>} |
|
dschuyler
2017/04/07 00:02:06
!Array<!ImportantSite>
dullweber
2017/04/07 09:39:21
Done.
|
| + * @return {!Promise<void>} |
| + * A promise resolved when data clearing has completed. |
| */ |
| - clearBrowsingData: function() {}, |
| + clearBrowsingData: function(importantSites) {}, |
| + |
| + /** |
| + * Fetches a list of important sites. |
| + * @return {!Promise<ImportantSitesResponse>} |
|
dschuyler
2017/04/07 00:02:06
!Promise<!ImportantSitesResponse>
dullweber
2017/04/07 09:39:21
Done.
|
| + * A promise resolved when imporant sites are fetched. |
| + */ |
| + fetchImportantSites: function() {}, |
| /** |
| * Kick off counter updates and return initial state. |
| @@ -33,8 +62,13 @@ cr.define('settings', function() { |
| ClearBrowsingDataBrowserProxyImpl.prototype = { |
| /** @override */ |
| - clearBrowsingData: function() { |
| - return cr.sendWithPromise('clearBrowsingData'); |
| + clearBrowsingData: function(importantSites) { |
| + return cr.sendWithPromise('clearBrowsingData', importantSites); |
| + }, |
| + |
| + /** @override */ |
| + fetchImportantSites: function() { |
| + return cr.sendWithPromise('fetchImportantSites'); |
| }, |
| /** @override */ |