Bug 1254923 - Remove RemoveAllPages API. r=mak
--- a/toolkit/components/places/nsIBrowserHistory.idl
+++ b/toolkit/components/places/nsIBrowserHistory.idl
@@ -79,22 +79,9 @@ interface nsIBrowserHistory : nsISupport
* Microseconds from epoch, representing the final time.
*
* @note The removal happens in a batch.
*
* @deprecated Please use PlacesUtils.history.removeVisitsByFilter instead
*/
void removeVisitsByTimeframe(in PRTime aBeginTime,
in PRTime aEndTime);
-
- /**
- * Removes all existing pages from global history.
- * Visits are removed synchronously, but pages are expired asynchronously
- * off the main-thread.
- *
- * @deprecated Please use PlacesUtils.history.clear() instead.
- *
- * @note The removal happens in a batch. Single removals are not notified,
- * instead an onClearHistory notification is sent to
- * nsINavHistoryObserver implementers.
- */
- void removeAllPages();
};
--- a/toolkit/components/places/nsNavHistory.cpp
+++ b/toolkit/components/places/nsNavHistory.cpp
@@ -2784,51 +2784,16 @@ nsNavHistory::RemoveVisitsByTimeframe(PR
// Invalidate the cached value for whether there's history or not.
mDaysOfHistory = -1;
return NS_OK;
}
-// nsNavHistory::RemoveAllPages
-//
-// This function is used to clear history.
-
-NS_IMETHODIMP
-nsNavHistory::RemoveAllPages()
-{
- PLACES_WARN_DEPRECATED();
-
- NS_ASSERTION(NS_IsMainThread(), "This can only be called on the main thread");
-
- nsresult rv = mDB->MainConn()->ExecuteSimpleSQL(NS_LITERAL_CSTRING(
- "DELETE FROM moz_historyvisits"
- ));
- NS_ENSURE_SUCCESS(rv, rv);
-
- // Clear the registered embed visits.
- clearEmbedVisits();
-
- // Update the cached value for whether there's history or not.
- mDaysOfHistory = 0;
-
- // Expiration will take care of orphans.
- NOTIFY_OBSERVERS(mCanNotify, mCacheObservers, mObservers,
- nsINavHistoryObserver, OnClearHistory());
-
- // Invalidate frecencies for the remaining places. This must happen
- // after the notification to ensure it runs enqueued to expiration.
- rv = invalidateFrecencies(EmptyCString());
- NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "failed to fix invalid frecencies");
-
- return NS_OK;
-}
-
-
// Call this method before visiting a URL in order to help determine the
// transition type of the visit.
//
// @see MarkPageAsFollowedBookmark
NS_IMETHODIMP
nsNavHistory::MarkPageAsTyped(nsIURI *aURI)
{