Don't use the aurora-specific profile by default, if this is not aurora (bug 1090967). r=bsmedberg

--HG--
extra : rebase_source : 5bfd3551ed6305e0a58ad1be98e60d210ba78730
This commit is contained in:
Panos Astithas 2014-10-31 17:25:34 +02:00
parent 37da0c07fc
commit d498f23c07

View File

@ -2335,6 +2335,21 @@ SelectProfile(nsIProfileLock* *aResult, nsIToolkitProfileService* aProfileSvc, n
return ShowProfileManager(aProfileSvc, aNative); return ShowProfileManager(aProfileSvc, aNative);
} }
#ifndef MOZ_DEV_EDITION
// If the only existing profile is the dev-edition-profile and this is not
// Developer Edition, then no valid profiles were found.
if (count == 1) {
nsCOMPtr<nsIToolkitProfile> deProfile;
// GetSelectedProfile will auto-select the only profile if there's just one
aProfileSvc->GetSelectedProfile(getter_AddRefs(deProfile));
nsAutoCString profileName;
deProfile->GetName(profileName);
if (profileName.EqualsLiteral("dev-edition-default")) {
count = 0;
}
}
#endif
if (!count) { if (!count) {
gDoMigration = true; gDoMigration = true;
gDoProfileReset = false; gDoProfileReset = false;
@ -2345,6 +2360,7 @@ SelectProfile(nsIProfileLock* *aResult, nsIToolkitProfileService* aProfileSvc, n
NS_LITERAL_CSTRING("default"), NS_LITERAL_CSTRING("default"),
getter_AddRefs(profile)); getter_AddRefs(profile));
if (NS_SUCCEEDED(rv)) { if (NS_SUCCEEDED(rv)) {
aProfileSvc->SetDefaultProfile(profile);
aProfileSvc->Flush(); aProfileSvc->Flush();
rv = profile->Lock(nullptr, aResult); rv = profile->Lock(nullptr, aResult);
if (NS_SUCCEEDED(rv)) { if (NS_SUCCEEDED(rv)) {