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

Unified Diff: chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js

Issue 2248683006: Site Settings Desktop: Implement individual cookie removal and RemoveAll. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback Created 4 years, 4 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/site_settings/site_settings_prefs_browser_proxy.js
diff --git a/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js b/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js
index 37fcce621cb05d7fdcbcba6bb1795f0c0662f0b9..1d6c3168c45b2b52fe96fc007b3a18c38eea1040 100644
--- a/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js
+++ b/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js
@@ -117,14 +117,17 @@ cr.define('settings', function() {
setDefaultCaptureDevice: function(type, defaultValue) {},
/**
- * Reloads all cookies. List is returned through a JS call to loadChildren.
+ * Reloads all cookies.
+ * @return {!Promise<Array<CookieDataSummaryItem>>} Returns the full cookie
+ * list.
*/
reloadCookies: function() {},
/**
- * Fetches all children of a given cookie. List is returned through a JS
- * call to loadChildren.
+ * Fetches all children of a given cookie.
* @param {string} path The path to the parent cookie.
+ * @return {!Promise<Array<CookieDataSummaryItem>>} Returns a cookie list
+ * for the given path.
*/
loadCookieChildren: function(path) {},
@@ -135,6 +138,13 @@ cr.define('settings', function() {
removeCookie: function(path) {},
/**
+ * Removes all cookies.
+ * @return {!Promise<Array<CookieDataSummaryItem>>} Returns the up to date
+ * cookie list once deletion is complete (empty list).
+ */
+ removeAllCookies: function() {},
+
+ /**
* Initializes the protocol handler list. List is returned through JS calls
* to setHandlersEnabled, setProtocolHandlers & setIgnoredProtocolHandlers.
*/
@@ -219,12 +229,12 @@ cr.define('settings', function() {
/** @override */
reloadCookies: function() {
- chrome.send('reloadCookies');
+ return cr.sendWithPromise('reloadCookies');
},
/** @override */
loadCookieChildren: function(path) {
- chrome.send('loadCookie', [path]);
+ return cr.sendWithPromise('loadCookie', path);
},
/** @override */
@@ -232,6 +242,12 @@ cr.define('settings', function() {
chrome.send('removeCookie', [path]);
},
+ /** @override */
+ removeAllCookies: function() {
+ return cr.sendWithPromise('removeAllCookies');
+ },
+
+
initializeProtocolHandlerList: function() {
chrome.send('initializeProtocolHandlerList');
},

Powered by Google App Engine
This is Rietveld 408576698