Fixing bug 29093. Providing no UI path for shrimp. r=amusil

This commit is contained in:
racham%netscape.com 2000-05-16 23:18:49 +00:00
Родитель 775e993edd
Коммит 2ff01718f7
1 изменённых файлов: 17 добавлений и 1 удалений

Просмотреть файл

@ -91,8 +91,10 @@
#define INSTALLER_CMD_LINE_ARG "-installer"
#define CREATE_PROFILE_CMD_LINE_ARG "-CreateProfile"
#define PROFILE_CMD_LINE_ARG "-P"
#define SHRIMP_CMD_LINE_ARG "-Shrimp"
#define PREF_CONFIRM_AUTOMIGRATION "profile.confirm_automigration"
#define SHRIMP_PREF "shrimp.startup.enable"
#if defined (XP_MAC)
#define CHROME_STYLE nsIWebBrowserChrome::windowBordersOn | nsIWebBrowserChrome::windowCloseOn | nsIWebBrowserChrome::centerScreen
@ -111,6 +113,7 @@
static nsProfileAccess* gProfileDataAccess = nsnull;
static PRInt32 gDataAccessInstCount = 0;
static PRBool mCurrentProfileAvailable = PR_FALSE;
static PRBool gShrimpFlag = PR_FALSE;
// IID and CIDs of all the services needed
static NS_DEFINE_CID(kIProfileIID, NS_IPROFILE_IID);
@ -285,7 +288,10 @@ nsProfile::LoadDefaultProfileDir(nsCString & profileURLStr)
profileURLStr = PROFILE_SELECTION_URL;
}
if (profileURLStr.Length() != 0)
PRBool shrimpPrefEnabled = PR_FALSE;
prefs->GetBoolPref(SHRIMP_PREF, &shrimpPrefEnabled);
if ((profileURLStr.Length() != 0) && !(shrimpPrefEnabled && gShrimpFlag))
{
rv = NS_NewURI(getter_AddRefs(profileURL), (const char *)profileURLStr);
@ -558,6 +564,16 @@ nsProfile::ProcessArgs(nsICmdLineService *cmdLineArgs,
}
}
// Start Profile Wizard
rv = cmdLineArgs->GetCmdLineValue(SHRIMP_CMD_LINE_ARG, &cmdResult);
if (NS_SUCCEEDED(rv))
{
if (cmdResult) {
gShrimpFlag = PR_TRUE;
profileURLStr = "";
}
}
// Start Migaration activity
rv = cmdLineArgs->GetCmdLineValue(INSTALLER_CMD_LINE_ARG, &cmdResult);
if (NS_SUCCEEDED(rv))