B2G/gecko/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_forgetthissite.js
/**
 * Clears history invoking callback when done.
 */
Clears history invoking callback when done.
Clears history invoking callback when done .
function waitForClearHistory(aCallback) {
  const TOPIC_EXPIRATION_FINISHED = "places-expiration-finished";
  let observer = {
    observe: function(aSubject, aTopic, aData) {
      Services.obs.removeObserver(this, TOPIC_EXPIRATION_FINISHED);
      aCallback();
    }
  };
  Services.obs.addObserver(observer, TOPIC_EXPIRATION_FINISHED, false);
  let hs = Cc["@mozilla.org/browser/nav-history-service;1"].
           getService(Ci.nsINavHistoryService);
  hs.QueryInterface(Ci.nsIBrowserHistory).removeAllPages();
}
function waitForClearHistory ( aCallback ) { const TOPIC_EXPIRATION_FINISHED = "places-expiration-finished" ; let observer = { observe : function ( aSubject , aTopic , aData ) { Services . obs . removeObserver ( this , TOPIC_EXPIRATION_FINISHED ) ; aCallback ( ) ; } } ; Services . obs . addObserver ( observer , TOPIC_EXPIRATION_FINISHED , false ) ; let hs = Cc [ "@mozilla.org/browser/nav-history-service;1" ] . getService ( Ci . nsINavHistoryService ) ; hs . QueryInterface ( Ci . nsIBrowserHistory ) . removeAllPages ( ) ; }
Clears history invoking callback when done.
Clears history invoking callback when done .