Bug 520165 - Part8: Change onPageExpired to onDeleteVisits, r=mano, sr=mconnor
authorMarco Bonardo <mbonardo@mozilla.com>
Fri, 15 Jan 2010 17:40:17 +0100
changeset 37226 1a6355f9da5a6f7e43b906f49e487523f59c322e
parent 37225 6070563dee67be37a4f45cf829cea2ad2ea3c119
child 37227 15937d3e58341a1e4aff8b04729f3cf9d94467d6
push idunknown
push userunknown
push dateunknown
reviewersmano, mconnor
bugs520165
milestone1.9.3a1pre
Bug 520165 - Part8: Change onPageExpired to onDeleteVisits, r=mano, sr=mconnor
browser/components/feeds/src/FeedWriter.js
browser/components/privatebrowsing/test/browser/browser_privatebrowsing_placestitle.js
toolkit/components/downloads/src/nsDownloadManager.cpp
toolkit/components/places/public/nsINavHistoryService.idl
toolkit/components/places/public/nsPIPlacesHistoryListenersNotifier.idl
toolkit/components/places/src/nsNavBookmarks.cpp
toolkit/components/places/src/nsNavHistory.cpp
toolkit/components/places/src/nsNavHistoryExpire.cpp
toolkit/components/places/src/nsNavHistoryResult.cpp
toolkit/components/places/src/nsNavHistoryResult.h
toolkit/components/places/src/nsPlacesDBFlush.js
toolkit/components/places/tests/browser/browser_bug399606.js
toolkit/components/places/tests/sync/test_expire_on_timed_flush.js
toolkit/components/places/tests/sync/test_expire_on_timed_flush_not_whole_entry.js
toolkit/components/places/tests/sync/test_expire_on_timed_flush_obeys_date.js
toolkit/components/places/tests/unit/nsDummyObserver.js
toolkit/components/places/tests/unit/test_399606.js
toolkit/components/places/tests/unit/test_doSetAndLoadFaviconForPage.js
toolkit/components/places/tests/unit/test_expiration.js
toolkit/components/places/tests/unit/test_history_removeAllPages.js
toolkit/components/places/tests/unit/test_markpageas.js
toolkit/components/places/tests/unit/test_onBeforeDeleteURI_observer.js
--- a/browser/components/feeds/src/FeedWriter.js
+++ b/browser/components/feeds/src/FeedWriter.js
@@ -1410,17 +1410,17 @@ FeedWriter.prototype = {
 
    onBeginUpdateBatch: function() { },
    onEndUpdateBatch: function() { },
    onVisit: function() { },
    onTitleChanged: function() { },
    onBeforeDeleteURI: function() { },
    onDeleteURI: function() { },
    onClearHistory: function() { },
-   onPageExpired: function() { },
+   onDeleteVisits: function() { },
 
   // nsIClassInfo
   getInterfaces: function FW_getInterfaces(countRef) {
     var interfaces = [Ci.nsIFeedWriter, Ci.nsIClassInfo, Ci.nsISupports];
     countRef.value = interfaces.length;
     return interfaces;
   },
   getHelperForLanguage: function FW_getHelperForLanguage(language) null,
--- a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_placestitle.js
+++ b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_placestitle.js
@@ -104,17 +104,17 @@ function test() {
     onBeforeDeleteURI: function(aURI) {
     },
     onDeleteURI: function(aURI) {
     },
     onClearHistory: function() {
     },
     onPageChanged: function(aURI, aWhat, aValue) {
     },
-    onPageExpired: function(aURI, aVisitTime, aWholeEntry) {
+    onDeleteVisits: function() {
     },
     QueryInterface: function(iid) {
       if (iid.equals(Ci.nsINavHistoryObserver) ||
           iid.equals(Ci.nsISupports)) {
         return this;
       }
       throw Cr.NS_ERROR_NO_INTERFACE;
     }
--- a/toolkit/components/downloads/src/nsDownloadManager.cpp
+++ b/toolkit/components/downloads/src/nsDownloadManager.cpp
@@ -1846,24 +1846,20 @@ nsDownloadManager::OnClearHistory()
 NS_IMETHODIMP
 nsDownloadManager::OnPageChanged(nsIURI *aURI, PRUint32 aWhat,
                                  const nsAString &aValue)
 {
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsDownloadManager::OnPageExpired(nsIURI *aURI, PRTime aVisitTime,
-                                 PRBool aWholeEntry)
+nsDownloadManager::OnDeleteVisits(nsIURI *aURI, PRTime aVisitTime)
 {
-  // Don't bother removing downloads if there are still recent visits
-  if (!aWholeEntry)
-    return NS_OK;
-
-  return RemoveDownloadsForURI(aURI);
+  // Don't bother removing downloads until the page is removed.
+  return NS_OK;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 //// nsIObserver
 
 NS_IMETHODIMP
 nsDownloadManager::Observe(nsISupports *aSubject,
                            const char *aTopic,
--- a/toolkit/components/places/public/nsINavHistoryService.idl
+++ b/toolkit/components/places/public/nsINavHistoryService.idl
@@ -721,17 +721,17 @@ interface nsINavHistoryResult : nsISuppo
 
 /**
  * Similar to nsIRDFObserver for history. Note that we don't pass the data
  * source since that is always the global history.
  *
  * DANGER! If you are in the middle of a batch transaction, there may be a
  * database transaction active. You can still access the DB, but be careful.
  */
-[scriptable, uuid(14065711-8a91-4d96-ba32-59512f5401b6)]
+[scriptable, uuid(0a5ce210-c803-11de-8a39-0800200c9a66)]
 interface nsINavHistoryObserver : nsISupports
 {
   /**
    * Notifies you that a bunch of things are about to change, don't do any
    * heavy-duty processing until onEndUpdateBatch is called.
    */
   void onBeginUpdateBatch();
 
@@ -809,28 +809,30 @@ interface nsINavHistoryObserver : nsISup
   /**
    * A page has had some attribute on it changed. Note that for TYPED and
    * HIDDEN, the page may not necessarily have been added yet.
    */
   const unsigned long ATTRIBUTE_FAVICON = 3; // favicon updated, aString = favicon annotation URI
   void onPageChanged(in nsIURI aURI, in unsigned long aWhat, in AString aValue);
 
   /**
-   * Called when a history entry expires. You will receive notifications that
-   * a specific visit has expired with the time of that visit. When the last
-   * visit for a history entry expires, the history entry itself is deleted
-   * and aWholeEntry is set. (If your observer only cares about URLs and not
-   * specific visits, it needs only to listen for aWholeEntry notifications).
+   * Called when some visits of an history entry are expired.
    *
-   * It is possible for a history entry to be deleted that has no visits if
-   * something is out of sync or after a bookmark is deleted that has no
-   * visits (thus freeing the history entry). In these cases, aVisitTime will
-   * be 0.
+   * @param aURI
+   *        The page whose visits have been expired.
+   * @param aVisitTime
+   *        The largest visit time in microseconds that has been expired.  We
+   *        guarantee that we don't have any visit older than this date.
+   *
+   * @note: when all visits for a page are expired and also the full page entry
+   *        is expired, you will only get an onDeleteURI notification.  If a
+   *        page entry is removed, then you can be sure that we don't have
+   *        anymore visits for it.
    */
-  void onPageExpired(in nsIURI aURI, in PRTime aVisitTime, in boolean aWholeEntry);
+  void onDeleteVisits(in nsIURI aURI, in PRTime aVisitTime);
 };
 
 
 /**
  * This object encapsulates all the query parameters you're likely to need
  * when building up history UI. All parameters are ANDed together.
  *
  * This is not intended to be a super-general query mechanism. This was designed
--- a/toolkit/components/places/public/nsPIPlacesHistoryListenersNotifier.idl
+++ b/toolkit/components/places/public/nsPIPlacesHistoryListenersNotifier.idl
@@ -47,17 +47,18 @@ interface nsIURI;
  * code that is not part of core.
  *
  * @note See also: nsINavHistoryObserver
  */
 [scriptable, uuid(b96adaff-e02c-48da-a379-8af5d10e09af)]
 interface nsPIPlacesHistoryListenersNotifier : nsISupports
 {
   /**
-   * Calls onPageExpired on registered listeners with the history service.
+   * Calls onDeleteVisits and onDeleteURI notifications on registered listeners
+   * with the history service.
    *
    * @param aURI
    *        The nsIURI object representing the URI of the page being expired.
    * @param aVisitTime
    *        The time, in microseconds, that the page being expired was visited.
    * @param aWholeEntry
    *        Indicates if this is the last visit for this URI.
    */
--- a/toolkit/components/places/src/nsNavBookmarks.cpp
+++ b/toolkit/components/places/src/nsNavBookmarks.cpp
@@ -3176,18 +3176,17 @@ nsNavBookmarks::OnPageChanged(nsIURI *aU
                                             TYPE_BOOKMARK));
       }
     }
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsNavBookmarks::OnPageExpired(nsIURI* aURI, PRTime aVisitTime,
-                              PRBool aWholeEntry)
+nsNavBookmarks::OnDeleteVisits(nsIURI* aURI, PRTime aVisitTime)
 {
   // pages that are bookmarks shouldn't expire, so we don't need to handle it
   return NS_OK;
 }
 
 // nsIAnnotationObserver
 
 NS_IMETHODIMP
--- a/toolkit/components/places/src/nsNavHistory.cpp
+++ b/toolkit/components/places/src/nsNavHistory.cpp
@@ -5488,23 +5488,27 @@ nsNavHistory::FinalizeInternalStatements
 }
 
 // nsPIPlacesHistoryListenersNotifier ******************************************
 
 NS_IMETHODIMP
 nsNavHistory::NotifyOnPageExpired(nsIURI *aURI, PRTime aVisitTime,
                                   PRBool aWholeEntry)
 {
-  ENUMERATE_OBSERVERS(mCanNotify, mCacheObservers, mObservers, nsINavHistoryObserver,
-                      OnPageExpired(aURI, aVisitTime, aWholeEntry));
   if (aWholeEntry) {
-    // Notify our observers that the URI has been removed.
+    // Notify our observers that the page has been removed.
     ENUMERATE_OBSERVERS(mCanNotify, mCacheObservers, mObservers,
                         nsINavHistoryObserver, OnDeleteURI(aURI));
   }
+  else {
+    // Notify our observers that some visits for the page have been removed.
+    ENUMERATE_OBSERVERS(mCanNotify, mCacheObservers, mObservers,
+                        nsINavHistoryObserver,
+                        OnDeleteVisits(aURI, aVisitTime));
+  }
 
   return NS_OK;
 }
 
 // nsIObserver *****************************************************************
 
 NS_IMETHODIMP
 nsNavHistory::Observe(nsISupports *aSubject, const char *aTopic,
--- a/toolkit/components/places/src/nsNavHistoryExpire.cpp
+++ b/toolkit/components/places/src/nsNavHistoryExpire.cpp
@@ -331,18 +331,17 @@ nsNavHistoryExpire::ExpireItems(PRUint32
       continue;
     }
 
     // FIXME bug 325241 provide a way to observe hidden elements
     if (expiredVisits[i].hidden) continue;
 
     ENUMERATE_OBSERVERS(mHistory->canNotify(), mHistory->mCacheObservers,
                         mHistory->mObservers, nsINavHistoryObserver,
-                        OnPageExpired(uri, expiredVisits[i].visitDate,
-                                      expiredVisits[i].erased));
+                        OnDeleteVisits(uri, expiredVisits[i].visitDate));
   }
 
   // Don't worry about errors here, it doesn't affect our ability to continue.
   rv = EraseFavicons(expiredVisits);
   NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "EraseFavicons Failed");
   rv = EraseAnnotations(expiredVisits);
   NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "EraseAnnotations Failed");
   rv = ExpireAnnotations();
--- a/toolkit/components/places/src/nsNavHistoryResult.cpp
+++ b/toolkit/components/places/src/nsNavHistoryResult.cpp
@@ -2995,24 +2995,23 @@ nsNavHistoryQueryResultNode::OnPageChang
     }
     default:
       NS_WARNING("Unknown page changed notification");
   }
   return NS_OK;
 }
 
 
-// nsNavHistoryQueryResultNode::OnPageExpired
+// nsNavHistoryQueryResultNode::OnDeleteVisits
 //
 //    Do nothing. Perhaps we want to handle this case. If so, add the call to
 //    the result to enumerate the history observers.
 
 NS_IMETHODIMP
-nsNavHistoryQueryResultNode::OnPageExpired(nsIURI* aURI, PRTime aVisitTime,
-                                           PRBool aWholeEntry)
+nsNavHistoryQueryResultNode::OnDeleteVisits(nsIURI* aURI, PRTime aVisitTime)
 {
   return NS_OK;
 }
 
 // nsNavHistoryQueryResultNode bookmark observers
 //
 //    These are the bookmark observer functions for query nodes. They listen
 //    for bookmark events and refresh the results if we have any dependence on
@@ -4630,19 +4629,17 @@ NS_IMETHODIMP
 nsNavHistoryResult::OnPageChanged(nsIURI *aURI,
                                   PRUint32 aWhat, const nsAString &aValue)
 {
   ENUMERATE_HISTORY_OBSERVERS(OnPageChanged(aURI, aWhat, aValue));
   return NS_OK;
 }
 
 
-// nsNavHistoryResult;:OnPageExpired (nsINavHistoryObserver)
+// nsNavHistoryResult::OnDeleteVisits (nsINavHistoryObserver)
 //
-//    Don't do anything when pages expire. Perhaps we want to find the item
-//    to delete it.
+//    Don't do anything when visits expire.
 
 NS_IMETHODIMP
-nsNavHistoryResult::OnPageExpired(nsIURI* aURI, PRTime aVisitTime,
-                                  PRBool aWholeEntry)
+nsNavHistoryResult::OnDeleteVisits(nsIURI* aURI, PRTime aVisitTime)
 {
   return NS_OK;
 }
--- a/toolkit/components/places/src/nsNavHistoryResult.h
+++ b/toolkit/components/places/src/nsNavHistoryResult.h
@@ -98,18 +98,17 @@ private:
                      PRInt64 aSessionId, PRInt64 aReferringId,          \
                      PRUint32 aTransitionType, PRUint32* aAdded);       \
   NS_IMETHOD OnTitleChanged(nsIURI* aURI, const nsAString& aPageTitle); \
   NS_IMETHOD OnBeforeDeleteURI(nsIURI *aURI);                           \
   NS_IMETHOD OnDeleteURI(nsIURI *aURI);                                 \
   NS_IMETHOD OnClearHistory();                                          \
   NS_IMETHOD OnPageChanged(nsIURI *aURI, PRUint32 aWhat,                \
                            const nsAString &aValue);                    \
-  NS_IMETHOD OnPageExpired(nsIURI* aURI, PRTime aVisitTime,             \
-                           PRBool aWholeEntry);
+  NS_IMETHOD OnDeleteVisits(nsIURI* aURI, PRTime aVisitTime);
 
 // nsNavHistoryResult
 //
 //    nsNavHistory creates this object and fills in mChildren (by getting
 //    it through GetTopLevel()). Then FilledAllResults() is called to finish
 //    object initialization.
 //
 //    This object implements nsITreeView so you can just set it to a tree
--- a/toolkit/components/places/src/nsPlacesDBFlush.js
+++ b/toolkit/components/places/src/nsPlacesDBFlush.js
@@ -263,23 +263,23 @@ nsPlacesDBFlush.prototype = {
   // We currently only use the history observer to know when the history service
   // is activated.  At that point, we actually get initialized, and our timer
   // to sync history is added.
 
   // These methods share the name of the ones on nsINavBookmarkObserver, so
   // the implementations can be found above.
   //onBeginUpdateBatch: function() { },
   //onEndUpdateBatch: function() { },
-  onVisit: function(aURI, aVisitID, aTime, aSessionID, aReferringID, aTransitionType) { },
-  onTitleChanged: function(aURI, aPageTitle) { },
-  onBeforeDeleteURI: function(aURI) { },
-  onDeleteURI: function(aURI) { },
+  onVisit: function() { },
+  onTitleChanged: function() { },
+  onBeforeDeleteURI: function() { },
+  onDeleteURI: function() { },
   onClearHistory: function() { },
-  onPageChanged: function(aURI, aWhat, aValue) { },
-  onPageExpired: function(aURI, aVisitTime, aWholeEntry) { },
+  onPageChanged: function() { },
+  onDeleteVisits: function() { },
 
   //////////////////////////////////////////////////////////////////////////////
   //// nsITimerCallback
 
   notify: function DBFlush_timerCallback()
   {
     let queries = [
       kQuerySelectExpireVisitsId,
--- a/toolkit/components/places/tests/browser/browser_bug399606.js
+++ b/toolkit/components/places/tests/browser/browser_bug399606.js
@@ -65,17 +65,17 @@ function test() {
       else
         this.visitCount[aURI.spec] = 1;
     },
     onTitleChanged: function(aURI, aPageTitle) {},
     onBeforeDeleteURI: function(aURI) {},
     onDeleteURI: function(aURI) {},
     onClearHistory: function() {},
     onPageChanged: function(aURI, aWhat, aValue) {},
-    onPageExpired: function(aURI, aVisitTime, aWholeEntry) {},
+    onDeleteVisits: function() {},
     QueryInterface: XPCOMUtils.generateQI([Ci.nsINavHistoryObserver])
   };
   hs.addObserver(historyObserver, false);
 
   function confirm_results() {
     hs.removeObserver(historyObserver, false);
     for (let aURI in historyObserver.visitCount) {
       is(historyObserver.visitCount[aURI], 1, "onVisit has been received right number of times for " + aURI);
--- a/toolkit/components/places/tests/sync/test_expire_on_timed_flush.js
+++ b/toolkit/components/places/tests/sync/test_expire_on_timed_flush.js
@@ -80,29 +80,23 @@ var observer = {
   }
 }
 os.addObserver(observer, kSyncFinished, false);
 
 // Used to ensure that we did in fact get notified about our expiration.
 var historyObserver = {
   visitTime: -1,
   _runCount: 0,
-  onPageExpired: function(aURI, aVisitTime, aWholeEntry)
+  onDeleteVisits: function(aURI, aVisitTime)
   {
     do_check_true(aURI.equals(uri(TEST_URI)));
 
     // We should have the visit time that was set in the addVisit call.
     do_check_eq(this.visitTime, aVisitTime);
 
-    // This was the only visit for this uri, so ensure that aWholeEntry is true.
-    if (++this._runCount == 1)
-      do_check_false(aWholeEntry);
-    else
-      do_check_true(aWholeEntry);
-
     observer.notificationReceived = true;
     hs.removeObserver(this, false);
   }
 }
 hs.addObserver(historyObserver, false);
 
 function run_test()
 {
--- a/toolkit/components/places/tests/sync/test_expire_on_timed_flush_not_whole_entry.js
+++ b/toolkit/components/places/tests/sync/test_expire_on_timed_flush_not_whole_entry.js
@@ -82,26 +82,23 @@ var observer = {
     }
   }
 }
 os.addObserver(observer, kSyncFinished, false);
 
 // Used to ensure that we did in fact get notified about our expiration.
 var historyObserver = {
   visitTime: -1,
-  onPageExpired: function(aURI, aVisitTime, aWholeEntry)
+  onDeleteVisits: function(aURI, aVisitTime)
   {
     do_check_true(aURI.equals(uri(TEST_URI)));
 
     // We should have the visit time that was set in the addVisit call.
     do_check_eq(this.visitTime, aVisitTime);
 
-    // This was not the only visit, so aWholeEntry better be false!
-    do_check_false(aWholeEntry);
-
     // We should only be called once.
     do_check_false(observer.notificationReceived);
     observer.notificationReceived = true;
     hs.removeObserver(this, false);
   }
 }
 hs.addObserver(historyObserver, false);
 
--- a/toolkit/components/places/tests/sync/test_expire_on_timed_flush_obeys_date.js
+++ b/toolkit/components/places/tests/sync/test_expire_on_timed_flush_obeys_date.js
@@ -80,17 +80,17 @@ var observer = {
       new_test_visit_uri_event(this.visitId, TEST_URI, true, true);
     }
   }
 }
 os.addObserver(observer, kSyncFinished, false);
 
 // Used to ensure that we do not expire anything.
 var historyObserver = {
-  onPageExpired: function(aURI, aVisitTime, aWholeEntry)
+  onDeleteVisits: function(aURI, aVisitTime)
   {
     do_throw("How did we get called?!");
     observer.notificationReceived = true;
   }
 }
 hs.addObserver(historyObserver, false);
 
 function run_test()
--- a/toolkit/components/places/tests/unit/nsDummyObserver.js
+++ b/toolkit/components/places/tests/unit/nsDummyObserver.js
@@ -55,17 +55,17 @@ DummyObserver.prototype = {
              getService(Ci.nsIObserverService);
     os.notifyObservers(null, "dummy-observer-visited", null);
   },
   onTitleChanged: function(aURI, aPageTitle) {},
   onBeforeDeleteURI: function(aURI) {},
   onDeleteURI: function(aURI) {},
   onClearHistory: function() {},
   onPageChanged: function(aURI, aWhat, aValue) {},
-  onPageExpired: function(aURI, aVisitTime, aWholeEntry) {},
+  onDeleteVisits: function(aURI, aVisitTime) {},
 
   // bookmark observer
   //onBeginUpdateBatch: function() {},
   //onEndUpdateBatch: function() {},
   onItemAdded: function(aItemId, aParentId, aIndex, aItemType) {
     let os = Cc["@mozilla.org/observer-service;1"].
              getService(Ci.nsIObserverService);
     os.notifyObservers(null, "dummy-observer-item-added", null);
--- a/toolkit/components/places/tests/unit/test_399606.js
+++ b/toolkit/components/places/tests/unit/test_399606.js
@@ -61,17 +61,17 @@ var observer = {
     dump("onVisit: " + aURI.spec + "\n");
     confirm_results();
   },
   onTitleChanged: function(aURI, aPageTitle) {},
   onBeforeDeleteURI: function(aURI) {},
   onDeleteURI: function(aURI) {},
   onClearHistory: function() {},
   onPageChanged: function(aURI, aWhat, aValue) {},
-  onPageExpired: function(aURI, aVisitTime, aWholeEntry) {},
+  onDeleteVisits: function() {},
   QueryInterface: function(iid) {
     if (iid.equals(Ci.nsINavHistoryObserver) ||
         iid.equals(Ci.nsISupports)) {
       return this;
     }
     throw Cr.NS_ERROR_NO_INTERFACE;
   }
 };
--- a/toolkit/components/places/tests/unit/test_doSetAndLoadFaviconForPage.js
+++ b/toolkit/components/places/tests/unit/test_doSetAndLoadFaviconForPage.js
@@ -179,17 +179,17 @@ if ("@mozilla.org/privatebrowsing;1" in 
 var historyObserver = {
   onBeginUpdateBatch: function() {},
   onEndUpdateBatch: function() {},
   onVisit: function() {},
   onTitleChanged: function() {},
   onBeforeDeleteURI: function() {},
   onDeleteURI: function() {},
   onClearHistory: function() {},
-  onPageExpired: function() {},
+  onDeleteVisits: function() {},
 
   onPageChanged: function historyObserver_onPageChanged(pageURI, what, value) {
     if (what != Ci.nsINavHistoryObserver.ATTRIBUTE_FAVICON)
       return;
 
     if (pageURI.equals(tests[currentTestIndex].pageURI)) {
       tests[currentTestIndex].check();
       currentTestIndex++;
--- a/toolkit/components/places/tests/unit/test_expiration.js
+++ b/toolkit/components/places/tests/unit/test_expiration.js
@@ -67,17 +67,17 @@ var observer = {
   onDeleteURI: function(aURI) {
   },
   onClearHistory: function() {
     this.historyCleared = true;
   },
   onPageChanged: function(aURI, aWhat, aValue) {
   },
   expiredURI: null,
-  onPageExpired: function(aURI, aVisitTime, aWholeEntry) {
+  onDeleteVisits: function(aURI, aVisitTime) {
     this.expiredURI = aURI.spec;
   },
   QueryInterface: function(iid) {
     if (iid.equals(Ci.nsINavBookmarkObserver) ||
         iid.equals(Ci.nsISupports)) {
       return this;
     }
     throw Cr.NS_ERROR_NO_INTERFACE;
@@ -497,17 +497,17 @@ steps:
   - reset observer
   - add a visit, w/ current date
   - set browser.history_expire_days to 3
   - set browser.history_expire_days_min to 2
   - set browser.history_expire_sites to 2
   - kick off incremental expiration
 
 confirmation:
-  - check onPageExpired, confirm nothing was expired
+  - check onDeleteVisits, confirm nothing was expired
   - query for the visit, confirm it's there
 
 */
 function startExpireNeither() {
   dump("startExpireNeither()\n");
   // Cleanup.
   histsvc.removeAllPages();
   observer.expiredURI = null;
@@ -556,17 +556,17 @@ steps:
   - add a visit, 4 days old (expirable)
   - add a visit, 1 day old (not expirable)
   - set browser.history_expire_days to 3
   - set browser.history_expire_days_min to 2
   - set browser.history_expire_sites to 20
   - kick off incremental expiration
 
 confirmation:
-  - check onPageExpired, confirm that the expirable uri was expired
+  - check onDeleteVisits, confirm that the expirable uri was expired
   - query for the visit, confirm it's there
 */
 function startExpireDaysOnly() {
   dump("startExpireDaysOnly()\n");
   // Cleanup.
   histsvc.removeAllPages();
   observer.expiredURI = null;
 
@@ -619,17 +619,17 @@ steps:
   - add a visit to an url, 2 days old
   - add a visit to another url, today
   - set browser.history_expire_days to 3
   - set browser.history_expire_days_min to 1
   - set browser.history_expire_sites to 1
   - kick off incremental expiration
 
 confirmation:
-  - check onPageExpired, confirm our oldest visit was expired
+  - check onDeleteVisits, confirm our oldest visit was expired
   - query for the oldest visit, confirm it's not there
 */
 function startExpireBoth() {
   dump("starting expiration test 3: both criteria met\n");
   // Cleanup.
   histsvc.removeAllPages();
   observer.expiredURI = null;
 
@@ -685,17 +685,17 @@ steps:
   - add a visit to an url, w/ current date
   - add a visit to another url, w/ current date
   - set browser.history_expire_days to 3
   - set browser.history_expire_days_min to 2
   - set browser.history_expire_sites to 1
   - kick off incremental expiration
 
 confirmation:
-  - check onPageExpired, confirm nothing was expired
+  - check onDeleteVisits, confirm nothing was expired
   - query for the visit, confirm it's there
 
 */
 function startExpireNeitherOver() {
   dump("startExpireNeitherOver()\n");
   // Cleanup.
   histsvc.removeAllPages();
   observer.expiredURI = null;
@@ -741,17 +741,17 @@ 1. special case when history is disabled
 steps:
   - clear history
   - reset observer
   - add a visit to an url, w/ current date
   - set browser.history_expire_days to 0
   - kick off incremental expiration
 
 confirmation:
-  - check onPageExpired, confirm visit was expired
+  - check onDeleteVisits, confirm visit was expired
   - query for the visit, confirm it's not there
 
 */
 function startExpireHistoryDisabled() {
   dump("startExpireHistoryDisabled()\n");
   // Cleanup.
   histsvc.removeAllPages();
   observer.expiredURI = null;
@@ -790,17 +790,17 @@ steps:
   - clear history
   - reset observer
   - add a visit to an url, 10 days ago
   - set browser.history_expire_days to 1
   - set browser.history_expire_days_min to 20
   - kick off incremental expiration
 
 confirmation:
-  - check onPageExpired, confirm nothing was expired
+  - check onDeleteVisits, confirm nothing was expired
   - query for the visit, confirm it's there
 
 */
 function startExpireBadPrefs() {
   dump("startExpireBadPrefs()\n");
   // Cleanup.
   histsvc.removeAllPages();
   observer.expiredURI = null;
--- a/toolkit/components/places/tests/unit/test_history_removeAllPages.js
+++ b/toolkit/components/places/tests/unit/test_history_removeAllPages.js
@@ -120,17 +120,17 @@ let observer = {
 
     // force a sync and check again disk tables, insertBookmark will do that
     bs.insertBookmark(bs.unfiledBookmarksFolder, uri("place:folder=4"),
                       bs.DEFAULT_INDEX, "shortcut");
   },
 
   onPageChanged: function(aURI, aWhat, aValue) {
   },
-  onPageExpired: function(aURI, aVisitTime, aWholeEntry) {
+  onDeleteVisits: function() {
   },
 
   QueryInterface: function(iid) {
     if (iid.equals(Ci.nsINavHistoryObserver) ||
         iid.equals(Ci.nsISupports)) {
       return this;
     }
     throw Cr.NS_ERROR_NO_INTERFACE;
--- a/toolkit/components/places/tests/unit/test_markpageas.js
+++ b/toolkit/components/places/tests/unit/test_markpageas.js
@@ -105,17 +105,17 @@ var observer = {
   onBeforeDeleteURI: function(aURI) {
   },
   onDeleteURI: function(aURI) {
   },
   onClearHistory: function() {
   },
   onPageChanged: function(aURI, aWhat, aValue) {
   },
-  onPageExpired: function(aURI, aVisitTime, aWholeEntry) {
+  onDeleteVisits: function() {
   },
   QueryInterface: function(iid) {
     if (iid.equals(Ci.nsINavHistoryObserver) ||
         iid.equals(Ci.nsISupports)) {
       return this;
     }
     throw Cr.NS_ERROR_NO_INTERFACE;
   }
--- a/toolkit/components/places/tests/unit/test_onBeforeDeleteURI_observer.js
+++ b/toolkit/components/places/tests/unit/test_onBeforeDeleteURI_observer.js
@@ -76,17 +76,17 @@ Observer.prototype =
   {
     do_check_false(this.checked);
     do_check_true(this.removedURI.equals(aURI));
     this.checked = true;
   },
   onPageChanged: function(aURI, aWhat, aValue)
   {
   },
-  onPageExpired: function(aURI, aVisitTime, aWholeEntry)
+  onDeleteVisits: function()
   {
   },
   QueryInterface: function(iid) {
     if (iid.equals(Ci.nsINavHistoryObserver) ||
         iid.equals(Ci.nsISupports)) {
       return this;
     }
     throw Cr.NS_ERROR_NO_INTERFACE;