Bug 1678606: Remove onClearHistory interface from nsINavHistoryService. r=mixedpuppy,mak
authorDaisuke Akatsuka <daisuke@birchill.co.jp>
Wed, 23 Dec 2020 11:15:20 +0000
changeset 561688 87e34c325a1d767f8b8dd0aa499bbbb7c6c0d479
parent 561687 dd486bf6bbb8854c23779f7e5a8aea29aadc3a40
child 561689 1de3ccd3da570e852f14b86c21ff7a3fb5c82c75
push id38054
push userapavel@mozilla.com
push dateWed, 23 Dec 2020 21:27:50 +0000
treeherdermozilla-central@d6081a1bef2d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmixedpuppy, mak
bugs1678606
milestone86.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1678606: Remove onClearHistory interface from nsINavHistoryService. r=mixedpuppy,mak Depends on D99751 Differential Revision: https://phabricator.services.mozilla.com/D99752
browser/components/extensions/parent/ext-history.js
browser/components/newtab/lib/PlacesFeed.jsm
browser/components/newtab/test/unit/lib/PlacesFeed.test.js
browser/modules/WindowsJumpLists.jsm
services/sync/modules/engines/history.js
services/sync/tests/unit/head_helpers.js
toolkit/components/downloads/DownloadHistory.jsm
toolkit/components/downloads/DownloadIntegration.jsm
toolkit/components/places/PlacesExpiration.jsm
toolkit/components/places/nsINavHistoryService.idl
toolkit/components/places/nsNavHistoryResult.cpp
toolkit/components/places/nsNavHistoryResult.h
toolkit/components/places/tests/browser/head.js
toolkit/components/places/tests/expiration/test_notifications_onDeleteURI.js
toolkit/components/places/tests/expiration/test_notifications_onDeleteVisits.js
toolkit/components/places/tests/head_common.js
toolkit/components/places/tests/history/test_remove.js
toolkit/components/places/tests/history/test_removeByFilter.js
toolkit/components/places/tests/history/test_removeMany.js
toolkit/components/places/tests/history/test_removeVisitsByFilter.js
toolkit/components/places/tests/unit/test_history_observer.js
toolkit/components/thumbnails/PageThumbs.jsm
--- a/browser/components/extensions/parent/ext-history.js
+++ b/browser/components/extensions/parent/ext-history.js
@@ -99,19 +99,16 @@ var _observer;
 const getHistoryObserver = () => {
   if (!_observer) {
     _observer = new (class extends EventEmitter {
       onDeleteURI(uri, guid, reason) {
         this.emit("visitRemoved", { allHistory: false, urls: [uri.spec] });
       }
       onBeginUpdateBatch() {}
       onEndUpdateBatch() {}
-      onClearHistory() {
-        this.emit("visitRemoved", { allHistory: true, urls: [] });
-      }
       onFrecencyChanged() {}
       onManyFrecenciesChanged() {}
       onDeleteVisits(uri, partialRemoval, guid, reason) {
         if (!partialRemoval) {
           this.emit("visitRemoved", { allHistory: false, urls: [uri.spec] });
         }
       }
     })();
--- a/browser/components/newtab/lib/PlacesFeed.jsm
+++ b/browser/components/newtab/lib/PlacesFeed.jsm
@@ -63,23 +63,16 @@ class HistoryObserver extends Observer {
   onDeleteURI(uri) {
     this.dispatch({ type: at.PLACES_LINKS_CHANGED });
     this.dispatch({
       type: at.PLACES_LINK_DELETED,
       data: { url: uri.spec },
     });
   }
 
-  /**
-   * onClearHistory - Called when the user clears their entire history.
-   */
-  onClearHistory() {
-    this.dispatch({ type: at.PLACES_HISTORY_CLEARED });
-  }
-
   // Empty functions to make xpconnect happy
   onBeginUpdateBatch() {}
 
   onEndUpdateBatch() {}
 
   onFrecencyChanged() {}
 
   onManyFrecenciesChanged() {}
--- a/browser/components/newtab/test/unit/lib/PlacesFeed.test.js
+++ b/browser/components/newtab/test/unit/lib/PlacesFeed.test.js
@@ -757,22 +757,16 @@ describe("PlacesFeed", () => {
         await observer.onDeleteURI({ spec: "foo.com" });
 
         assert.calledWith(dispatch, {
           type: at.PLACES_LINK_DELETED,
           data: { url: "foo.com" },
         });
       });
     });
-    describe("#onClearHistory", () => {
-      it("should dispatch a PLACES_HISTORY_CLEARED action", () => {
-        observer.onClearHistory();
-        assert.calledWith(dispatch, { type: at.PLACES_HISTORY_CLEARED });
-      });
-    });
     describe("Other empty methods (to keep code coverage happy)", () => {
       it("should have a various empty functions for xpconnect happiness", () => {
         observer.onBeginUpdateBatch();
         observer.onEndUpdateBatch();
         observer.onFrecencyChanged();
         observer.onManyFrecenciesChanged();
         observer.onDeleteVisits();
       });
--- a/browser/modules/WindowsJumpLists.jsm
+++ b/browser/modules/WindowsJumpLists.jsm
@@ -65,32 +65,16 @@ ChromeUtils.defineModuleGetter(
   "resource://gre/modules/PlacesUtils.jsm"
 );
 ChromeUtils.defineModuleGetter(
   this,
   "PrivateBrowsingUtils",
   "resource://gre/modules/PrivateBrowsingUtils.jsm"
 );
 
-XPCOMUtils.defineLazyGetter(this, "gHistoryObserver", function() {
-  return Object.freeze({
-    onClearHistory() {
-      WinTaskbarJumpList.update();
-    },
-    onBeginUpdateBatch() {},
-    onEndUpdateBatch() {},
-    onVisits() {},
-    onFrecencyChanged() {},
-    onManyFrecenciesChanged() {},
-    onDeleteURI() {},
-    onDeleteVisits() {},
-    QueryInterface: ChromeUtils.generateQI(["nsINavHistoryObserver"]),
-  });
-});
-
 /**
  * Global functions
  */
 
 function _getString(name) {
   return _stringBundle.GetStringFromName(name);
 }
 
@@ -529,33 +513,29 @@ var WinTaskbarJumpList = {
 
   _initObs: function WTBJL__initObs() {
     // If the browser is closed while in private browsing mode, the "exit"
     // notification is fired on quit-application-granted.
     // History cleanup can happen at profile-change-teardown.
     Services.obs.addObserver(this, "profile-before-change");
     Services.obs.addObserver(this, "browser:purge-session-history");
     _prefs.addObserver("", this);
-    PlacesUtils.history.addObserver(gHistoryObserver, false);
-
     this._placesObserver = new PlacesWeakCallbackWrapper(
       this.update.bind(this)
     );
     PlacesUtils.observers.addListener(
       ["history-cleared"],
       this._placesObserver
     );
   },
 
   _freeObs: function WTBJL__freeObs() {
     Services.obs.removeObserver(this, "profile-before-change");
     Services.obs.removeObserver(this, "browser:purge-session-history");
     _prefs.removeObserver("", this);
-    PlacesUtils.history.removeObserver(gHistoryObserver);
-
     if (this._placesObserver) {
       PlacesUtils.observers.removeListener(
         ["history-cleared"],
         this._placesObserver
       );
     }
   },
 
--- a/services/sync/modules/engines/history.js
+++ b/services/sync/modules/engines/history.js
@@ -614,20 +614,12 @@ HistoryTracker.prototype = {
           // See Bug 578694.
           this.score += SCORE_INCREMENT_XLARGE;
           break;
         }
       }
     }
   },
 
-  onClearHistory() {
-    this._log.trace("onClearHistory");
-    // Note that we're going to trigger a sync, but none of the cleared
-    // pages are tracked, so the deletions will not be propagated.
-    // See Bug 578694.
-    this.score += SCORE_INCREMENT_XLARGE;
-  },
-
   onBeginUpdateBatch() {},
   onEndUpdateBatch() {},
   onBeforeDeleteURI() {},
 };
--- a/services/sync/tests/unit/head_helpers.js
+++ b/services/sync/tests/unit/head_helpers.js
@@ -633,17 +633,16 @@ async function promiseVisit(expectedType
       },
       onBeginUpdateBatch() {},
       onEndUpdateBatch() {},
       onFrecencyChanged() {},
       onManyFrecenciesChanged() {},
       onDeleteURI(uri) {
         done("removed", uri.spec);
       },
-      onClearHistory() {},
       onDeleteVisits() {},
     };
     PlacesUtils.history.addObserver(observer, false);
     PlacesObservers.addListener(["page-visited"], observer.handlePlacesEvents);
   });
 }
 
 async function addVisit(
--- a/toolkit/components/downloads/DownloadHistory.jsm
+++ b/toolkit/components/downloads/DownloadHistory.jsm
@@ -338,19 +338,16 @@ var DownloadCache = {
       }
     }
   },
 
   // nsINavHistoryObserver
   onDeleteURI(uri) {
     this._data.delete(uri.spec);
   },
-  onClearHistory() {
-    this._data.clear();
-  },
   onBeginUpdateBatch() {},
   onEndUpdateBatch() {},
   onFrecencyChanged() {},
   onManyFrecenciesChanged() {},
   onDeleteVisits() {},
 };
 
 /**
--- a/toolkit/components/downloads/DownloadIntegration.jsm
+++ b/toolkit/components/downloads/DownloadIntegration.jsm
@@ -1273,21 +1273,16 @@ DownloadHistoryObserver.prototype = {
 
   // nsINavHistoryObserver
   onDeleteURI: function DL_onDeleteURI(aURI, aGUID) {
     this._list.removeFinished(download =>
       aURI.equals(NetUtil.newURI(download.source.url))
     );
   },
 
-  // nsINavHistoryObserver
-  onClearHistory: function DL_onClearHistory() {
-    this._list.removeFinished();
-  },
-
   onBeginUpdateBatch() {},
   onEndUpdateBatch() {},
   onDeleteVisits() {},
 };
 
 /**
  * This view can be added to a DownloadList object to trigger a save operation
  * in the given DownloadStore object when a relevant change occurs.  You should
--- a/toolkit/components/places/PlacesExpiration.jsm
+++ b/toolkit/components/places/PlacesExpiration.jsm
@@ -548,62 +548,26 @@ nsPlacesExpiration.prototype = {
       if (!this._timer) {
         this._newTimer();
       }
     } else if (aTopic == TOPIC_IDLE_DAILY) {
       this._expire(ACTION.IDLE_DAILY, LIMIT.LARGE).catch(Cu.reportError);
     } else if (aTopic == TOPIC_TESTING_MODE) {
       this._testingMode = true;
     } else if (aTopic == PlacesUtils.TOPIC_INIT_COMPLETE) {
-      // Ideally we'd add this observer only when notifications start being
-      // triggered. However, that's difficult to work out, so we do it on
-      // TOPIC_INIT_COMPLETE which means we have to take the hit of initializing
-      // this service slightly earlier.
-      PlacesUtils.history.addObserver(this, true);
-
       const placesObserver = new PlacesWeakCallbackWrapper(
         // History status is clean after a clear history.
         () => {
           this.status = STATUS.CLEAN;
         }
       );
       PlacesObservers.addListener(["history-cleared"], placesObserver);
     }
   },
 
-  // nsINavHistoryObserver
-
-  _inBatchMode: false,
-  onBeginUpdateBatch: function PEX_onBeginUpdateBatch() {
-    this._inBatchMode = true;
-
-    // We do not want to expire while we are doing batch work.
-    if (this._timer) {
-      this._timer.cancel();
-      this._timer = null;
-    }
-  },
-
-  onEndUpdateBatch: function PEX_onEndUpdateBatch() {
-    this._inBatchMode = false;
-
-    // Restore timer.
-    if (!this._timer) {
-      this._newTimer();
-    }
-  },
-
-  onClearHistory: function PEX_onClearHistory() {
-    // History status is clean after a clear history.
-    this.status = STATUS.CLEAN;
-  },
-
-  onDeleteURI() {},
-  onDeleteVisits() {},
-
   // nsITimerCallback
 
   notify() {
     // Run at the first idle, or after 5 minutes, whatever comes first.
     Services.tm.idleDispatchToMainThread(async () => {
       let db = await PlacesUtils.promiseDBConnection();
       let pagesCount = (
         await db.executeCached("SELECT count(*) AS count FROM moz_places")
@@ -797,20 +761,16 @@ nsPlacesExpiration.prototype = {
    *
    * @param aAction
    *        The ACTION we are expiring for.  See the ACTION const for values.
    * @param aLimit
    *        Whether to use small, large or no limits when expiring.  See the
    *        LIMIT const for values.
    */
   async _expire(aAction, aLimit) {
-    // Skip expiration during batch mode.
-    if (this._inBatchMode) {
-      return;
-    }
     // Don't try to further expire after shutdown.
     if (this._shuttingDown && aAction != ACTION.SHUTDOWN_DIRTY) {
       return;
     }
     await this._dbInitializedPromise;
 
     try {
       await PlacesUtils.withConnectionWrapper(
--- a/toolkit/components/places/nsINavHistoryService.idl
+++ b/toolkit/components/places/nsINavHistoryService.idl
@@ -636,21 +636,16 @@ interface nsINavHistoryObserver : nsISup
    * @param aReason
    *        Indicates the reason for the removal.  see REASON_* constants.
    */
   void onDeleteURI(in nsIURI aURI,
                    in ACString aGUID,
                    in unsigned short aReason);
 
   /**
-   * Notification that all of history is being deleted.
-   */
-  void onClearHistory();
-
-  /**
    * Called when some visits of an history entry are expired.
    *
    * @param aURI
    *        The page whose visits have been expired.
    * @param aPartialRemoval
    *        Set to true if only some of the visits for the page have been removed.
    * @param aGUID
    *        The unique ID associated with the page.
--- a/toolkit/components/places/nsNavHistoryResult.cpp
+++ b/toolkit/components/places/nsNavHistoryResult.cpp
@@ -2319,18 +2319,17 @@ nsNavHistoryQueryResultNode::OnDeleteURI
       // as well.  If the parent is not the root node, append it to our list
       // and it will get evaluated later in the loop.
       matches.AppendObject(parent);
     }
   }
   return NS_OK;
 }
 
-NS_IMETHODIMP
-nsNavHistoryQueryResultNode::OnClearHistory() {
+nsresult nsNavHistoryQueryResultNode::OnClearHistory() {
   nsresult rv = Refresh();
   NS_ENSURE_SUCCESS(rv, rv);
   return NS_OK;
 }
 
 static nsresult setFaviconCallback(nsNavHistoryResultNode* aNode,
                                    const void* aClosure,
                                    const nsNavHistoryResult* aResult) {
@@ -4238,22 +4237,16 @@ NS_IMETHODIMP
 nsNavHistoryResult::OnDeleteURI(nsIURI* aURI, const nsACString& aGUID,
                                 uint16_t aReason) {
   NS_ENSURE_ARG(aURI);
 
   ENUMERATE_HISTORY_OBSERVERS(OnDeleteURI(aURI, aGUID, aReason));
   return NS_OK;
 }
 
-NS_IMETHODIMP
-nsNavHistoryResult::OnClearHistory() {
-  ENUMERATE_HISTORY_OBSERVERS(OnClearHistory());
-  return NS_OK;
-}
-
 /**
  * Don't do anything when visits expire.
  */
 NS_IMETHODIMP
 nsNavHistoryResult::OnDeleteVisits(nsIURI* aURI, bool aPartialRemoval,
                                    const nsACString& aGUID, uint16_t aReason,
                                    uint32_t aTransitionType) {
   NS_ENSURE_ARG(aURI);
--- a/toolkit/components/places/nsNavHistoryResult.h
+++ b/toolkit/components/places/nsNavHistoryResult.h
@@ -65,17 +65,16 @@ class nsTrimInt64HashKey : public PLDHas
 #define NS_DECL_BOOKMARK_HISTORY_OBSERVER_BASE(...)                    \
   NS_DECL_NSINAVBOOKMARKOBSERVER                                       \
   NS_IMETHOD OnFrecencyChanged(nsIURI* aURI, int32_t aNewFrecency,     \
                                const nsACString& aGUID, bool aHidden,  \
                                PRTime aLastVisitDate) __VA_ARGS__;     \
   NS_IMETHOD OnManyFrecenciesChanged() __VA_ARGS__;                    \
   NS_IMETHOD OnDeleteURI(nsIURI* aURI, const nsACString& aGUID,        \
                          uint16_t aReason) __VA_ARGS__;                \
-  NS_IMETHOD OnClearHistory() __VA_ARGS__;                             \
   NS_IMETHOD OnDeleteVisits(nsIURI* aURI, bool aPartialRemoval,        \
                             const nsACString& aGUID, uint16_t aReason, \
                             uint32_t aTransitionType) __VA_ARGS__;
 
 // The internal version is used by query nodes.
 #define NS_DECL_BOOKMARK_HISTORY_OBSERVER_INTERNAL \
   NS_DECL_BOOKMARK_HISTORY_OBSERVER_BASE()
 
@@ -705,16 +704,17 @@ class nsNavHistoryQueryResultNode final
 
   // The internal version has an output aAdded parameter, it is incremented by
   // query nodes when the visited uri belongs to them. If no such query exists,
   // the history result creates a new query node dynamically.
   nsresult OnVisit(nsIURI* aURI, int64_t aVisitId, PRTime aTime,
                    uint32_t aTransitionType, bool aHidden, uint32_t* aAdded);
   nsresult OnTitleChanged(nsIURI* aURI, const nsAString& aPageTitle,
                           const nsACString& aGUID);
+  nsresult OnClearHistory();
   virtual void OnRemoving() override;
 
  public:
   RefPtr<nsNavHistoryQuery> mQuery;
   uint32_t mLiveUpdate;  // one of QUERYUPDATE_* in nsNavHistory.h
   bool mHasSearchTerms;
 
   // safe options getter, ensures query is parsed
--- a/toolkit/components/places/tests/browser/head.js
+++ b/toolkit/components/places/tests/browser/head.js
@@ -85,17 +85,16 @@ function promiseFieldForUrl(aURI, aField
  * dummy methods to prevent errors about an object not having a certain method.
  */
 function NavHistoryObserver() {}
 
 NavHistoryObserver.prototype = {
   onBeginUpdateBatch() {},
   onEndUpdateBatch() {},
   onDeleteURI() {},
-  onClearHistory() {},
   onDeleteVisits() {},
   QueryInterface: ChromeUtils.generateQI(["nsINavHistoryObserver"]),
 };
 
 function whenNewWindowLoaded(aOptions, aCallback) {
   BrowserTestUtils.waitForNewWindow().then(aCallback);
   OpenBrowserWindow(aOptions);
 }
--- a/toolkit/components/places/tests/expiration/test_notifications_onDeleteURI.js
+++ b/toolkit/components/places/tests/expiration/test_notifications_onDeleteURI.js
@@ -74,17 +74,16 @@ add_task(async function test_notificatio
       });
       currentTest.bookmarks.push(page);
     }
 
     // Observe history.
     let historyObserver = {
       onBeginUpdateBatch: function PEX_onBeginUpdateBatch() {},
       onEndUpdateBatch: function PEX_onEndUpdateBatch() {},
-      onClearHistory() {},
       onDeleteURI(aURI, aGUID, aReason) {
         currentTest.receivedNotifications++;
         // Check this uri was not bookmarked.
         Assert.equal(currentTest.bookmarks.indexOf(aURI.spec), -1);
         do_check_valid_places_guid(aGUID);
         Assert.equal(aReason, Ci.nsINavHistoryObserver.REASON_EXPIRED);
       },
       onDeleteVisits() {},
--- a/toolkit/components/places/tests/expiration/test_notifications_onDeleteVisits.js
+++ b/toolkit/components/places/tests/expiration/test_notifications_onDeleteVisits.js
@@ -109,17 +109,16 @@ add_task(async function test_notificatio
       });
       currentTest.bookmarks.push(page);
     }
 
     // Observe history.
     let historyObserver = {
       onBeginUpdateBatch: function PEX_onBeginUpdateBatch() {},
       onEndUpdateBatch: function PEX_onEndUpdateBatch() {},
-      onClearHistory() {},
       onDeleteURI(aURI, aGUID, aReason) {
         // Check this uri was not bookmarked.
         Assert.equal(currentTest.bookmarks.indexOf(aURI.spec), -1);
         do_check_valid_places_guid(aGUID);
         Assert.equal(aReason, Ci.nsINavHistoryObserver.REASON_EXPIRED);
       },
       onDeleteVisits(aURI, aPartialRemoval, aGUID, aReason) {
         currentTest.receivedNotifications++;
--- a/toolkit/components/places/tests/head_common.js
+++ b/toolkit/components/places/tests/head_common.js
@@ -733,17 +733,16 @@ NavBookmarkObserver.prototype = {
  * dummy methods to prevent errors about an object not having a certain method.
  */
 function NavHistoryObserver() {}
 
 NavHistoryObserver.prototype = {
   onBeginUpdateBatch() {},
   onEndUpdateBatch() {},
   onDeleteURI() {},
-  onClearHistory() {},
   onDeleteVisits() {},
   QueryInterface: ChromeUtils.generateQI(["nsINavHistoryObserver"]),
 };
 
 /**
  * Generic nsINavHistoryResultObserver that doesn't implement anything, but
  * provides dummy methods to prevent errors about an object not having a certain
  * method.
--- a/toolkit/components/places/tests/history/test_remove.js
+++ b/toolkit/components/places/tests/history/test_remove.js
@@ -40,19 +40,16 @@ add_task(async function test_remove_sing
 
     let shouldRemove = !options.addBookmark;
     let observer;
     let placesEventListener;
     let promiseObserved = new Promise((resolve, reject) => {
       observer = {
         onBeginUpdateBatch() {},
         onEndUpdateBatch() {},
-        onClearHistory() {
-          reject("Unexpected call to onClearHistory");
-        },
         onFrecencyChanged(aURI) {
           try {
             Assert.ok(!shouldRemove, "Observing onFrecencyChanged");
             Assert.equal(
               aURI.spec,
               uri.spec,
               "Observing effect on the right uri"
             );
--- a/toolkit/components/places/tests/history/test_removeByFilter.js
+++ b/toolkit/components/places/tests/history/test_removeByFilter.js
@@ -459,19 +459,16 @@ function getObserverPromise(bookmarkedUr
     return { observer: null, promiseObserved: Promise.resolve() };
   }
   let observer;
   let placesEventListener;
   let promiseObserved = new Promise((resolve, reject) => {
     observer = {
       onBeginUpdateBatch() {},
       onEndUpdateBatch() {},
-      onClearHistory() {
-        reject(new Error("Unexpected call to onClearHistory"));
-      },
       onFrecencyChanged(aURI) {},
       onManyFrecenciesChanged() {},
       onDeleteURI(aURI) {
         try {
           Assert.notEqual(
             aURI.spec,
             bookmarkedUri,
             "Bookmarked URI should not be deleted"
--- a/toolkit/components/places/tests/history/test_removeMany.js
+++ b/toolkit/components/places/tests/history/test_removeMany.js
@@ -79,19 +79,16 @@ add_task(async function test_remove_many
   }
 
   let observer = {
     onBeginUpdateBatch() {},
     onEndUpdateBatch() {},
     onVisits(aVisits) {
       Assert.ok(false, "Unexpected call to onVisits " + aVisits.length);
     },
-    onClearHistory() {
-      Assert.ok(false, "Unexpected call to onClearHistory");
-    },
     onFrecencyChanged(aURI) {
       let origin = pages.find(x => x.uri.spec == aURI.spec);
       Assert.ok(origin);
       Assert.ok(
         origin.hasBookmark,
         "Observing onFrecencyChanged on a page with a bookmark"
       );
       origin.onFrecencyChangedCalled = true;
--- a/toolkit/components/places/tests/history/test_removeVisitsByFilter.js
+++ b/toolkit/components/places/tests/history/test_removeVisitsByFilter.js
@@ -143,19 +143,16 @@ add_task(async function test_removeVisit
         uriDeletePromises.set(removedItems[i].uri.spec, PromiseUtils.defer());
       }
     }
 
     let observer = {
       deferred: PromiseUtils.defer(),
       onBeginUpdateBatch() {},
       onEndUpdateBatch() {},
-      onClearHistory() {
-        this.deferred.reject("Unexpected call to onClearHistory");
-      },
       onFrecencyChanged(aURI) {
         info("onFrecencyChanged " + aURI.spec);
         let deferred = frecencyChangePromises.get(aURI.spec);
         Assert.ok(!!deferred, "Observing onFrecencyChanged");
         deferred.resolve();
       },
       onManyFrecenciesChanged() {
         info("Many frecencies changed");
--- a/toolkit/components/places/tests/unit/test_history_observer.js
+++ b/toolkit/components/places/tests/unit/test_history_observer.js
@@ -5,17 +5,16 @@
  * Generic nsINavHistoryObserver that doesn't implement anything, but provides
  * dummy methods to prevent errors about an object not having a certain method.
  */
 function NavHistoryObserver() {}
 NavHistoryObserver.prototype = {
   onBeginUpdateBatch() {},
   onEndUpdateBatch() {},
   onDeleteURI() {},
-  onClearHistory() {},
   onDeleteVisits() {},
   QueryInterface: ChromeUtils.generateQI(["nsINavHistoryObserver"]),
 };
 
 /**
  * Registers a one-time history observer for and calls the callback
  * when the specified nsINavHistoryObserver method is called.
  * Returns a promise that is resolved when the callback returns.
--- a/toolkit/components/thumbnails/PageThumbs.jsm
+++ b/toolkit/components/thumbnails/PageThumbs.jsm
@@ -878,20 +878,16 @@ var PageThumbsWorker = new BasePromiseWo
 // OS.File.Error, so we need to install a decoder.
 PageThumbsWorker.ExceptionHandlers["OS.File.Error"] = OS.File.Error.fromMsg;
 
 var PageThumbsHistoryObserver = {
   onDeleteURI(aURI, aGUID) {
     PageThumbsStorage.remove(aURI.spec);
   },
 
-  onClearHistory() {
-    PageThumbsStorage.wipe();
-  },
-
   onBeginUpdateBatch() {},
   onEndUpdateBatch() {},
   onDeleteVisits() {},
 
   QueryInterface: ChromeUtils.generateQI([
     "nsINavHistoryObserver",
     "nsISupportsWeakReference",
   ]),