| 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..25a59f988ba5e1742e1fbfab0ea11d0ee1403f9c 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,49 @@
|
| * to interact with the browser.
|
| */
|
|
|
| +/**
|
| + * An ImportantSite represents a domain with data that the user might want
|
| + * to protect from being deleted. ImportantSites are determined based on
|
| + * various engagement factors, such as whether a site is bookmarked or receives
|
| + * notifications.
|
| + *
|
| + * @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 +67,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 */
|
|
|