Bug 1678619: Remove onManyFrecenciesChanged interface from nsINavHistoryService. r=mak

Depends on D100460

Differential Revision: https://phabricator.services.mozilla.com/D100461
This commit is contained in:
Daisuke Akatsuka 2021-01-21 15:51:03 +00:00
Родитель d777ac2e60
Коммит 62162d18fd
12 изменённых файлов: 0 добавлений и 35 удалений

Просмотреть файл

@ -104,7 +104,6 @@ const getHistoryObserver = () => {
}
onBeginUpdateBatch() {}
onEndUpdateBatch() {}
onManyFrecenciesChanged() {}
onDeleteVisits(uri, partialRemoval, guid, reason) {
if (!partialRemoval) {
this.emit("visitRemoved", { allHistory: false, urls: [uri.spec] });

Просмотреть файл

@ -73,8 +73,6 @@ class HistoryObserver extends Observer {
onEndUpdateBatch() {}
onManyFrecenciesChanged() {}
onDeleteVisits() {}
}

Просмотреть файл

@ -766,7 +766,6 @@ describe("PlacesFeed", () => {
it("should have a various empty functions for xpconnect happiness", () => {
observer.onBeginUpdateBatch();
observer.onEndUpdateBatch();
observer.onManyFrecenciesChanged();
observer.onDeleteVisits();
});
});

Просмотреть файл

@ -633,7 +633,6 @@ async function promiseVisit(expectedType, expectedURI) {
},
onBeginUpdateBatch() {},
onEndUpdateBatch() {},
onManyFrecenciesChanged() {},
onDeleteURI(uri) {
done("removed", uri.spec);
},

Просмотреть файл

@ -345,7 +345,6 @@ var DownloadCache = {
},
onBeginUpdateBatch() {},
onEndUpdateBatch() {},
onManyFrecenciesChanged() {},
onDeleteVisits() {},
};

Просмотреть файл

@ -579,13 +579,6 @@ interface nsINavHistoryObserver : nsISupports
*/
void onEndUpdateBatch();
/**
* Called when the frecencies of many pages have changed at once.
*
* onFrecencyChanged is not called for each of those pages.
*/
void onManyFrecenciesChanged();
/**
* Removed by the user.
*/

Просмотреть файл

@ -2257,9 +2257,6 @@ nsresult nsNavHistoryQueryResultNode::OnTitleChanged(
return ChangeTitles(aURI, newTitle, true, onlyOneEntry);
}
NS_IMETHODIMP
nsNavHistoryQueryResultNode::OnManyFrecenciesChanged() { return NS_OK; }
/**
* Here, we can always live update by just deleting all occurrences of
* the given URI.
@ -4214,9 +4211,6 @@ void nsNavHistoryResult::HandlePlacesEvent(const PlacesEventSequence& aEvents) {
}
}
NS_IMETHODIMP
nsNavHistoryResult::OnManyFrecenciesChanged() { return NS_OK; }
NS_IMETHODIMP
nsNavHistoryResult::OnDeleteURI(nsIURI* aURI, const nsACString& aGUID,
uint16_t aReason) {

Просмотреть файл

@ -64,7 +64,6 @@ class nsTrimInt64HashKey : public PLDHashEntryHdr {
// and nsINavHistoryObserver (some methods, such as BeginUpdateBatch overlap)
#define NS_DECL_BOOKMARK_HISTORY_OBSERVER_BASE(...) \
NS_DECL_NSINAVBOOKMARKOBSERVER \
NS_IMETHOD OnManyFrecenciesChanged() __VA_ARGS__; \
NS_IMETHOD OnDeleteURI(nsIURI* aURI, const nsACString& aGUID, \
uint16_t aReason) __VA_ARGS__; \
NS_IMETHOD OnDeleteVisits(nsIURI* aURI, bool aPartialRemoval, \

Просмотреть файл

@ -45,13 +45,6 @@ add_task(async function test_remove_single() {
observer = {
onBeginUpdateBatch() {},
onEndUpdateBatch() {},
onManyFrecenciesChanged() {
try {
Assert.ok(!shouldRemove, "Observing onManyFrecenciesChanged");
} finally {
resolve();
}
},
onDeleteURI(aURI) {
try {
Assert.ok(shouldRemove, "Observing onDeleteURI");

Просмотреть файл

@ -464,7 +464,6 @@ function getObserverPromise(bookmarkedUri) {
observer = {
onBeginUpdateBatch() {},
onEndUpdateBatch() {},
onManyFrecenciesChanged() {},
onDeleteURI(aURI) {
try {
Assert.notEqual(

Просмотреть файл

@ -83,7 +83,6 @@ add_task(async function test_remove_many() {
onVisits(aVisits) {
Assert.ok(false, "Unexpected call to onVisits " + aVisits.length);
},
onManyFrecenciesChanged() {},
onDeleteURI(aURI) {
let origin = pages.find(x => x.uri.spec == aURI.spec);
Assert.ok(origin);

Просмотреть файл

@ -144,12 +144,6 @@ add_task(async function test_removeVisitsByFilter() {
deferred: PromiseUtils.defer(),
onBeginUpdateBatch() {},
onEndUpdateBatch() {},
onManyFrecenciesChanged() {
info("Many frecencies changed");
for (let [, deferred] of rankingChangePromises) {
deferred.resolve();
}
},
onDeleteURI(aURI) {
info("onDeleteURI " + aURI.spec);
let deferred = uriDeletePromises.get(aURI.spec);