B2G/gecko/browser/components/places/content/controller.js
/**
   * Removes history visits for an history container node.
   * @param   [in] aContainerNode
   *          The container node to remove.
   *
   * @note history deletes are not undoable.
   */
Removes history visits for an history container node.
@param   [in] aContainerNode
The container node to remove.

@note history deletes are not undoable.
Removes history visits for an history container node . @param [ in ] aContainerNode The container node to remove . @note history deletes are not undoable .
function PC__removeHistoryContainer(aContainerNode) {
    if (PlacesUtils.nodeIsHost(aContainerNode)) {
      PlacesUtils.bhistory.removePagesFromHost(aContainerNode.title, true);
    }
    else if (PlacesUtils.nodeIsDay(aContainerNode)) {
      let query = aContainerNode.getQueries()[0];
      let beginTime = query.beginTime;
      let endTime = query.endTime;
      NS_ASSERT(query && beginTime && endTime,
                "A valid date container query should exist!");
      PlacesUtils.bhistory.removePagesByTimeframe(beginTime + 1, endTime);
    }
  }
function PC__removeHistoryContainer ( aContainerNode ) { if ( PlacesUtils . nodeIsHost ( aContainerNode ) ) { PlacesUtils . bhistory . removePagesFromHost ( aContainerNode . title , true ) ; } else if ( PlacesUtils . nodeIsDay ( aContainerNode ) ) { let query = aContainerNode . getQueries ( ) [ 0 ] ; let beginTime = query . beginTime ; let endTime = query . endTime ; NS_ASSERT ( query && beginTime && endTime , "A valid date container query should exist!" ) ; PlacesUtils . bhistory . removePagesByTimeframe ( beginTime + 1 , endTime ) ; } }
Removes history visits for an history container node.
Removes history visits for an history container node .
// Site container. // Day container. // We want to exclude beginTime from the removal because // removePagesByTimeframe includes both extremes, while date containers // exclude the lower extreme.  So, if we would not exclude it, we would // end up removing more history than requested.