B2G/gecko/security/manager/pki/resources/content/exceptionDialog.js
/**
 * Returns true if the private browsing mode is currently active and
 * we have been instructed to handle it.
 */
Returns true if the private browsing mode is currently active and
we have been instructed to handle it.
Returns true if the private browsing mode is currently active and we have been instructed to handle it .
function inPrivateBrowsingMode() {
  var args = window.arguments;
  if (args && args[0] && args[0].handlePrivateBrowsing) {
    try {
      var pb = Components.classes["@mozilla.org/privatebrowsing;1"].
               getService(Components.interfaces.nsIPrivateBrowsingService);
      return pb.privateBrowsingEnabled;
    } catch (ex) {
      Components.utils.reportError("Could not get the Private Browsing service");
    }
  }
  return false;
}
function inPrivateBrowsingMode ( ) { var args = window . arguments ; if ( args && args [ 0 ] && args [ 0 ] . handlePrivateBrowsing ) { try { var pb = Components . classes [ "@mozilla.org/privatebrowsing;1" ] . getService ( Components . interfaces . nsIPrivateBrowsingService ) ; return pb . privateBrowsingEnabled ; } catch ( ex ) { Components . utils . reportError ( "Could not get the Private Browsing service" ) ; } } return false ; }
Returns true if the private browsing mode is currently active and
 we have been instructed to handle it.
Returns true if the private browsing mode is currently active and we have been instructed to handle it .
// first, check to see if we should handle the private browsing mode // detect if the private browsing mode is active