diff --git a/browser/components/places/content/controller.js b/browser/components/places/content/controller.js index 50841549e101..54eccccab167 100755 --- a/browser/components/places/content/controller.js +++ b/browser/components/places/content/controller.js @@ -129,6 +129,8 @@ PlacesController.prototype = { case "cmd_cut": case "cmd_delete": return this._hasRemovableSelection(false); + case "placesCmd_deleteDataHost": + return this._hasRemovableSelection(false); case "placesCmd_moveBookmarks": return this._hasRemovableSelection(true); case "cmd_copy": @@ -231,6 +233,12 @@ PlacesController.prototype = { case "cmd_delete": this.remove("Remove Selection"); break; + case "placesCmd_deleteDataHost": + let pb = Cc["@mozilla.org/privatebrowsing;1"]. + getService(Ci.nsIPrivateBrowsingService); + let uri = PlacesUtils._uri(this._view.selectedNode.uri); + pb.removeDataFromDomain(uri.host); + break; case "cmd_selectAll": this.selectAll(); break; diff --git a/browser/components/places/content/placesOverlay.xul b/browser/components/places/content/placesOverlay.xul index 4369fdee98a8..58e04b32eaf3 100644 --- a/browser/components/places/content/placesOverlay.xul +++ b/browser/components/places/content/placesOverlay.xul @@ -91,6 +91,8 @@ oncommand="goDoCommand('placesCmd_sortBy:name');"/> + + selection="bookmark|tagChild|folder|query|dynamiccontainer|separator|host"/> + + + + + + + diff --git a/netwerk/base/public/nsIPrivateBrowsingService.idl b/netwerk/base/public/nsIPrivateBrowsingService.idl index 9cc0b543477b..7a074d819754 100644 --- a/netwerk/base/public/nsIPrivateBrowsingService.idl +++ b/netwerk/base/public/nsIPrivateBrowsingService.idl @@ -37,7 +37,7 @@ #include "nsISupports.idl" -[scriptable, uuid(effb626c-676f-4c9d-b6ca-70696787901a)] +[scriptable, uuid(49d6f133-80c0-48c7-876d-0b70bbfd0289)] interface nsIPrivateBrowsingService : nsISupports { // When read, determines whether the private browsing mode is currently @@ -51,6 +51,15 @@ interface nsIPrivateBrowsingService : nsISupports // automatically at application startup. // This value will never be true if privateBrowsingEnabled is false. readonly attribute boolean autoStarted; + + /** + * Removes all data stored for a given domain. This includes all data for + * subdomains of the given domain. + * + * @param aDomain + * The domain that will have its data removed. + */ + void removeDataFromDomain(in AUTF8String aDomain); }; %{C++