B2G/gecko/toolkit/content/aboutSupport.js
/**
 * Restart the application to reset the profile.
 */
Restart the application to reset the profile.
Restart the application to reset the profile .
function resetProfileAndRestart() {
  let branding = Services.strings.createBundle("chrome://branding/locale/brand.properties");
  let brandShortName = branding.GetStringFromName("brandShortName");
  let retVals = {
    reset: false,
  };
  window.openDialog("chrome://global/content/resetProfile.xul", null,
                    "chrome,modal,centerscreen,titlebar,dialog=yes", retVals);
  if (!retVals.reset)
    return;
  let env = Cc["@mozilla.org/process/environment;1"]
              .getService(Ci.nsIEnvironment);
  env.set("MOZ_RESET_PROFILE_RESTART", "1");
  let appStartup = Cc["@mozilla.org/toolkit/app-startup;1"].getService(Ci.nsIAppStartup);
  appStartup.quit(Ci.nsIAppStartup.eForceQuit | Ci.nsIAppStartup.eRestart);
}
function resetProfileAndRestart ( ) { let branding = Services . strings . createBundle ( "chrome://branding/locale/brand.properties" ) ; let brandShortName = branding . GetStringFromName ( "brandShortName" ) ; let retVals = { reset : false , } ; window . openDialog ( "chrome://global/content/resetProfile.xul" , null , "chrome,modal,centerscreen,titlebar,dialog=yes" , retVals ) ; if ( ! retVals . reset ) return ; let env = Cc [ "@mozilla.org/process/environment;1" ] . getService ( Ci . nsIEnvironment ) ; env . set ( "MOZ_RESET_PROFILE_RESTART" , "1" ) ; let appStartup = Cc [ "@mozilla.org/toolkit/app-startup;1" ] . getService ( Ci . nsIAppStartup ) ; appStartup . quit ( Ci . nsIAppStartup . eForceQuit | Ci . nsIAppStartup . eRestart ) ; }
Restart the application to reset the profile.
Restart the application to reset the profile .
// Prompt the user to confirm. // Set the reset profile environment variable.