зеркало из 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:
Родитель
70acccab0a
Коммит
7aa244ac52
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче