B2G/gecko/browser/base/content/browser.js
// Prompt user to restart the browser in safe mode
Prompt user to restart the browser in safe mode
Prompt user to restart the browser in safe mode
function safeModeRestart()
{
  let promptTitle = gNavigatorBundle.getString("safeModeRestartPromptTitle");
  let promptMessage =
    gNavigatorBundle.getString("safeModeRestartPromptMessage");
  let restartText = gNavigatorBundle.getString("safeModeRestartButton");
  let buttonFlags = (Services.prompt.BUTTON_POS_0 *
                     Services.prompt.BUTTON_TITLE_IS_STRING) +
                    (Services.prompt.BUTTON_POS_1 *
                     Services.prompt.BUTTON_TITLE_CANCEL) +
                    Services.prompt.BUTTON_POS_0_DEFAULT;
  let rv = Services.prompt.confirmEx(window, promptTitle, promptMessage,
                                     buttonFlags, restartText, null, null,
                                     null, {});
  if (rv == 0) {
    let appStartup = Cc["@mozilla.org/toolkit/app-startup;1"].
                     getService(Ci.nsIAppStartup);
    appStartup.restartInSafeMode(Ci.nsIAppStartup.eAttemptQuit);
  }
}
function safeModeRestart ( ) { let promptTitle = gNavigatorBundle . getString ( "safeModeRestartPromptTitle" ) ; let promptMessage = gNavigatorBundle . getString ( "safeModeRestartPromptMessage" ) ; let restartText = gNavigatorBundle . getString ( "safeModeRestartButton" ) ; let buttonFlags = ( Services . prompt . BUTTON_POS_0 * Services . prompt . BUTTON_TITLE_IS_STRING ) + ( Services . prompt . BUTTON_POS_1 * Services . prompt . BUTTON_TITLE_CANCEL ) + Services . prompt . BUTTON_POS_0_DEFAULT ; let rv = Services . prompt . confirmEx ( window , promptTitle , promptMessage , buttonFlags , restartText , null , null , null , { } ) ; if ( rv == 0 ) { let appStartup = Cc [ "@mozilla.org/toolkit/app-startup;1" ] . getService ( Ci . nsIAppStartup ) ; appStartup . restartInSafeMode ( Ci . nsIAppStartup . eAttemptQuit ) ; } }
Prompt user to restart the browser in safe mode
Prompt user to restart the browser in safe mode
// prompt the user to confirm