From 4cdbe276b822823187c74a1fb7f21b86a3af72b4 Mon Sep 17 00:00:00 2001 From: "gavin%gavinsharp.com" Date: Sun, 4 Dec 2005 18:34:12 +0000 Subject: [PATCH] Bug 311605: default browser checking should be done nsBrowserBlue, not in delayed startup, r=mano git-svn-id: svn://10.0.0.236/trunk@185661 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/browser/base/content/browser.js | 28 +--- mozilla/browser/components/nsBrowserGlue.js | 123 ++++++++++++++---- mozilla/browser/components/nsIBrowserGlue.idl | 18 ++- .../browser/components/preferences/general.js | 30 +---- .../shell/public/nsIShellService.idl | 16 +-- .../shell/src/nsGNOMEShellService.cpp | 38 +----- .../shell/src/nsGNOMEShellService.h | 5 +- .../shell/src/nsMacShellService.cpp | 41 +----- .../components/shell/src/nsMacShellService.h | 4 +- .../components/shell/src/nsShellService.h | 3 - .../shell/src/nsWindowsShellService.cpp | 46 +------ .../shell/src/nsWindowsShellService.h | 2 - 12 files changed, 131 insertions(+), 223 deletions(-) diff --git a/mozilla/browser/base/content/browser.js b/mozilla/browser/base/content/browser.js index 34765774611..92237acad9c 100644 --- a/mozilla/browser/base/content/browser.js +++ b/mozilla/browser/base/content/browser.js @@ -895,33 +895,7 @@ function delayedStartup() gClickSelectsAll = gPrefService.getBoolPref("browser.urlbar.clickSelectsAll"); #ifdef HAVE_SHELL_SERVICE - // Perform default browser checking (after window opens). - var shell = getShellService(); - if (shell) { - var shouldCheck = shell.shouldCheckDefaultBrowser; - if (shouldCheck && !shell.isDefaultBrowser(true)) { - var brandBundle = document.getElementById("bundle_brand"); - var shellBundle = document.getElementById("bundle_shell"); - - var brandShortName = brandBundle.getString("brandShortName"); - var promptTitle = shellBundle.getString("setDefaultBrowserTitle"); - var promptMessage = shellBundle.getFormattedString("setDefaultBrowserMessage", - [brandShortName]); - var checkboxLabel = shellBundle.getFormattedString("setDefaultBrowserDontAsk", - [brandShortName]); - const IPS = Components.interfaces.nsIPromptService; - var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] - .getService(IPS); - var checkEveryTime = { value: shouldCheck }; - var rv = ps.confirmEx(window, promptTitle, promptMessage, - (IPS.BUTTON_TITLE_YES * IPS.BUTTON_POS_0) + - (IPS.BUTTON_TITLE_NO * IPS.BUTTON_POS_1), - null, null, null, checkboxLabel, checkEveryTime); - if (rv == 0) - shell.setDefaultBrowser(true, false); - shell.shouldCheckDefaultBrowser = checkEveryTime.value; - } - } else { + if (!getShellService()) { // We couldn't get the shell service; go hide the mail toolbar button. var mailbutton = document.getElementById("mail-button"); if (mailbutton) diff --git a/mozilla/browser/components/nsBrowserGlue.js b/mozilla/browser/components/nsBrowserGlue.js index ab1efa93dd8..51a51d0d0f4 100644 --- a/mozilla/browser/components/nsBrowserGlue.js +++ b/mozilla/browser/components/nsBrowserGlue.js @@ -35,8 +35,6 @@ * * ***** END LICENSE BLOCK ***** */ - - // Constructor function BrowserGlue() { @@ -44,14 +42,17 @@ function BrowserGlue() { } BrowserGlue.prototype = { - QueryInterface: function(iid) + + mPrefService: null, + + QueryInterface: function nsBG_QI(iid) { xpcomCheckInterfaces(iid, kServiceIIds, Components.results.NS_ERROR_NO_INTERFACE); return this; - } -, + }, + // nsIObserver implementation - observe: function(subject, topic, data) + observe: function nsBG_observe(subject, topic, data) { switch(topic) { case "xpcom-shutdown": @@ -64,10 +65,10 @@ BrowserGlue.prototype = { this._onProfileStartup(); break; } - } -, + }, + // initialization (called on application startup) - _init: function() + _init: function nsBG_init() { // observer registration const osvr = Components.classes['@mozilla.org/observer-service;1'] @@ -78,7 +79,7 @@ BrowserGlue.prototype = { }, // cleanup (called on application shutdown) - _dispose: function() + _dispose: function nsBG_dispose() { // observer removal const osvr = Components.classes['@mozilla.org/observer-service;1'] @@ -89,11 +90,16 @@ BrowserGlue.prototype = { }, // profile startup handler (contains profile initialization routines) - _onProfileStartup: function() + _onProfileStartup: function nsBG_onProfileStartup() { + if (this.prefService.getBoolPref("browser.shell.checkDefaultBrowser")) + this.checkDefaultBrowser(); + this.Sanitizer.onStartup(); + // check if we're in safe mode - var app = Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULAppInfo) + var app = Components.classes["@mozilla.org/xre/app-info;1"] + .getService(Components.interfaces.nsIXULAppInfo) .QueryInterface(Components.interfaces.nsIXULRuntime); if (app.inSafeMode) { var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] @@ -104,7 +110,7 @@ BrowserGlue.prototype = { }, // profile shutdown handler (contains profile cleanup routines) - _onProfileShutdown: function() + _onProfileShutdown: function nsBG_onProfileShutdown() { // here we enter last survival area, in order to avoid multiple // "quit-application" notifications caused by late window closings @@ -131,19 +137,92 @@ BrowserGlue.prototype = { } return Sanitizer; }, - + + get prefService() + { + if (!this.mPrefService) + this.mPrefService = + Components.classes["@mozilla.org/preferences-service;1"] + .getService(Components.interfaces.nsIPrefBranch2); + + return this.mPrefService; + }, + // ------------------------------ // public nsIBrowserGlue members // ------------------------------ - - sanitize: function(aParentWindow) + + sanitize: function nsBG_sanitize(aParentWindow) { this.Sanitizer.sanitize(aParentWindow); + }, + + checkDefaultBrowser: function nsBG_checkDefaultBrowser(aUserInitiated, + aParentWindow) + { + var shell; + try { + shell = Components.classes["@mozilla.org/browser/shell-service;1"] + .getService(Components.interfaces.nsIShellService); + } catch (ex) { } + + if (!shell) + return; + + const cID = "@mozilla.org/intl/stringbundle;1"; + const nsISBS = Components.interfaces.nsIStringBundleService; + var bundleSvc = Components.classes[cID].getService(nsISBS); + + const brandURL = "chrome://branding/locale/brand.properties"; + var brandBundle = bundleSvc.createBundle(brandURL); + const shellURL = "chrome://browser/locale/shellservice.properties"; + var shellBundle = bundleSvc.createBundle(shellURL); + + var brandShortName = brandBundle.GetStringFromName("brandShortName"); + + var promptTitle = shellBundle.GetStringFromName("setDefaultBrowserTitle"); + var promptMessage = + shellBundle.formatStringFromName("setDefaultBrowserMessage", + [brandShortName], 1); + var checkboxLabel = + shellBundle.formatStringFromName("setDefaultBrowserDontAsk", + [brandShortName], 1); + var checkEveryTime = { value: true }; + + const nsIPS = Components.interfaces.nsIPromptService; + var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] + .getService(nsIPS); + + var parentWindow = aParentWindow || null; + + if (!shell.isDefaultBrowser()) { + + if (aUserInitiated) { + // Don't show the checkbox if this dialog is forced + checkboxLabel = null; + checkEveryTime = {}; + } + + var rv = ps.confirmEx(parentWindow, promptTitle, promptMessage, + (nsIPS.BUTTON_TITLE_YES * nsIPS.BUTTON_POS_0) + + (nsIPS.BUTTON_TITLE_NO * nsIPS.BUTTON_POS_1), + null, null, null, checkboxLabel, checkEveryTime); + + if (rv == 0) + shell.setDefaultBrowser(true, false); + + if (!aUserInitiated) + this.prefService.setBoolPref("browser.shell.checkDefaultBrowser", + checkEveryTime.value); + + } else if (aUserInitiated) { + promptMessage = shellBundle.formatStringFromName("alreadyDefaultBrowser", + [brandShortName], 1); + ps.alert(parentWindow, promptTitle, promptMessage); + } } - } - // XPCOM Scaffolding code // component defined in this file @@ -191,7 +270,7 @@ function xpcomCheckInterfaces(iid, iids, ex) { var Module = { registered: false, - + registerSelf: function(compMgr, fileSpec, location, type) { if (!this.registered) { @@ -212,7 +291,7 @@ var Module = { this.registered = true; } }, - + unregisterSelf: function(compMgr, fileSpec, location) { compMgr.QueryInterface(Components.interfaces.nsIComponentRegistrar) @@ -224,7 +303,7 @@ var Module = { catman.deleteCategoryEntry(kServiceCats[j], kServiceCtrId, true); } }, - + getClassObject: function(compMgr, cid, iid) { if(cid.equals(kServiceCId)) @@ -237,7 +316,7 @@ var Module = { ]; }, - + canUnload: function(compMgr) { return true; diff --git a/mozilla/browser/components/nsIBrowserGlue.idl b/mozilla/browser/components/nsIBrowserGlue.idl index c0663778740..4026b0fd088 100644 --- a/mozilla/browser/components/nsIBrowserGlue.idl +++ b/mozilla/browser/components/nsIBrowserGlue.idl @@ -56,15 +56,29 @@ interface nsIDOMWindow; * */ -[scriptable, uuid(6d340848-9bc1-49a3-9073-99932bbc2a11)] +[scriptable, uuid(7bef1130-e2ca-4721-8272-6e6e5e7fc994)] interface nsIBrowserGlue : nsISupports { /** * Deletes privacy sensitive data according to user preferences * - * @param aParentWindow an optionally null window which is the parent of the + * @param aParentWindow Optional: a window to be used as the parent of the * sanitization dialog (if it has to be shown per user preferences) * */ void sanitize(in nsIDOMWindow aParentWindow); + + /** + * Checks whether the browser is set as the system default, and if not, + * prompts the user to make it the default. + * + * @param aUserInitiated a boolean value indicating whether an alert should be + * displayed if the browser is already registered as the system + * default. Also controls whether or not the "Should check at startup" + * checkbox appears in the confirmation prompt. + * @param aParentWindow Optional: a window to be used as the parent of the + * prompts and alerts + * + */ + void checkDefaultBrowser(in boolean aUserInitiated, in nsIDOMWindow aParentWindow); }; diff --git a/mozilla/browser/components/preferences/general.js b/mozilla/browser/components/preferences/general.js index 258318a4f4a..06beff70495 100644 --- a/mozilla/browser/components/preferences/general.js +++ b/mozilla/browser/components/preferences/general.js @@ -163,34 +163,10 @@ var gGeneralPane = { "", null); }, -#ifdef HAVE_SHELL_SERVICE checkNow: function () { - var shellSvc = Components.classes["@mozilla.org/browser/shell-service;1"] - .getService(Components.interfaces.nsIShellService); - var brandBundle = document.getElementById("bundleBrand"); - var shellBundle = document.getElementById("bundleShell"); - var brandShortName = brandBundle.getString("brandShortName"); - var promptTitle = shellBundle.getString("setDefaultBrowserTitle"); - var promptMessage; - const IPS = Components.interfaces.nsIPromptService; - var psvc = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] - .getService(IPS); - if (!shellSvc.isDefaultBrowser(false)) { - promptMessage = shellBundle.getFormattedString("setDefaultBrowserMessage", - [brandShortName]); - var rv = psvc.confirmEx(window, promptTitle, promptMessage, - (IPS.BUTTON_TITLE_YES * IPS.BUTTON_POS_0) + - (IPS.BUTTON_TITLE_NO * IPS.BUTTON_POS_1), - null, null, null, null, { }); - if (rv == 0) - shellSvc.setDefaultBrowser(true, false); - } - else { - promptMessage = shellBundle.getFormattedString("alreadyDefaultBrowser", - [brandShortName]); - psvc.alert(window, promptTitle, promptMessage); - } + var browserGlue = Components.classes["@mozilla.org/browser/browserglue;1"] + .getService(Components.interfaces.nsIBrowserGlue); + browserGlue.checkDefaultBrowser(true, window); } -#endif }; diff --git a/mozilla/browser/components/shell/public/nsIShellService.idl b/mozilla/browser/components/shell/public/nsIShellService.idl index f3d15f22a0d..6ac3341c160 100644 --- a/mozilla/browser/components/shell/public/nsIShellService.idl +++ b/mozilla/browser/components/shell/public/nsIShellService.idl @@ -39,19 +39,15 @@ interface nsIDOMElement; -[scriptable, uuid(d6f62053-3769-46f6-bd2b-0a1440d6c394)] +[scriptable, uuid(f0a0e17d-87bb-4a44-8f6a-11908927b647)] interface nsIShellService : nsISupports { /** * Determines whether or not Firefox is the "Default Browser." * This is simply whether or not Firefox is registered to handle * http links. - * - * @param aStartupCheck true if this is the check being performed - * by the first browser window at startup, - * false otherwise. */ - boolean isDefaultBrowser(in boolean aStartupCheck); + boolean isDefaultBrowser(); /** * Registers Firefox as the "Default Browser." @@ -65,14 +61,6 @@ interface nsIShellService : nsISupports */ void setDefaultBrowser(in boolean aClaimAllTypes, in boolean aForAllUsers); - /** - * Used to determine whether or not to show a "Set Default Browser" - * query dialog. This attribute is true if the application is starting - * up and "browser.shell.checkDefaultBrowser" is true, otherwise it - * is false. - */ - attribute boolean shouldCheckDefaultBrowser; - /** * Flags for positioning/sizing of the Desktop Background image. */ diff --git a/mozilla/browser/components/shell/src/nsGNOMEShellService.cpp b/mozilla/browser/components/shell/src/nsGNOMEShellService.cpp index a66fd3b2126..e2377c8f65c 100644 --- a/mozilla/browser/components/shell/src/nsGNOMEShellService.cpp +++ b/mozilla/browser/components/shell/src/nsGNOMEShellService.cpp @@ -164,12 +164,9 @@ nsGNOMEShellService::KeyMatchesAppName(const char *aKeyValue) const } NS_IMETHODIMP -nsGNOMEShellService::IsDefaultBrowser(PRBool aStartupCheck, - PRBool* aIsDefaultBrowser) +nsGNOMEShellService::IsDefaultBrowser(PRBool* aIsDefaultBrowser) { *aIsDefaultBrowser = PR_FALSE; - if (aStartupCheck) - mCheckedThisSession = PR_TRUE; nsCOMPtr gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID); @@ -310,39 +307,6 @@ nsGNOMEShellService::SetDefaultBrowser(PRBool aClaimAllTypes, return NS_OK; } -NS_IMETHODIMP -nsGNOMEShellService::GetShouldCheckDefaultBrowser(PRBool* aResult) -{ - // If we've already checked, the browser has been started and this is a - // new window open, and we don't want to check again. - if (mCheckedThisSession) { - *aResult = PR_FALSE; - return NS_OK; - } - - nsCOMPtr prefs; - nsCOMPtr pserve(do_GetService(NS_PREFSERVICE_CONTRACTID)); - if (pserve) - pserve->GetBranch("", getter_AddRefs(prefs)); - - prefs->GetBoolPref(PREF_CHECKDEFAULTBROWSER, aResult); - - return NS_OK; -} - -NS_IMETHODIMP -nsGNOMEShellService::SetShouldCheckDefaultBrowser(PRBool aShouldCheck) -{ - nsCOMPtr prefs; - nsCOMPtr pserve(do_GetService(NS_PREFSERVICE_CONTRACTID)); - if (pserve) - pserve->GetBranch("", getter_AddRefs(prefs)); - - prefs->SetBoolPref(PREF_CHECKDEFAULTBROWSER, aShouldCheck); - - return NS_OK; -} - static nsresult WriteImage(const nsCString& aPath, gfxIImageFrame* aImage) { diff --git a/mozilla/browser/components/shell/src/nsGNOMEShellService.h b/mozilla/browser/components/shell/src/nsGNOMEShellService.h index 7b98433c80f..1640dc42e5e 100644 --- a/mozilla/browser/components/shell/src/nsGNOMEShellService.h +++ b/mozilla/browser/components/shell/src/nsGNOMEShellService.h @@ -43,7 +43,7 @@ class nsGNOMEShellService : public nsIShellService { public: - nsGNOMEShellService() : mCheckedThisSession(PR_FALSE) { } + nsGNOMEShellService() { } NS_DECL_ISUPPORTS NS_DECL_NSISHELLSERVICE @@ -55,8 +55,7 @@ private: NS_HIDDEN_(PRBool) KeyMatchesAppName(const char *aKeyValue) const; - PRPackedBool mCheckedThisSession; - PRPackedBool mUseLocaleFilenames; + PRBool mUseLocaleFilenames; nsCString mAppPath; }; diff --git a/mozilla/browser/components/shell/src/nsMacShellService.cpp b/mozilla/browser/components/shell/src/nsMacShellService.cpp index 5803992d638..a715a8df119 100644 --- a/mozilla/browser/components/shell/src/nsMacShellService.cpp +++ b/mozilla/browser/components/shell/src/nsMacShellService.cpp @@ -79,7 +79,7 @@ extern "C" { NS_IMPL_ISUPPORTS3(nsMacShellService, nsIMacShellService, nsIShellService, nsIWebProgressListener) NS_IMETHODIMP -nsMacShellService::IsDefaultBrowser(PRBool aStartupCheck, PRBool* aIsDefaultBrowser) +nsMacShellService::IsDefaultBrowser(PRBool* aIsDefaultBrowser) { *aIsDefaultBrowser = PR_TRUE; @@ -134,12 +134,6 @@ nsMacShellService::IsDefaultBrowser(PRBool aStartupCheck, PRBool* aIsDefaultBrow // release the idetifiers strings ::CFRelease(firefoxID); - // If this is the first browser window, maintain internal state that we've - // checked this session (so that subsequent window opens don't show the - // default browser dialog). - if (aStartupCheck) - mCheckedThisSession = PR_TRUE; - return rv; } @@ -170,39 +164,6 @@ nsMacShellService::SetDefaultBrowser(PRBool aClaimAllTypes, PRBool aForAllUsers) return NS_OK; } -NS_IMETHODIMP -nsMacShellService::GetShouldCheckDefaultBrowser(PRBool* aResult) -{ - // If we've already checked, the browser has been started and this is a - // new window open, and we don't want to check again. - if (mCheckedThisSession) { - *aResult = PR_FALSE; - return NS_OK; - } - - nsCOMPtr prefs; - nsCOMPtr pserve(do_GetService(NS_PREFSERVICE_CONTRACTID)); - if (pserve) - pserve->GetBranch("", getter_AddRefs(prefs)); - - prefs->GetBoolPref(PREF_CHECKDEFAULTBROWSER, aResult); - - return NS_OK; -} - -NS_IMETHODIMP -nsMacShellService::SetShouldCheckDefaultBrowser(PRBool aShouldCheck) -{ - nsCOMPtr prefs; - nsCOMPtr pserve(do_GetService(NS_PREFSERVICE_CONTRACTID)); - if (pserve) - pserve->GetBranch("", getter_AddRefs(prefs)); - - prefs->SetBoolPref(PREF_CHECKDEFAULTBROWSER, aShouldCheck); - - return NS_OK; -} - NS_IMETHODIMP nsMacShellService::SetDesktopBackground(nsIDOMElement* aElement, PRInt32 aPosition) diff --git a/mozilla/browser/components/shell/src/nsMacShellService.h b/mozilla/browser/components/shell/src/nsMacShellService.h index 3d0a9d3d029..f884e9a7672 100644 --- a/mozilla/browser/components/shell/src/nsMacShellService.h +++ b/mozilla/browser/components/shell/src/nsMacShellService.h @@ -46,7 +46,7 @@ class nsMacShellService : public nsIMacShellService, public nsIWebProgressListener { public: - nsMacShellService() : mCheckedThisSession(PR_FALSE) {}; + nsMacShellService() {}; virtual ~nsMacShellService() {}; NS_DECL_ISUPPORTS @@ -58,8 +58,6 @@ protected: private: nsCOMPtr mBackgroundFile; - - PRBool mCheckedThisSession; }; #endif // nsmacshellservice_h____ diff --git a/mozilla/browser/components/shell/src/nsShellService.h b/mozilla/browser/components/shell/src/nsShellService.h index 58e7eb68f76..6db640fc51a 100644 --- a/mozilla/browser/components/shell/src/nsShellService.h +++ b/mozilla/browser/components/shell/src/nsShellService.h @@ -34,8 +34,5 @@ * * ***** END LICENSE BLOCK ***** */ -#define PREF_CHECKDEFAULTBROWSER "browser.shell.checkDefaultBrowser" - #define SHELLSERVICE_PROPERTIES "chrome://browser/locale/shellservice.properties" #define BRAND_PROPERTIES "chrome://branding/locale/brand.properties" - diff --git a/mozilla/browser/components/shell/src/nsWindowsShellService.cpp b/mozilla/browser/components/shell/src/nsWindowsShellService.cpp index 8dc3981faf1..595eca52a4b 100644 --- a/mozilla/browser/components/shell/src/nsWindowsShellService.cpp +++ b/mozilla/browser/components/shell/src/nsWindowsShellService.cpp @@ -291,7 +291,6 @@ nsWindowsShellService::Register(nsIComponentManager *aCompMgr, nsIFile *aPath, c } nsWindowsShellService::nsWindowsShellService() -:mCheckedThisSession(PR_FALSE) { nsCOMPtr obsServ (do_GetService("@mozilla.org/observer-service;1")); obsServ->AddObserver(this, "quit-application", PR_FALSE); @@ -323,7 +322,7 @@ nsWindowsShellService::UnregisterDDESupport() } NS_IMETHODIMP -nsWindowsShellService::IsDefaultBrowser(PRBool aStartupCheck, PRBool* aIsDefaultBrowser) +nsWindowsShellService::IsDefaultBrowser(PRBool* aIsDefaultBrowser) { SETTING* settings; SETTING* end = gSettings + sizeof(gSettings)/sizeof(SETTING); @@ -379,12 +378,6 @@ nsWindowsShellService::IsDefaultBrowser(PRBool aStartupCheck, PRBool* aIsDefault } } - // If this is the first browser window, maintain internal state that we've - // checked this session (so that subsequent window opens don't show the - // default browser dialog). - if (aStartupCheck) - mCheckedThisSession = PR_TRUE; - return NS_OK; } @@ -608,39 +601,6 @@ nsWindowsShellService::SetRegKey(const char* aKeyName, const char* aValueName, ::RegCloseKey(theKey); } -NS_IMETHODIMP -nsWindowsShellService::GetShouldCheckDefaultBrowser(PRBool* aResult) -{ - // If we've already checked, the browser has been started and this is a - // new window open, and we don't want to check again. - if (mCheckedThisSession) { - *aResult = PR_FALSE; - return NS_OK; - } - - nsCOMPtr prefs; - nsCOMPtr pserve(do_GetService(NS_PREFSERVICE_CONTRACTID)); - if (pserve) - pserve->GetBranch("", getter_AddRefs(prefs)); - - prefs->GetBoolPref(PREF_CHECKDEFAULTBROWSER, aResult); - - return NS_OK; -} - -NS_IMETHODIMP -nsWindowsShellService::SetShouldCheckDefaultBrowser(PRBool aShouldCheck) -{ - nsCOMPtr prefs; - nsCOMPtr pserve(do_GetService(NS_PREFSERVICE_CONTRACTID)); - if (pserve) - pserve->GetBranch("", getter_AddRefs(prefs)); - - prefs->SetBoolPref(PREF_CHECKDEFAULTBROWSER, aShouldCheck); - - return NS_OK; -} - static nsresult WriteBitmap(nsIFile* aFile, gfxIImageFrame* aImage) { @@ -1018,7 +978,7 @@ nsWindowsShellService::Observe(nsISupports* aObject, const char* aTopic, const P { if (!nsCRT::strcmp("app-startup", aTopic)) { PRBool isDefault; - IsDefaultBrowser(PR_FALSE, &isDefault); + IsDefaultBrowser(&isDefault); if (!isDefault) return NS_OK; @@ -1026,7 +986,7 @@ nsWindowsShellService::Observe(nsISupports* aObject, const char* aTopic, const P } else if (!nsCRT::strcmp("quit-application", aTopic)) { PRBool isDefault; - IsDefaultBrowser(PR_FALSE, &isDefault); + IsDefaultBrowser(&isDefault); if (!isDefault) return NS_OK; diff --git a/mozilla/browser/components/shell/src/nsWindowsShellService.h b/mozilla/browser/components/shell/src/nsWindowsShellService.h index e8905d53613..857147b3550 100644 --- a/mozilla/browser/components/shell/src/nsWindowsShellService.h +++ b/mozilla/browser/components/shell/src/nsWindowsShellService.h @@ -71,8 +71,6 @@ protected: nsresult RegisterDDESupport(); nsresult UnregisterDDESupport(); -private: - PRBool mCheckedThisSession; }; #endif // nswindowsshellservice_h____