зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
d777ac2e60
Коммит
62162d18fd
|
@ -104,7 +104,6 @@ const getHistoryObserver = () => {
|
||||||
}
|
}
|
||||||
onBeginUpdateBatch() {}
|
onBeginUpdateBatch() {}
|
||||||
onEndUpdateBatch() {}
|
onEndUpdateBatch() {}
|
||||||
onManyFrecenciesChanged() {}
|
|
||||||
onDeleteVisits(uri, partialRemoval, guid, reason) {
|
onDeleteVisits(uri, partialRemoval, guid, reason) {
|
||||||
if (!partialRemoval) {
|
if (!partialRemoval) {
|
||||||
this.emit("visitRemoved", { allHistory: false, urls: [uri.spec] });
|
this.emit("visitRemoved", { allHistory: false, urls: [uri.spec] });
|
||||||
|
|
|
@ -73,8 +73,6 @@ class HistoryObserver extends Observer {
|
||||||
|
|
||||||
onEndUpdateBatch() {}
|
onEndUpdateBatch() {}
|
||||||
|
|
||||||
onManyFrecenciesChanged() {}
|
|
||||||
|
|
||||||
onDeleteVisits() {}
|
onDeleteVisits() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -766,7 +766,6 @@ describe("PlacesFeed", () => {
|
||||||
it("should have a various empty functions for xpconnect happiness", () => {
|
it("should have a various empty functions for xpconnect happiness", () => {
|
||||||
observer.onBeginUpdateBatch();
|
observer.onBeginUpdateBatch();
|
||||||
observer.onEndUpdateBatch();
|
observer.onEndUpdateBatch();
|
||||||
observer.onManyFrecenciesChanged();
|
|
||||||
observer.onDeleteVisits();
|
observer.onDeleteVisits();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -633,7 +633,6 @@ async function promiseVisit(expectedType, expectedURI) {
|
||||||
},
|
},
|
||||||
onBeginUpdateBatch() {},
|
onBeginUpdateBatch() {},
|
||||||
onEndUpdateBatch() {},
|
onEndUpdateBatch() {},
|
||||||
onManyFrecenciesChanged() {},
|
|
||||||
onDeleteURI(uri) {
|
onDeleteURI(uri) {
|
||||||
done("removed", uri.spec);
|
done("removed", uri.spec);
|
||||||
},
|
},
|
||||||
|
|
|
@ -345,7 +345,6 @@ var DownloadCache = {
|
||||||
},
|
},
|
||||||
onBeginUpdateBatch() {},
|
onBeginUpdateBatch() {},
|
||||||
onEndUpdateBatch() {},
|
onEndUpdateBatch() {},
|
||||||
onManyFrecenciesChanged() {},
|
|
||||||
onDeleteVisits() {},
|
onDeleteVisits() {},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -579,13 +579,6 @@ interface nsINavHistoryObserver : nsISupports
|
||||||
*/
|
*/
|
||||||
void onEndUpdateBatch();
|
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.
|
* Removed by the user.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2257,9 +2257,6 @@ nsresult nsNavHistoryQueryResultNode::OnTitleChanged(
|
||||||
return ChangeTitles(aURI, newTitle, true, onlyOneEntry);
|
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
|
* Here, we can always live update by just deleting all occurrences of
|
||||||
* the given URI.
|
* the given URI.
|
||||||
|
@ -4214,9 +4211,6 @@ void nsNavHistoryResult::HandlePlacesEvent(const PlacesEventSequence& aEvents) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
nsNavHistoryResult::OnManyFrecenciesChanged() { return NS_OK; }
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsNavHistoryResult::OnDeleteURI(nsIURI* aURI, const nsACString& aGUID,
|
nsNavHistoryResult::OnDeleteURI(nsIURI* aURI, const nsACString& aGUID,
|
||||||
uint16_t aReason) {
|
uint16_t aReason) {
|
||||||
|
|
|
@ -64,7 +64,6 @@ class nsTrimInt64HashKey : public PLDHashEntryHdr {
|
||||||
// and nsINavHistoryObserver (some methods, such as BeginUpdateBatch overlap)
|
// and nsINavHistoryObserver (some methods, such as BeginUpdateBatch overlap)
|
||||||
#define NS_DECL_BOOKMARK_HISTORY_OBSERVER_BASE(...) \
|
#define NS_DECL_BOOKMARK_HISTORY_OBSERVER_BASE(...) \
|
||||||
NS_DECL_NSINAVBOOKMARKOBSERVER \
|
NS_DECL_NSINAVBOOKMARKOBSERVER \
|
||||||
NS_IMETHOD OnManyFrecenciesChanged() __VA_ARGS__; \
|
|
||||||
NS_IMETHOD OnDeleteURI(nsIURI* aURI, const nsACString& aGUID, \
|
NS_IMETHOD OnDeleteURI(nsIURI* aURI, const nsACString& aGUID, \
|
||||||
uint16_t aReason) __VA_ARGS__; \
|
uint16_t aReason) __VA_ARGS__; \
|
||||||
NS_IMETHOD OnDeleteVisits(nsIURI* aURI, bool aPartialRemoval, \
|
NS_IMETHOD OnDeleteVisits(nsIURI* aURI, bool aPartialRemoval, \
|
||||||
|
|
|
@ -45,13 +45,6 @@ add_task(async function test_remove_single() {
|
||||||
observer = {
|
observer = {
|
||||||
onBeginUpdateBatch() {},
|
onBeginUpdateBatch() {},
|
||||||
onEndUpdateBatch() {},
|
onEndUpdateBatch() {},
|
||||||
onManyFrecenciesChanged() {
|
|
||||||
try {
|
|
||||||
Assert.ok(!shouldRemove, "Observing onManyFrecenciesChanged");
|
|
||||||
} finally {
|
|
||||||
resolve();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onDeleteURI(aURI) {
|
onDeleteURI(aURI) {
|
||||||
try {
|
try {
|
||||||
Assert.ok(shouldRemove, "Observing onDeleteURI");
|
Assert.ok(shouldRemove, "Observing onDeleteURI");
|
||||||
|
|
|
@ -464,7 +464,6 @@ function getObserverPromise(bookmarkedUri) {
|
||||||
observer = {
|
observer = {
|
||||||
onBeginUpdateBatch() {},
|
onBeginUpdateBatch() {},
|
||||||
onEndUpdateBatch() {},
|
onEndUpdateBatch() {},
|
||||||
onManyFrecenciesChanged() {},
|
|
||||||
onDeleteURI(aURI) {
|
onDeleteURI(aURI) {
|
||||||
try {
|
try {
|
||||||
Assert.notEqual(
|
Assert.notEqual(
|
||||||
|
|
|
@ -83,7 +83,6 @@ add_task(async function test_remove_many() {
|
||||||
onVisits(aVisits) {
|
onVisits(aVisits) {
|
||||||
Assert.ok(false, "Unexpected call to onVisits " + aVisits.length);
|
Assert.ok(false, "Unexpected call to onVisits " + aVisits.length);
|
||||||
},
|
},
|
||||||
onManyFrecenciesChanged() {},
|
|
||||||
onDeleteURI(aURI) {
|
onDeleteURI(aURI) {
|
||||||
let origin = pages.find(x => x.uri.spec == aURI.spec);
|
let origin = pages.find(x => x.uri.spec == aURI.spec);
|
||||||
Assert.ok(origin);
|
Assert.ok(origin);
|
||||||
|
|
|
@ -144,12 +144,6 @@ add_task(async function test_removeVisitsByFilter() {
|
||||||
deferred: PromiseUtils.defer(),
|
deferred: PromiseUtils.defer(),
|
||||||
onBeginUpdateBatch() {},
|
onBeginUpdateBatch() {},
|
||||||
onEndUpdateBatch() {},
|
onEndUpdateBatch() {},
|
||||||
onManyFrecenciesChanged() {
|
|
||||||
info("Many frecencies changed");
|
|
||||||
for (let [, deferred] of rankingChangePromises) {
|
|
||||||
deferred.resolve();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onDeleteURI(aURI) {
|
onDeleteURI(aURI) {
|
||||||
info("onDeleteURI " + aURI.spec);
|
info("onDeleteURI " + aURI.spec);
|
||||||
let deferred = uriDeletePromises.get(aURI.spec);
|
let deferred = uriDeletePromises.get(aURI.spec);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче