var message = quitBundle.formatStringFromName("message", [appName], 1); 
message = quitBundle.formatStringFromName("message", [appName], 1); 
  _onQuitRequest: function(aCancelQuit)  {    var wm = Cc["@mozilla.org/appshell/window-mediator;1"].             getService(Ci.nsIWindowMediator);    var windowcount = 0;    var pagecount = 0;    var browserEnum = wm.getEnumerator("navigator:browser");    while (browserEnum.hasMoreElements()) {      windowcount++;      var browser = browserEnum.getNext();      var tabbrowser = browser.document.getElementById("content");      if (tabbrowser)        pagecount += tabbrowser.browsers.length;    }    this._saveSession = false;    if (pagecount < 2)      return;    var prefBranch = Cc["@mozilla.org/preferences-service;1"].                     getService(Ci.nsIPrefBranch);    var showPrompt = true;    try {      if (prefBranch.getIntPref("browser.startup.page") == 3 ||          prefBranch.getBoolPref("browser.sessionstore.resume_session_once"))        showPrompt = false;      else        showPrompt = prefBranch.getBoolPref("browser.warnOnQuit");    } catch (ex) {}    var buttonChoice = 0;    if (showPrompt) {      var bundleService = Cc["@mozilla.org/intl/stringbundle;1"].                          getService(Ci.nsIStringBundleService);      var quitBundle = bundleService.createBundle("chrome://browser/locale/quitDialog.properties");      var brandBundle = bundleService.createBundle("chrome://branding/locale/brand.properties");      var appName = brandBundle.GetStringFromName("brandShortName");      var quitDialogTitle = quitBundle.formatStringFromName("quitDialogTitle",                                                            [appName], 1);      var quitTitle = quitBundle.GetStringFromName("quitTitle");      var cancelTitle = quitBundle.GetStringFromName("cancelTitle");      var saveTitle = quitBundle.GetStringFromName("saveTitle");      var neverAskText = quitBundle.GetStringFromName("neverAsk");      if (windowcount == 1)        var message = quitBundle.formatStringFromName("messageNoWindows",                                                      [appName], 1);      else        var message = quitBundle.formatStringFromName("message",                                                      [appName], 1);      var promptService = Cc["@mozilla.org/embedcomp/prompt-service;1"].                          getService(Ci.nsIPromptService);      var flags = promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_0 +                  promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_1 +                  promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_2 +                  promptService.BUTTON_POS_0_DEFAULT;      var neverAsk = {value:false};      buttonChoice = promptService.confirmEx(null, quitDialogTitle, message,                                   flags, quitTitle, cancelTitle, saveTitle,                                   neverAskText, neverAsk);      switch (buttonChoice) {      case 0:        if (neverAsk.value)          prefBranch.setBoolPref("browser.warnOnQuit", false);        break;      case 1:        aCancelQuit.QueryInterface(Ci.nsISupportsPRBool);        aCancelQuit.data = true;        break;      case 2:        // could also set browser.warnOnQuit to false here,        // but not setting it is a little safer.        if (neverAsk.value)          prefBranch.setIntPref("browser.startup.page", 3);        break;      }      this._saveSession = buttonChoice == 2;    }  },
5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5872/8b9b6f83fa30e240938575cc708eb37f30caca26/nsBrowserGlue.js/clean/browser/components/nsBrowserGlue.js