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..01bcd3df7c92350c3aa1124faac5285c1c7bffe2 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. |
| */ |
| +/** |
|
michaelpg
2017/05/03 21:48:05
add a comment here: what is an important site/what
dullweber
2017/05/04 08:31:08
Done.
|
| + * @typedef {{ |
| + * registerableDomain: string, |
| + * reasonBitfield: number, |
| + * exampleOrigin: string, |
| + * isChecked: boolean, |
| + * storageSize: number, |
| + * hasNotifications: boolean |
| + * }} |
| + */ |
| +var ImportantSite; |
| + |
| +/** |
| + * @typedef {{ |
| + * importantSites: !Array<!ImportantSite>, |
| + * 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>} |
| + * @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>} |
| + * 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 */ |