Bug 1041516 part 2: reset the "check for default browser" pref to true when setting ourselves as the default browser, r=Gijs
This commit is contained in:
@@ -313,6 +313,11 @@ nsGNOMEShellService::SetDefaultBrowser(bool aClaimAllTypes,
|
||||
}
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID));
|
||||
if (prefs) {
|
||||
(void) prefs->SetBoolPref(PREF_CHECKDEFAULTBROWSER, true);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -91,6 +91,11 @@ nsMacShellService::SetDefaultBrowser(bool aClaimAllTypes, bool aForAllUsers)
|
||||
}
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID));
|
||||
if (prefs) {
|
||||
(void) prefs->SetBoolPref(PREF_CHECKDEFAULTBROWSER, true);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -702,6 +702,11 @@ nsWindowsShellService::SetDefaultBrowser(bool aClaimAllTypes, bool aForAllUsers)
|
||||
}
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID));
|
||||
if (prefs) {
|
||||
(void) prefs->SetBoolPref(PREF_CHECKDEFAULTBROWSER, true);
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ function test() {
|
||||
is(Application.prefs.root, "", "Check the Application preference root");
|
||||
|
||||
// test for user changed preferences
|
||||
ok(Application.prefs.get("browser.shell.checkDefaultBrowser").modified, "A single preference is marked as modified.");
|
||||
ok(Application.prefs.get("browser.dom.window.dump.enabled").modified, "A single preference is marked as modified.");
|
||||
ok(!Application.prefs.get(testdata.string).modified, "A single preference is marked as not modified.");
|
||||
|
||||
// test for a locked preference
|
||||
|
||||
Reference in New Issue
Block a user