Bug 1321303 - Part 5: Implement browsingData.removeFormData, r=aswan
MozReview-Commit-ID: aK6m7vl3i1
This commit is contained in:
@@ -72,6 +72,10 @@ function clearDownloads(options) {
|
||||
return sanitizer.items.downloads.clear(makeRange(options));
|
||||
}
|
||||
|
||||
function clearFormData(options) {
|
||||
return sanitizer.items.formdata.clear(makeRange(options));
|
||||
}
|
||||
|
||||
function clearHistory(options) {
|
||||
return sanitizer.items.history.clear(makeRange(options));
|
||||
}
|
||||
@@ -97,6 +101,9 @@ function doRemoval(options, dataToRemove, extension) {
|
||||
case "downloads":
|
||||
removalPromises.push(clearDownloads(options));
|
||||
break;
|
||||
case "formData":
|
||||
removalPromises.push(clearFormData(options));
|
||||
break;
|
||||
case "history":
|
||||
removalPromises.push(clearHistory(options));
|
||||
break;
|
||||
@@ -154,6 +161,9 @@ extensions.registerSchemaAPI("browsingData", "addon_parent", context => {
|
||||
removeDownloads(options) {
|
||||
return doRemoval(options, {downloads: true});
|
||||
},
|
||||
removeFormData(options) {
|
||||
return doRemoval(options, {formData: true});
|
||||
},
|
||||
removeHistory(options) {
|
||||
return doRemoval(options, {history: true});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user