Bug 751608 - Remove the never implemented nsIBrowserHistory::hidePage method.
authorMarco Castelluccio <mar.castelluccio@studenti.unina.it>
Sat, 05 May 2012 14:25:31 +0200
changeset 93284 45bfaaa0da836ee9126046b21ea6d82d1a91e001
parent 93283 60cd3d6d6e3f3ec4b2421aca72719428fbb647d2
child 93285 790a7f291c9d47e389ffb663f767d1a89fdc32b0
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
bugs751608
milestone15.0a1
Bug 751608 - Remove the never implemented nsIBrowserHistory::hidePage method. r=mak sr=gavin
toolkit/components/places/nsIBrowserHistory.idl
toolkit/components/places/nsNavHistory.cpp
toolkit/components/places/tests/queries/head_queries.js
--- a/toolkit/components/places/nsIBrowserHistory.idl
+++ b/toolkit/components/places/nsIBrowserHistory.idl
@@ -145,28 +145,16 @@ interface nsIBrowserHistory : nsIGlobalH
      *
      * @note The removal happens in a batch. Single removals are not notified,
      *       instead an onClearHistory notification is sent to
      *       nsINavHistoryObserver implementers.
      */
     void removeAllPages();
 
     /**
-     * Hides the specified URL from being enumerated (and thus displayed in
-     * the UI).
-     *
-     * @param aURI
-     *        URI of the page to be marked.
-     *
-     * @note If the page hasn't been visited yet, then it will be added
-     *       as if it was visited, and then marked as hidden
-     */
-    void hidePage(in nsIURI aURI);
-
-    /**
      * Designates the url as having been explicitly typed in by the user.
      *
      * @param aURI
      *        URI of the page to be marked.
      */
     void markPageAsTyped(in nsIURI aURI);
 
     /**
--- a/toolkit/components/places/nsNavHistory.cpp
+++ b/toolkit/components/places/nsNavHistory.cpp
@@ -3209,31 +3209,16 @@ nsNavHistory::RemoveAllPages()
   // 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;
 }
 
 
-// nsNavHistory::HidePage
-//
-//    Sets the 'hidden' column to true. If we've not heard of the page, we
-//    succeed and do nothing.
-
-NS_IMETHODIMP
-nsNavHistory::HidePage(nsIURI *aURI)
-{
-  NS_ASSERTION(NS_IsMainThread(), "This can only be called on the main thread");
-  NS_ENSURE_ARG(aURI);
-
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-
 // Call this method before visiting a URL in order to help determine the
 // transition type of the visit.
 // Later, in AddVisitChain() the next visit to this page will be associated to
 // TRANSITION_TYPED.
 //
 // @see MarkPageAsFollowedBookmark
 
 NS_IMETHODIMP
--- a/toolkit/components/places/tests/queries/head_queries.js
+++ b/toolkit/components/places/tests/queries/head_queries.js
@@ -134,20 +134,16 @@ function populateDB(aArray) {
             PlacesUtils.history.addPageWithDetails(uri(qdata.uri),
                                                    qdata.title, qdata.lastVisit);
           }
 
           if (qdata.markPageAsTyped){
             PlacesUtils.bhistory.markPageAsTyped(uri(qdata.uri));
           }
 
-          if (qdata.hidePage){
-            PlacesUtils.bhistory.hidePage(uri(qdata.uri));
-          }
-
           if (qdata.isPageAnnotation) {
             if (qdata.removeAnnotation) 
               PlacesUtils.annotations.removePageAnnotation(uri(qdata.uri),
                                                            qdata.annoName);
             else {
               PlacesUtils.annotations.setPageAnnotation(uri(qdata.uri),
                                                         qdata.annoName,
                                                         qdata.annoVal,
@@ -271,17 +267,16 @@ function queryData(obj) {
   this.lastVisit = obj.lastVisit ? obj.lastVisit : today;
   this.referrer = obj.referrer ? obj.referrer : null;
   this.transType = obj.transType ? obj.transType : Ci.nsINavHistoryService.TRANSITION_TYPED;
   this.isRedirect = obj.isRedirect ? obj.isRedirect : false;
   this.sessionID = obj.sessionID ? obj.sessionID : 0;
   this.isDetails = obj.isDetails ? obj.isDetails : false;
   this.title = obj.title ? obj.title : "";
   this.markPageAsTyped = obj.markPageAsTyped ? obj.markPageAsTyped : false;
-  this.hidePage = obj.hidePage ? obj.hidePage : false;
   this.isPageAnnotation = obj.isPageAnnotation ? obj.isPageAnnotation : false;
   this.removeAnnotation= obj.removeAnnotation ? true : false;
   this.annoName = obj.annoName ? obj.annoName : "";
   this.annoVal = obj.annoVal ? obj.annoVal : "";
   this.annoFlags = obj.annoFlags ? obj.annoFlags : 0;
   this.annoExpiration = obj.annoExpiration ? obj.annoExpiration : 0;
   this.isItemAnnotation = obj.isItemAnnotation ? obj.isItemAnnotation : false;
   this.itemId = obj.itemId ? obj.itemId : 0;