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

Unified Diff: chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_browser_proxy.js

Issue 2716333002: Implement important sites dialog for desktop. (Closed)
Patch Set: return list directly Created 3 years, 7 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/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..0224d688f5518e0a04c1deace88ef53c0b3d4e63 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,41 @@
* 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;
+
cr.define('settings', function() {
/** @interface */
function ClearBrowsingDataBrowserProxy() {}
ClearBrowsingDataBrowserProxy.prototype = {
/**
- * @return {!Promise} A promise resolved when data clearing has completed.
+ * @param importantSites {!Array<!ImportantSite>}
Dan Beam 2017/05/17 20:57:28 nit: we use this order everywhere else @param {
dullweber 2017/05/18 10:41:54 Done.
+ * @return {!Promise<void>}
+ * A promise resolved when data clearing has completed.
*/
- clearBrowsingData: function() {},
+ clearBrowsingData: function(importantSites) {},
+
+ /**
+ * Get a list of important sites.
Dan Beam 2017/05/17 20:57:28 nit: this description doesn't tell us much more th
dullweber 2017/05/18 10:41:54 removed
+ * @return {!Promise<!Array<!ImportantSite>>}
+ * A promise resolved when imporant sites are retrieved.
+ */
+ getImportantSites: function() {},
/**
* Kick off counter updates and return initial state.
@@ -33,8 +59,13 @@ cr.define('settings', function() {
ClearBrowsingDataBrowserProxyImpl.prototype = {
/** @override */
- clearBrowsingData: function() {
- return cr.sendWithPromise('clearBrowsingData');
+ clearBrowsingData: function(importantSites) {
+ return cr.sendWithPromise('clearBrowsingData', importantSites);
+ },
+
+ /** @override */
+ getImportantSites: function() {
+ return cr.sendWithPromise('getImportantSites');
},
/** @override */

Powered by Google App Engine
This is Rietveld 408576698