From d4472ee376e9cd52e6447cab0fd1ba429c500e7f Mon Sep 17 00:00:00 2001 From: "bienvenu%nventure.com" Date: Wed, 19 Nov 2003 18:42:27 +0000 Subject: [PATCH] add pref to auto migrate all profiles, r/a=sspitzer, sr=mscott 226146 git-svn-id: svn://10.0.0.236/trunk@149552 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/profile/src/nsProfile.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mozilla/profile/src/nsProfile.cpp b/mozilla/profile/src/nsProfile.cpp index e7148dda392..5c5d437653e 100644 --- a/mozilla/profile/src/nsProfile.cpp +++ b/mozilla/profile/src/nsProfile.cpp @@ -121,6 +121,7 @@ #define PREF_CONFIRM_AUTOMIGRATION "profile.confirm_automigration" #define PREF_AUTOMIGRATION "profile.allow_automigration" +#define PREF_MIGRATE_ALL "profile.migrate_all" #if defined (XP_MAC) #define CHROME_STYLE nsIWebBrowserChrome::CHROME_WINDOW_BORDERS | nsIWebBrowserChrome::CHROME_WINDOW_CLOSE | nsIWebBrowserChrome::CHROME_CENTER_SCREEN @@ -905,6 +906,9 @@ nsProfile::ProcessArgs(nsICmdLineService *cmdLineArgs, if (allowAutoMigration && (NS_SUCCEEDED(rv) || forceMigration)) { if (cmdResult || forceMigration) { + PRBool migrateAll = PR_FALSE; + (void)prefBranch->GetBoolPref(PREF_MIGRATE_ALL, &migrateAll); + rv = MigrateProfileInfo(); if (NS_FAILED(rv)) return rv; @@ -922,7 +926,7 @@ nsProfile::ProcessArgs(nsICmdLineService *cmdLineArgs, else if (num4xProfiles == 0 && numProfiles == 1) { profileURLStr = ""; } - else if (num4xProfiles == 1 && numProfiles == 0) { + else if ((num4xProfiles == 1 || migrateAll) && numProfiles == 0) { PRBool confirmed = PR_FALSE; if (NS_SUCCEEDED(ConfirmAutoMigration(canInteract, &confirmed)) && confirmed) AutoMigrate();