Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
nsProfile Class Reference

#include <nsProfile.h>

Inheritance diagram for nsProfile:
Inheritance graph
[legend]
Collaboration diagram for nsProfile:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 nsProfile ()
virtual ~nsProfile ()
nsresult Init ()
nsresult CopyRegKey (const PRUnichar *oldProfile, const PRUnichar *newProfile)
nsresult AutoMigrate ()
nsresult ShowProfileWizard (void)
void startupWithArgs (in nsICmdLineService cmdLine, in boolean canInteract)
 Starts up the profile manager.
long get4xProfileCount ()
void getProfileListX (in unsigned long which, out unsigned long length,[retval, array, size_is(length)] out wstring profileNames)
void migrateProfileInfo ()
void migrateAllProfiles ()
void migrateProfile (in wstring profileName)
void remigrateProfile (in wstring profileName)
void forgetCurrentProfile ()
void createDefaultProfile ()
nsIFile getProfileDir (in wstring profileName)
 Returns the actual profile directory.
wstring getProfilePath (in wstring profileName)
 Returns the path to a profile which can be shown to the user.
nsILocalFile getOriginalProfileDir (in wstring profileName)
 Returns a profile directory of the importType.
PRInt64 getProfileLastModTime (in wstring profileName)
 Returns the date on which a profile was last used.
void updateRegistry (in nsIFile regName)
void getRegStrings (in wstring profileName, out wstring regString, out wstring regName, out wstring regEmail, out wstring regOption)
void setRegStrings (in wstring profileName, in wstring regString, in wstring regName, in wstring regEmail, in wstring regOption)
string isRegStringSet (in wstring profileName)
void createNewProfileWithLocales (in wstring profileName, in wstring nativeProfileDir, in wstring UILocale, in wstring contentLocale, in boolean useExistingDir)
boolean isCurrentProfileAvailable ()
 The remaining methods are deprecated.
void getCurrentProfileDir (out nsIFile profileDir)
void getProfileList (out unsigned long length,[retval, array, size_is(length)] out wstring profileNames)
boolean profileExists (in wstring profileName)
void shutDownCurrentProfile (in unsigned long shutDownType)
void createNewProfile (in wstring profileName, in wstring nativeProfileDir, in wstring langcode, in boolean useExistingDir)
void renameProfile (in wstring oldName, in wstring newName)
void deleteProfile (in wstring name, in boolean canDeleteFiles)
void cloneProfile (in wstring profileName)
void vetoChange ()
void changeFailed ()
 Called by a profile change observer when a fatal error occurred during the attempt to switch the profile.

Public Attributes

readonly attribute boolean isStartingUp
 Returns TRUE if in the midst of startupWithArgs.
const unsigned long LIST_ONLY_NEW = 1
 The following values are used with getProfileListX.
const unsigned long LIST_ONLY_OLD = 2
const unsigned long LIST_ALL = 3
const unsigned long LIST_FOR_IMPORT = 4
attribute boolean automigrate
readonly attribute nsIFile defaultProfileParentDir
readonly attribute wstring firstProfile
attribute boolean startWithLastUsedProfile
 Affects startup behavior when there are multiple profiles.
readonly attribute long profileCount
attribute wstring currentProfile
const unsigned long SHUTDOWN_PERSIST = 0x00000001
const unsigned long SHUTDOWN_CLEANSE = 0x00000002

Private Member Functions

nsresult ProcessArgs (nsICmdLineService *service, PRBool canInteract, PRBool *profileDirSet, nsCString &profileURLStr)
nsresult LoadDefaultProfileDir (nsCString &profileURLStr, PRBool canInterract)
nsresult ConfirmAutoMigration (PRBool canInteract, PRBool *confirmed)
nsresult CopyDefaultFile (nsIFile *profDefaultsDir, nsIFile *newProfDir, const nsACString &fileName)
nsresult LoadNewProfilePrefs ()
nsresult SetProfileDir (const PRUnichar *profileName, nsIFile *profileDir)
nsresult AddLevelOfIndirection (nsIFile *aDir)
nsresult IsProfileDirSalted (nsIFile *profileDir, PRBool *isSalted)
nsresult DefineLocaleDefaultsDir ()
nsresult Update4xProfileInfo ()
nsresult GetOldRegLocation (nsIFile **aOldRegFile)
nsresult UpdateCurrentProfileModTime (PRBool updateRegistry)
nsresult MigrateProfileInternal (const PRUnichar *profileName, nsIFile *oldProfDir, nsIFile *newProfDir)
nsresult GetLocalProfileDir (const PRUnichar *profileName, nsIFile **localDir)

Private Attributes

PRBool mStartingUp
PRBool mAutomigrate
PRBool mOutofDiskSpace
PRBool mDiskSpaceErrorQuitCalled
PRBool mProfileChangeVetoed
PRBool mProfileChangeFailed
nsString mCurrentProfileName
PRBool mCurrentProfileAvailable
PRBool mIsUILocaleSpecified
nsCString mUILocaleName
PRBool mIsContentLocaleSpecified
nsCString mContentLocaleName
PRBool mShutdownProfileToreDownNetwork

Detailed Description

Definition at line 58 of file nsProfile.h.


Constructor & Destructor Documentation

nsProfile::~nsProfile ( ) [virtual]

Definition at line 253 of file nsProfile.cpp.

{
#if defined(DEBUG_profile_verbose)
    printf("~nsProfile \n");
#endif

   if (--gInstanceCount == 0) {
        
      delete gProfileDataAccess;
      delete gLocaleProfiles;
      NS_IF_RELEASE(gDirServiceProvider);
    }
}

Member Function Documentation

Definition at line 1396 of file nsProfile.cpp.

{
  nsresult rv;
  PRBool exists = PR_FALSE;
  if (!aDir) return NS_ERROR_NULL_POINTER;

  // check if aDir/prefs.js exists, if so, use it.
  // else, check if aDir/*.slt exists, if so, use it.
  // else, do the salt
  nsCOMPtr<nsIFile> prefFile;
  rv = aDir->Clone(getter_AddRefs(prefFile));
  NS_ENSURE_SUCCESS(rv,rv);

  rv = prefFile->AppendNative(NS_LITERAL_CSTRING("prefs.js"));
  NS_ENSURE_SUCCESS(rv,rv);

  rv = prefFile->Exists(&exists);
  NS_ENSURE_SUCCESS(rv,rv);

  if (exists) {
       // there is a prefs.js file in aDir, so just use aDir and don't salt
       return NS_OK;
  }

  // no prefs.js, now search for a .slt directory
  PRBool hasMore = PR_FALSE;
  PRBool isDir = PR_FALSE;
  nsCOMPtr<nsISimpleEnumerator> dirIterator;
  rv = aDir->GetDirectoryEntries(getter_AddRefs(dirIterator));
  NS_ENSURE_SUCCESS(rv,rv);

  rv = dirIterator->HasMoreElements(&hasMore);
  NS_ENSURE_SUCCESS(rv,rv);

  nsCOMPtr<nsIFile> dirEntry;

  while (hasMore) {
    rv = dirIterator->GetNext((nsISupports**)getter_AddRefs(dirEntry));
    if (NS_SUCCEEDED(rv)) {
      rv = dirEntry->IsDirectory(&isDir);
      if (NS_SUCCEEDED(rv) && isDir) {
        nsCAutoString leafName;
        rv = dirEntry->GetNativeLeafName(leafName);
              if (NS_SUCCEEDED(rv) && !leafName.IsEmpty()) {
                PRUint32 length = leafName.Length();
                // check if the filename is the right length, len("xxxxxxxx.slt")
                if (length == (SALT_SIZE + kSaltExtensionCString_Len)) {
                     // check that the filename ends with ".slt"
                     if (nsCRT::strncmp(leafName.get() + SALT_SIZE,
                         kSaltExtensionCString,
                         kSaltExtensionCString_Len) == 0) {
                       // found a salt directory, use it
                       rv = aDir->AppendNative(leafName);
                       return rv;
                     }
                }
              }
      }
    }
    rv = dirIterator->HasMoreElements(&hasMore);
    NS_ENSURE_SUCCESS(rv,rv);
  }
  
  // if we get here, we need to add the extra directory

  // turn PR_Now() into milliseconds since epoch
  // and salt rand with that.
  double fpTime;
  LL_L2D(fpTime, PR_Now());
  srand((uint)(fpTime * 1e-6 + 0.5));     // use 1e-6, granularity of PR_Now() on the mac is seconds

  nsCAutoString saltStr;
  PRInt32 i;
  for (i=0;i<SALT_SIZE;i++) {
       saltStr.Append(table[rand()%TABLE_SIZE]);
  }
  saltStr.Append(kSaltExtensionCString, kSaltExtensionCString_Len);
#ifdef DEBUG_profile_verbose
  printf("directory name: %s\n",saltStr.get());
#endif

  rv = aDir->AppendNative(saltStr);
  NS_ENSURE_SUCCESS(rv,rv);

  exists = PR_FALSE;
  rv = aDir->Exists(&exists);
  NS_ENSURE_SUCCESS(rv,rv);
  if (!exists) {
    rv = aDir->Create(nsIFile::DIRECTORY_TYPE, 0700);
    NS_ENSURE_SUCCESS(rv,rv);
  }
       
  return NS_OK;
}

Here is the call graph for this function:

Definition at line 627 of file nsProfile.cpp.

{
    nsresult rv = NS_OK;
    // automatically migrate the one 4.x profile
    rv = MigrateAllProfiles();

    // Create a default profile if automigration failed for reasons
    // other than out of disk space case...
    if (NS_FAILED(rv) && !mOutofDiskSpace) 
    {
#ifdef DEBUG_profile
        printf("AutoMigration failed. Let's create a default 5.0 profile.\n");
#endif
        
        rv = CreateDefaultProfile();
        if (NS_FAILED(rv)) return rv;
    }   

    gProfileDataAccess->mProfileDataChanged = PR_TRUE;
    gProfileDataAccess->UpdateRegistry(nsnull);

    return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Called by a profile change observer when a fatal error occurred during the attempt to switch the profile.

The profile should be considered in an unsafe condition, and the profile manager should inform the user and exit immediately.

void nsIProfile::cloneProfile ( in wstring  profileName) [inherited]
nsresult nsProfile::ConfirmAutoMigration ( PRBool  canInteract,
PRBool confirmed 
) [private]

Definition at line 562 of file nsProfile.cpp.

{
    NS_ENSURE_ARG_POINTER(confirmed);
    nsCOMPtr<nsIPrefBranch> prefBranch;
    *confirmed = PR_FALSE;
    nsresult rv;
    
    // First check PREF_CONFIRM_AUTOMIGRATION.
    // If FALSE, we go ahead and migrate without asking.
    PRBool confirmAutomigration = PR_TRUE;
    nsCOMPtr<nsIPrefService> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
    if (NS_FAILED(rv)) return rv;
    rv = prefs->GetBranch(nsnull, getter_AddRefs(prefBranch));
    if (NS_FAILED(rv)) return rv;

    (void)prefBranch->GetBoolPref(PREF_CONFIRM_AUTOMIGRATION, &confirmAutomigration);
    if (!confirmAutomigration) {
        *confirmed = PR_TRUE;
        return NS_OK;
    }
    
    // If allowed, put up a confirm dialog and ask the user
    if (!canInteract)
        return NS_ERROR_PROFILE_REQUIRES_INTERACTION;

    nsCOMPtr<nsIStringBundleService> stringBundleService(do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv));
    if (NS_FAILED(rv)) return rv;

    nsCOMPtr<nsIStringBundle> migrationBundle, brandBundle;
    rv = stringBundleService->CreateBundle(kMigrationBundleURL, getter_AddRefs(migrationBundle));
    if (NS_FAILED(rv)) return rv;
    rv = stringBundleService->CreateBundle(kBrandBundleURL, getter_AddRefs(brandBundle));
    if (NS_FAILED(rv)) return rv;
    
    nsXPIDLString brandName;
    rv = brandBundle->GetStringFromName(NS_LITERAL_STRING("brandShortName").get(), getter_Copies(brandName));
    if (NS_FAILED(rv)) return rv;

    nsXPIDLString msgString, dialogTitle, button0Title, button1Title;
    const PRUnichar *formatStrings[] = { brandName.get(), brandName.get() };
    rv = migrationBundle->FormatStringFromName(NS_LITERAL_STRING("confirmMigration").get(),
                                                 formatStrings, 2, getter_Copies(msgString));
    if (NS_FAILED(rv)) return rv;
    
    rv = migrationBundle->GetStringFromName(NS_LITERAL_STRING("dialogTitle").get(), getter_Copies(dialogTitle));
    if (NS_FAILED(rv)) return rv;
    rv = migrationBundle->GetStringFromName(NS_LITERAL_STRING("migrate").get(), getter_Copies(button0Title));
    if (NS_FAILED(rv)) return rv;
    rv = migrationBundle->GetStringFromName(NS_LITERAL_STRING("manage").get(), getter_Copies(button1Title));
    if (NS_FAILED(rv)) return rv;
    
    nsCOMPtr<nsIPromptService> promptService(do_GetService(NS_PROMPTSERVICE_CONTRACTID, &rv));
    if (NS_FAILED(rv)) return rv;
    PRInt32 buttonPressed;
    rv = promptService->ConfirmEx(nsnull, dialogTitle.get(), msgString.get(),
                                  (nsIPromptService::BUTTON_POS_0 * nsIPromptService::BUTTON_TITLE_IS_STRING) +
                                  (nsIPromptService::BUTTON_POS_1 * nsIPromptService::BUTTON_TITLE_IS_STRING),
                                  button0Title, button1Title, nsnull,
                                  nsnull, nsnull, &buttonPressed);
    if (NS_FAILED(rv)) return rv;
    *confirmed = (buttonPressed == 0);
    return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsProfile::CopyDefaultFile ( nsIFile profDefaultsDir,
nsIFile newProfDir,
const nsACString &  fileName 
) [private]

Definition at line 2097 of file nsProfile.cpp.

{
    nsresult rv;
    nsCOMPtr<nsIFile> defaultFile;
    PRBool exists;
    
    rv = profDefaultsDir->Clone(getter_AddRefs(defaultFile));
    if (NS_FAILED(rv)) return rv;
    
    defaultFile->AppendNative(fileName);
    rv = defaultFile->Exists(&exists);
    if (NS_FAILED(rv)) return rv;
    if (exists)
        rv = defaultFile->CopyToNative(newProfDir, fileName);
    else
        rv = NS_ERROR_FILE_NOT_FOUND;

       return rv;
}

Here is the call graph for this function:

nsresult nsProfile::CopyRegKey ( const PRUnichar oldProfile,
const PRUnichar newProfile 
)

Definition at line 1883 of file nsProfile.cpp.

{
    NS_ENSURE_ARG_POINTER(oldProfile);   
    NS_ENSURE_ARG_POINTER(newProfile);   

    nsresult rv = NS_OK;

    ProfileStruct    *aProfile;

    rv = gProfileDataAccess->GetValue(oldProfile, &aProfile);
    if (NS_FAILED(rv)) return rv;

    aProfile->profileName        = newProfile;

    rv = gProfileDataAccess->SetValue(aProfile);

       delete aProfile;

    return rv;
}

Here is the call graph for this function:

void nsIProfile::createNewProfile ( in wstring  profileName,
in wstring  nativeProfileDir,
in wstring  langcode,
in boolean  useExistingDir 
) [inherited]
void nsIProfileInternal::createNewProfileWithLocales ( in wstring  profileName,
in wstring  nativeProfileDir,
in wstring  UILocale,
in wstring  contentLocale,
in boolean  useExistingDir 
) [inherited]

Definition at line 2118 of file nsProfile.cpp.

{
    nsresult rv;
    
    nsCOMPtr<nsIProperties> directoryService = 
             do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv);
    NS_ENSURE_TRUE(directoryService, NS_ERROR_FAILURE);    

    nsCOMPtr<nsIFile> localeDefaults;
    rv = directoryService->Get(NS_APP_PROFILE_DEFAULTS_NLOC_50_DIR, NS_GET_IID(nsIFile), getter_AddRefs(localeDefaults));
    if (NS_SUCCEEDED(rv))
    {
        nsCOMPtr<nsIChromeRegistrySea> packageRegistry = 
                 do_GetService(NS_CHROMEREGISTRY_CONTRACTID, &rv);
        if (NS_SUCCEEDED(rv))
        {
            nsCAutoString localeName;
            rv = packageRegistry->GetSelectedLocale(NS_LITERAL_CSTRING("global-region"), localeName);
            if (NS_SUCCEEDED(rv))
                rv = localeDefaults->AppendNative(localeName);
        }
        rv = directoryService->Set(NS_APP_PROFILE_DEFAULTS_50_DIR, localeDefaults);
    }
    return rv;
}

Here is the call graph for this function:

void nsIProfile::deleteProfile ( in wstring  name,
in boolean  canDeleteFiles 
) [inherited]
nsresult nsProfile::GetLocalProfileDir ( const PRUnichar profileName,
nsIFile **  localDir 
) [private]

Definition at line 2617 of file nsProfile.cpp.

{
  *aLocalDir = nsnull;
  nsresult rv;
  nsCOMPtr<nsIProperties> directoryService = 
    do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv);
  if (NS_FAILED(rv))
    return rv;
  nsCOMPtr<nsIFile> localDir;
  rv = directoryService->Get(NS_APP_USER_PROFILES_LOCAL_ROOT_DIR,
                             NS_GET_IID(nsIFile),
                             getter_AddRefs(localDir));
  if (NS_FAILED(rv))
    return rv;
  rv = localDir->Append(nsDependentString(aProfileName));
  if (NS_FAILED(rv))
    return rv;
  localDir.swap(*aLocalDir);
  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsProfile::GetOldRegLocation ( nsIFile **  aOldRegFile) [private]

Definition at line 2030 of file nsProfile.cpp.

{
    NS_ENSURE_ARG_POINTER(aOldRegFile);
    *aOldRegFile = nsnull;
    nsresult rv = NS_OK;
    
    // For XP_UNIX there was no registry for 4.x profiles.
    // Return nsnull for the file, and NS_OK - we succeeded in doing nothing.
    
#if defined(XP_WIN) || defined(XP_OS2) || defined(XP_MAC) || defined(XP_MACOSX)
    nsCOMPtr<nsIFile> oldRegFile;

#if defined(XP_WIN)
    rv = NS_GetSpecialDirectory(NS_WIN_WINDOWS_DIR, getter_AddRefs(oldRegFile));
#elif defined(XP_OS2)
    rv = NS_GetSpecialDirectory(NS_OS2_DIR, getter_AddRefs(oldRegFile));
#elif defined(XP_MAC) || defined(XP_MACOSX)
    rv = NS_GetSpecialDirectory(NS_MAC_PREFS_DIR, getter_AddRefs(oldRegFile));
#endif

    if (NS_FAILED(rv))
        return rv;
    rv = oldRegFile->AppendNative(nsDependentCString(OLD_REGISTRY_FILE_NAME));
    if (NS_FAILED(rv))
        return rv;
    NS_ADDREF(*aOldRegFile = oldRegFile);
#endif

    return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsILocalFile nsIProfileInternal::getOriginalProfileDir ( in wstring  profileName) [inherited]

Returns a profile directory of the importType.

The path will point to the 4.x profile directory. Should be used only from the import module.

nsIFile nsIProfileInternal::getProfileDir ( in wstring  profileName) [inherited]

Returns the actual profile directory.

PRInt64 nsIProfileInternal::getProfileLastModTime ( in wstring  profileName) [inherited]

Returns the date on which a profile was last used.

value is in milliseconds since midnight Jan 1, 1970 GMT (same as nsIFile)

void nsIProfile::getProfileList ( out unsigned long  length,
[retval, array, size_is(length)] out wstring  profileNames 
) [inherited]
void nsIProfileInternal::getProfileListX ( in unsigned long  which,
out unsigned long  length,
[retval, array, size_is(length)] out wstring  profileNames 
) [inherited]
wstring nsIProfileInternal::getProfilePath ( in wstring  profileName) [inherited]

Returns the path to a profile which can be shown to the user.

If the actual profile directory is salted, returns the unsalted parent. This is the directory which will be deleted by deleteProfile(name, true).

void nsIProfileInternal::getRegStrings ( in wstring  profileName,
out wstring  regString,
out wstring  regName,
out wstring  regEmail,
out wstring  regOption 
) [inherited]

Definition at line 268 of file nsProfile.cpp.

Here is the call graph for this function:

The remaining methods are deprecated.

DO NOT USE THEM.

nsresult nsProfile::IsProfileDirSalted ( nsIFile profileDir,
PRBool isSalted 
) [private]

Definition at line 1491 of file nsProfile.cpp.

{
    nsresult rv;
    NS_ENSURE_ARG_POINTER(isSalted);
    *isSalted = PR_FALSE;
    
    // 1. The name of the profile dir has to end in ".slt"
    nsCAutoString leafName;
    rv = profileDir->GetNativeLeafName(leafName);
    if (NS_FAILED(rv)) return rv;

    PRBool endsWithSalt = PR_FALSE;    
    if (leafName.Length() >= kSaltExtensionCString_Len)
    {
        nsReadingIterator<char> stringEnd;
        leafName.EndReading(stringEnd);

        nsReadingIterator<char> stringStart = stringEnd;
        stringStart.advance( -(NS_STATIC_CAST(PRInt32, kSaltExtensionCString_Len)) );

        endsWithSalt =
            Substring(stringStart, stringEnd).Equals(kSaltExtensionCString);
    }
    if (!endsWithSalt)
        return NS_OK;
    
    // 2. The profile dir has to be its parent's only child.    
    nsCOMPtr<nsIFile> parentDir;
    rv = profileDir->GetParent(getter_AddRefs(parentDir));
    if (NS_FAILED(rv)) return rv;

    PRBool hasMore;
    nsCOMPtr<nsISimpleEnumerator> dirIterator;
    rv = parentDir->GetDirectoryEntries(getter_AddRefs(dirIterator));
    if (NS_FAILED(rv)) return rv;
    
    PRInt32 numChildren = 0;
    rv = dirIterator->HasMoreElements(&hasMore);
    
    while (NS_SUCCEEDED(rv) && hasMore && numChildren <= 1) {
        nsCOMPtr<nsIFile> child;
        rv = dirIterator->GetNext((nsISupports**)getter_AddRefs(child));    
        if (NS_SUCCEEDED(rv))
            ++numChildren;
        rv = dirIterator->HasMoreElements(&hasMore);
    }
    if (NS_SUCCEEDED(rv) && numChildren == 1)
        *isSalted = PR_TRUE;
    
    return NS_OK;
}

Here is the call graph for this function:

string nsIProfileInternal::isRegStringSet ( in wstring  profileName) [inherited]
nsresult nsProfile::LoadDefaultProfileDir ( nsCString profileURLStr,
PRBool  canInterract 
) [private]

Definition at line 447 of file nsProfile.cpp.

{
    nsresult rv;
    nsCOMPtr<nsIURI> profileURL;
    PRInt32 numProfiles=0;
  
    GetProfileCount(&numProfiles);

    if (profileURLStr.IsEmpty())
    {
        nsCOMPtr<nsIPrefBranch> prefBranch;
        nsCOMPtr<nsIPrefService> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
        if (NS_FAILED(rv)) return rv;
        rv = prefs->GetBranch(nsnull, getter_AddRefs(prefBranch));
        if (NS_FAILED(rv)) return rv;
    
        // If this flag is TRUE, it makes the multiple profile case
        // just like the single profile case - the profile will be
        // set to that returned by GetCurrentProfile(). It will prevent
        // the profile selection dialog from being shown when we have
        // multiple profiles.
        
        PRBool startWithLastUsedProfile = PR_FALSE;

        // But first, make sure this app supports this.
        PRBool cantAutoSelect;
        rv = prefBranch->GetBoolPref("profile.manage_only_at_launch", &cantAutoSelect);
        if (NS_SUCCEEDED(rv) && !cantAutoSelect)
          GetStartWithLastUsedProfile(&startWithLastUsedProfile);
        
        // This means that there was no command-line argument to force
        // profile UI to come up. But we need the UI anyway if there
        // are no profiles yet, or if there is more than one.
        if (numProfiles == 0)
        {
            rv = CreateDefaultProfile();
            if (NS_FAILED(rv)) return rv;
            // Will get set in call to SetCurrentProfile() below
        }
        else if (numProfiles == 1 || startWithLastUsedProfile)
        {
            // If we get here and the 1 profile is the current profile,
            // which can happen with QuickLaunch, there's no need to do
            // any futher work.
            if (mCurrentProfileAvailable)
               return NS_OK;

            // Make sure the profile dir exists. If not, we need the UI
            nsCOMPtr<nsIFile> curProfileDir;
            PRBool exists = PR_FALSE;
            
            rv = GetCurrentProfileDir(getter_AddRefs(curProfileDir));
            if (NS_SUCCEEDED(rv))
                rv = curProfileDir->Exists(&exists);
            if (NS_FAILED(rv) || !exists)
                profileURLStr = PROFILE_MANAGER_URL; 
            if (exists)
            {
#ifdef MOZ_PROFILELOCKING
                // If the profile is locked, we need the UI
                nsCOMPtr<nsILocalFile> localFile(do_QueryInterface(curProfileDir));
                nsProfileLock tempLock;
                rv = tempLock.Lock(localFile, nsnull);
                if (NS_FAILED(rv))
                    profileURLStr = PROFILE_MANAGER_URL;
#endif
            }
        }
        else
            profileURLStr = PROFILE_SELECTION_URL;
    }

    if (!profileURLStr.IsEmpty())
    {
        if (!canInteract) return NS_ERROR_PROFILE_REQUIRES_INTERACTION;

        nsCOMPtr<nsIWindowWatcher> windowWatcher(do_GetService(NS_WINDOWWATCHER_CONTRACTID, &rv));
        if (NS_FAILED(rv)) return rv;

        nsCOMPtr<nsIDialogParamBlock> ioParamBlock(do_CreateInstance(NS_DIALOGPARAMBLOCK_CONTRACTID, &rv));
        if (NS_FAILED(rv)) return rv;

        // String0  -> mode
        // Int0    <-  result code (1 == OK, 0 == Cancel)

        ioParamBlock->SetNumberStrings(1);
        ioParamBlock->SetString(0, NS_LITERAL_STRING("startup").get());

        nsCOMPtr<nsIDOMWindow> newWindow;
        rv = windowWatcher->OpenWindow(nsnull,
                                       profileURLStr.get(),
                                       "_blank",
                                       kDefaultOpenWindowParams,
                                       ioParamBlock,
                                       getter_AddRefs(newWindow));
        if (NS_FAILED(rv)) return rv;
        PRInt32 dialogConfirmed;
        ioParamBlock->GetInt(0, &dialogConfirmed);
        if (dialogConfirmed == 0) return NS_ERROR_ABORT;
    }

    nsXPIDLString currentProfileStr;    
    rv = GetCurrentProfile(getter_Copies(currentProfileStr));
    if (NS_FAILED(rv)) return rv;

    // if at this point we have a current profile but it is not set, set it
    if (!mCurrentProfileAvailable) {
        rv = SetCurrentProfile(currentProfileStr);
        if (NS_FAILED(rv)) return rv;
    }

    return NS_OK;
}

Here is the call graph for this function:

Definition at line 2018 of file nsProfile.cpp.

{
    nsresult rv;
    nsCOMPtr<nsIPrefService> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
    if (NS_FAILED(rv)) return rv;
    
    prefs->ResetUserPrefs();
    prefs->ReadUserPrefs(nsnull);

    return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void nsIProfileInternal::migrateProfile ( in wstring  profileName) [inherited]
nsresult nsProfile::MigrateProfileInternal ( const PRUnichar profileName,
nsIFile oldProfDir,
nsIFile newProfDir 
) [private]

Definition at line 2149 of file nsProfile.cpp.

{
    NS_ENSURE_ARG_POINTER(profileName);   

#if defined(DEBUG_profile)
    printf("Inside Migrate Profile routine.\n" );
#endif

    // Call migration service to do the work.

    nsresult rv;
    nsCOMPtr <nsIPrefMigration> pPrefMigrator =
            do_CreateInstance(kPrefMigrationCID, &rv);
    if (NS_FAILED(rv)) return rv;
        
    nsCOMPtr<nsILocalFile> oldProfDirLocal(do_QueryInterface(oldProfDir, &rv));
    if (NS_FAILED(rv)) return rv;    
    nsCOMPtr<nsILocalFile> newProfDirLocal(do_QueryInterface(newProfDir, &rv));
    if (NS_FAILED(rv)) return rv;
        
    nsCAutoString oldProfDirStr;
    nsCAutoString newProfDirStr;

    rv = oldProfDirLocal->GetPersistentDescriptor(oldProfDirStr);
    if (NS_FAILED(rv)) return rv;
    rv = newProfDirLocal->GetPersistentDescriptor(newProfDirStr);
    if (NS_FAILED(rv)) return rv;

    // you can do this a bunch of times.
    rv = pPrefMigrator->AddProfilePaths(oldProfDirStr.get(), newProfDirStr.get());  

    rv = pPrefMigrator->ProcessPrefs(PR_TRUE); // param is ignored
    if (NS_FAILED(rv)) return rv;

    // check for diskspace errors  
    nsresult errorCode;   
    errorCode = pPrefMigrator->GetError();

    // In either of the cases below we have to return error to make
    // app understand that migration has failed.
    if (errorCode == MIGRATION_CREATE_NEW)
    {
        PRInt32 numProfiles = 0;
        ShowProfileWizard();

        // When the automigration process fails because of disk space error,
        // we present user a create profile wizard if the user chooses to create a 
        // a profile then. But then the user may click on cancel on that dialog...
        // So, if the user clicks on cancel, the number of profiles should be 
        // ZERO at the point for the user who failed to automigrate single 4x profile.
        // On such condition, set mDiskSpaceErrorQuitCalled to allow user to quit the app.
        // If the user is presented with profilemanager dialog with multiple 4x profiles
        // to migrate, value of mDiskSpaceErrorQuitCalled does not matter as it gets ignored..
        // If a single profile needs automigration and no confirmation 
        // is needed for that operation mAutomigrate is set to false. 
        if (!mAutomigrate)
        {
            GetProfileCount(&numProfiles);
            if (numProfiles == 0)
                mDiskSpaceErrorQuitCalled = PR_TRUE;
        }
        mOutofDiskSpace = PR_TRUE;
        return NS_ERROR_FAILURE;
    }
    else if (errorCode == MIGRATION_CANCEL) 
    {
        // When the automigration process fails because of disk space error,
        // user may choose to simply quit the app from the dialog presented 
        // by pref-migrator. So, set mDiskSpaceErrorQuitCalled to allow user 
        // to quit the app in such a case.
        // If the user is presented with profilemanager dialog with multiple 4x profiles
        // to migrate, value of mDiskSpaceErrorQuitCalled does not matter as it gets ignored..
        // If a single profile needs automigration and no confirmation 
        // is needed for that operation mAutomigrate is set to false. 
        if (!mAutomigrate)
            mDiskSpaceErrorQuitCalled = PR_TRUE;

        ForgetCurrentProfile();
        mOutofDiskSpace = PR_TRUE;
        return NS_ERROR_FAILURE;
    }
    else if (errorCode != MIGRATION_SUCCESS) 
    {
        return NS_ERROR_FAILURE;
    }

    // No longer copying the default 5.0 profile files into
    // the migrated profile. Check for them as requested.
       
    rv = SetProfileDir(profileName, newProfDir);
    if (NS_FAILED(rv)) return rv;

    gProfileDataAccess->SetMigratedFromDir(profileName, oldProfDirLocal);
    gProfileDataAccess->mProfileDataChanged = PR_TRUE;
    gProfileDataAccess->UpdateRegistry(nsnull);

    return rv;
}

Here is the call graph for this function:

nsresult nsProfile::ProcessArgs ( nsICmdLineService service,
PRBool  canInteract,
PRBool profileDirSet,
nsCString profileURLStr 
) [private]

Definition at line 652 of file nsProfile.cpp.

{
    NS_ASSERTION(cmdLineArgs, "Invalid cmdLineArgs");   
    NS_ASSERTION(profileDirSet, "Invalid profileDirSet");   

    nsresult rv;
    nsXPIDLCString cmdResult;
    nsCOMPtr<nsILocalFile> currProfileDir;

       // keep track of if the user passed us any profile related command line args
       // if they did, we won't force migration
       PRBool foundProfileCommandArg = PR_FALSE;

#ifdef DEBUG_profile_verbose
    printf("Profile Manager : Command Line Options : Begin\n");
#endif
 
    // check for command line arguments for profile manager
    // -UILocale command
    rv = cmdLineArgs->GetCmdLineValue(UILOCALE_CMD_LINE_ARG, getter_Copies(cmdResult));
    if (NS_SUCCEEDED(rv))
    {
        if (cmdResult) {
           mIsUILocaleSpecified = PR_TRUE;
            mUILocaleName = cmdResult;
        }
    }

    // -contentLocale command
    rv = cmdLineArgs->GetCmdLineValue(CONTENTLOCALE_CMD_LINE_ARG, getter_Copies(cmdResult));
    if (NS_SUCCEEDED(rv))
    {
        if (cmdResult) {
            mIsContentLocaleSpecified = PR_TRUE;
            mContentLocaleName = cmdResult;
        }
    }

    // -P command line option works this way:
    // apprunner -P profilename 
    // runs the app using the profile <profilename> 
    // remembers profile for next time
    rv = cmdLineArgs->GetCmdLineValue(PROFILE_CMD_LINE_ARG, getter_Copies(cmdResult));
    if (NS_SUCCEEDED(rv))
    {
        if (cmdResult) {
            foundProfileCommandArg = PR_TRUE;
            nsAutoString currProfileName; 
            rv = NS_CopyNativeToUnicode(cmdResult, currProfileName); 
            NS_ASSERTION(NS_SUCCEEDED(rv), "failed to convert ProfileName to unicode");
 
#ifdef DEBUG_profile
            printf("ProfileName : %s\n", (const char*)cmdResult);
#endif /* DEBUG_profile */
            PRBool exists;
            rv = ProfileExists(currProfileName.get(), &exists);
            if (NS_FAILED(rv)) return rv;            
            
            if (!exists) {
                PRInt32 num5xProfiles = 0;
                PRInt32 num4xProfiles = 0;

                GetProfileCount(&num5xProfiles);
                Get4xProfileCount(&num4xProfiles);

                if (num5xProfiles == 0 && num4xProfiles == 0) {
                    profileURLStr = PROFILE_WIZARD_URL;
                }
                else if (num5xProfiles > 0) {
                    profileURLStr = PROFILE_SELECTION_URL;
                }
                else if (num4xProfiles > 0) {
                    profileURLStr = PROFILE_MANAGER_URL;
                }
                *profileDirSet = PR_FALSE;
            }
            else {
                rv = SetCurrentProfile(currProfileName.get());
                if (NS_SUCCEEDED(rv))
                    *profileDirSet = PR_TRUE;
            }
        }
    }

    // -CreateProfile command line option works this way:
    // apprunner -CreateProfile profilename 
    // creates a new profile named <profilename> and sets the directory to your CWD 
    // runs app using that profile 
    // remembers profile for next time 
    //                         - OR -
    // apprunner -CreateProfile "profilename profiledir" 
    // creates a new profile named <profilename> and sets the directory to <profiledir> 
    // runs app using that profile 
    // remembers profile for next time

    rv = cmdLineArgs->GetCmdLineValue(CREATE_PROFILE_CMD_LINE_ARG, getter_Copies(cmdResult));
    if (NS_SUCCEEDED(rv))
    {
        if (cmdResult) {

#ifdef DEBUG_profile_verbose
            printf("profileName & profileDir are: %s\n", (const char*)cmdResult);
#endif
            foundProfileCommandArg = PR_TRUE;
            nsAutoString currProfileName; 
 
            char *tmpStr;
            rv = NS_CopyNativeToUnicode(
                 nsDependentCString(nsCRT::strtok(cmdResult.BeginWriting(), " ", &tmpStr)),
                                    currProfileName);
            NS_ASSERTION(NS_SUCCEEDED(rv), "failed to convert ProfileName to unicode");

            char *currProfileDirString = nsCRT::strtok(tmpStr, " ", &tmpStr); 
            if (currProfileDirString && *currProfileDirString) {
                rv = NS_NewNativeLocalFile(nsDependentCString(currProfileDirString), 
                     PR_TRUE, getter_AddRefs(currProfileDir));
                NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE);
            }
            else {
                // No directory name provided. Place it in
                // NS_APP_USER_PROFILES_ROOT_DIR
                nsCOMPtr<nsIProperties> directoryService(do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv));
                if (NS_FAILED(rv)) return rv;
                rv = directoryService->Get(NS_APP_USER_PROFILES_ROOT_DIR, NS_GET_IID(nsILocalFile), getter_AddRefs(currProfileDir));
                if (NS_FAILED(rv)) return rv;
            }

            nsAutoString currProfilePath;
            currProfileDir->GetPath(currProfilePath);
            rv = CreateNewProfile(currProfileName.get(), currProfilePath.get(), nsnull, PR_TRUE);
            if (NS_SUCCEEDED(rv)) {
                *profileDirSet = PR_TRUE;
                mCurrentProfileAvailable = PR_TRUE;
                gProfileDataAccess->SetCurrentProfile(currProfileName.get());

                // Load new profile prefs for the sake of tinderbox scripts
                // which assume prefs.js exists after -CreateProfile.
                nsCOMPtr<nsIFile> newProfileDir;
                GetProfileDir(currProfileName.get(), getter_AddRefs(newProfileDir));
                if (newProfileDir) {
                  nsCOMPtr<nsIFile> localDir;
                  GetLocalProfileDir(currProfileName.get(), getter_AddRefs(localDir));
                  gDirServiceProvider->SetProfileDir(newProfileDir, localDir);
                }
                rv = LoadNewProfilePrefs();
                gProfileDataAccess->mProfileDataChanged = PR_TRUE;
                gProfileDataAccess->UpdateRegistry(nsnull);
            }
            rv = ForgetCurrentProfile();
            if (NS_FAILED(rv)) return rv;
        }
    }

    // Start Profile Manager
    rv = cmdLineArgs->GetCmdLineValue(PROFILE_MANAGER_CMD_LINE_ARG, getter_Copies(cmdResult));
    if (NS_SUCCEEDED(rv))
    {        
        if (cmdResult) {
                     foundProfileCommandArg = PR_TRUE;
            profileURLStr = PROFILE_MANAGER_URL;
        }
    }
    
    // Start Profile Selection
    rv = cmdLineArgs->GetCmdLineValue(PROFILE_SELECTION_CMD_LINE_ARG, getter_Copies(cmdResult));
    if (NS_SUCCEEDED(rv))
    {        
        if (cmdResult) {
                     foundProfileCommandArg = PR_TRUE;
            profileURLStr = PROFILE_SELECTION_URL;
        }
    }
    
    
    // Start Profile Wizard
    rv = cmdLineArgs->GetCmdLineValue(PROFILE_WIZARD_CMD_LINE_ARG, getter_Copies(cmdResult));
    if (NS_SUCCEEDED(rv))
    {        
        if (cmdResult) {
                     foundProfileCommandArg = PR_TRUE;
            profileURLStr = PROFILE_WIZARD_URL;
        }
    }

       PRBool forceMigration = PR_FALSE;
       if (!foundProfileCommandArg) {
              rv = gProfileDataAccess->DetermineForceMigration(&forceMigration);
              NS_ASSERTION(NS_SUCCEEDED(rv),"failed to determine if we should force migration");
       }

    nsCOMPtr<nsIPrefBranch> prefBranch;
   
    // First check PREF_AUTOMIGRATION. 
    PRBool allowAutoMigration = PR_TRUE;
    nsCOMPtr<nsIPrefService> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
    if (NS_FAILED(rv)) return rv;
    rv = prefs->GetBranch(nsnull, getter_AddRefs(prefBranch));
    if (NS_FAILED(rv)) return rv;

    (void)prefBranch->GetBoolPref(PREF_AUTOMIGRATION, &allowAutoMigration);

    // Start Migaration activity
    rv = cmdLineArgs->GetCmdLineValue(INSTALLER_CMD_LINE_ARG, getter_Copies(cmdResult));
    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;

            PRInt32 num4xProfiles = 0;
            rv = Get4xProfileCount(&num4xProfiles);
            if (NS_FAILED(rv)) return rv;
            
            PRInt32 numProfiles = 0;
            GetProfileCount(&numProfiles);
            if (num4xProfiles == 0 && numProfiles == 0) {
                // Let us create a default 5.0 profile
                CreateDefaultProfile();
                if (NS_FAILED(rv)) return rv;
            }
            else if (num4xProfiles == 0 && numProfiles == 1) {
                profileURLStr = "";
            }
            else if ((num4xProfiles == 1 || migrateAll) && numProfiles == 0) {
                PRBool confirmed = PR_FALSE;
                if (NS_SUCCEEDED(ConfirmAutoMigration(canInteract, &confirmed)) && confirmed)
                    AutoMigrate();
                else
                    profileURLStr = PROFILE_MANAGER_URL;
            }
            else if (numProfiles > 1)
            {
                profileURLStr = PROFILE_SELECTION_URL;
            }
            else {
                // show the profile manager
                profileURLStr = PROFILE_MANAGER_URL;
            }
        }
    }

#ifdef DEBUG_profile_verbose
    printf("Profile Manager : Command Line Options : End\n");
#endif

    return NS_OK;
}

Here is the call graph for this function:

boolean nsIProfile::profileExists ( in wstring  profileName) [inherited]
void nsIProfileInternal::remigrateProfile ( in wstring  profileName) [inherited]
void nsIProfile::renameProfile ( in wstring  oldName,
in wstring  newName 
) [inherited]
nsresult nsProfile::SetProfileDir ( const PRUnichar profileName,
nsIFile profileDir 
) [private]

Definition at line 1548 of file nsProfile.cpp.

{
    NS_ENSURE_ARG(profileName);
    NS_ENSURE_ARG(profileDir);   

    nsresult rv = NS_OK;
 
    // Need to ensure that this directory exists
    PRBool exists;
    rv = profileDir->Exists(&exists);
    if (NS_SUCCEEDED(rv) && !exists)
        rv = profileDir->Create(nsIFile::DIRECTORY_TYPE, 0700);
    if (NS_FAILED(rv)) 
        return rv;
    
    nsCOMPtr<nsILocalFile> localFile(do_QueryInterface(profileDir));
    NS_ENSURE_TRUE(localFile, NS_ERROR_FAILURE);                

    ProfileStruct* aProfile = new ProfileStruct();
    NS_ENSURE_TRUE(aProfile, NS_ERROR_OUT_OF_MEMORY);

    aProfile->profileName = profileName;
    aProfile->SetResolvedProfileDir(localFile);
    aProfile->isMigrated = PR_TRUE;
    aProfile->isImportType = PR_FALSE;

    // convert "now" from microsecs to millisecs
    PRInt64 oneThousand = LL_INIT(0, 1000);
    PRInt64 nowInMilliSecs = PR_Now();
    LL_DIV(aProfile->creationTime, nowInMilliSecs, oneThousand); 

    gProfileDataAccess->SetValue(aProfile);
    
    delete aProfile;

    return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void nsIProfileInternal::setRegStrings ( in wstring  profileName,
in wstring  regString,
in wstring  regName,
in wstring  regEmail,
in wstring  regOption 
) [inherited]

Definition at line 2370 of file nsProfile.cpp.

{
    nsresult rv;
    nsCOMPtr<nsIWindowWatcher> windowWatcher(do_GetService(NS_WINDOWWATCHER_CONTRACTID, &rv));
    if (NS_FAILED(rv)) return rv;

    nsCOMPtr<nsIDialogParamBlock> ioParamBlock(do_CreateInstance(NS_DIALOGPARAMBLOCK_CONTRACTID, &rv));
    if (NS_FAILED(rv)) return rv;
    ioParamBlock->SetInt(0,4); // standard wizard buttons
   
    nsCOMPtr<nsIDOMWindow> newWindow;
    rv = windowWatcher->OpenWindow(nsnull,
                                   PROFILE_WIZARD_URL,
                                   "_blank",
                                   kDefaultOpenWindowParams,
                                   ioParamBlock,
                                   getter_AddRefs(newWindow));
    return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void nsIProfile::shutDownCurrentProfile ( in unsigned long  shutDownType) [inherited]
void nsIProfileInternal::startupWithArgs ( in nsICmdLineService  cmdLine,
in boolean  canInteract 
) [inherited]

Starts up the profile manager.

Parameters:
cmdLineArguments passed from command line - can be null
canInteractWhether dialogs can be shown during startup If false and dialogs would need to be shown, returns NS_ERROR_PROFILE_REQUIRES_INTERRACTION

Definition at line 2004 of file nsProfile.cpp.

{
    nsresult rv = NS_OK;

#ifndef XP_BEOS
    nsCOMPtr<nsIFile> oldRegFile;
    rv = GetOldRegLocation(getter_AddRefs(oldRegFile));
    if (NS_SUCCEEDED(rv))
    rv = gProfileDataAccess->Get4xProfileInfo(oldRegFile, PR_TRUE);
#endif

    return rv;
}

Here is the call graph for this function:

Definition at line 2061 of file nsProfile.cpp.

{
    nsresult rv;

    // convert "now" from microsecs to millisecs
    PRInt64 oneThousand = LL_INIT(0, 1000);
    PRInt64 nowInMilliSecs = PR_Now();
    LL_DIV(nowInMilliSecs, nowInMilliSecs, oneThousand); 
    
    rv = gProfileDataAccess->SetProfileLastModTime(mCurrentProfileName.get(), nowInMilliSecs);
    if (NS_SUCCEEDED(rv) && updateRegistry) {
        gProfileDataAccess->mProfileDataChanged = PR_TRUE;
        gProfileDataAccess->UpdateRegistry(nsnull);
    }
    return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 118 of file nsIProfileInternal.idl.

Definition at line 72 of file nsIProfile.idl.

Definition at line 119 of file nsIProfileInternal.idl.

readonly attribute wstring nsIProfileInternal::firstProfile [inherited]

Definition at line 120 of file nsIProfileInternal.idl.

Returns TRUE if in the midst of startupWithArgs.

Definition at line 64 of file nsIProfileInternal.idl.

const unsigned long nsIProfileInternal::LIST_ALL = 3 [inherited]

Definition at line 82 of file nsIProfileInternal.idl.

Definition at line 83 of file nsIProfileInternal.idl.

const unsigned long nsIProfileInternal::LIST_ONLY_NEW = 1 [inherited]

The following values are used with getProfileListX.

LIST_ONLY_NEW - the list will contain only migrated profiles LIST_ONLY_OLD - the list will contain only un-migrated profiles LIST_ALL - the list will contain all profiles LIST_FOR_IMPORT - the list is generated from 4.x registry and contains all the 4.x profiles do not use this except from the import module

Definition at line 80 of file nsIProfileInternal.idl.

const unsigned long nsIProfileInternal::LIST_ONLY_OLD = 2 [inherited]

Definition at line 81 of file nsIProfileInternal.idl.

Definition at line 91 of file nsProfile.h.

Definition at line 104 of file nsProfile.h.

Definition at line 98 of file nsProfile.h.

Definition at line 97 of file nsProfile.h.

Definition at line 93 of file nsProfile.h.

Definition at line 103 of file nsProfile.h.

Definition at line 100 of file nsProfile.h.

Definition at line 92 of file nsProfile.h.

Definition at line 95 of file nsProfile.h.

Definition at line 94 of file nsProfile.h.

Definition at line 106 of file nsProfile.h.

Definition at line 90 of file nsProfile.h.

Definition at line 101 of file nsProfile.h.

readonly attribute long nsIProfile::profileCount [inherited]

Definition at line 68 of file nsIProfile.idl.

const unsigned long nsIProfile::SHUTDOWN_CLEANSE = 0x00000002 [inherited]

Definition at line 75 of file nsIProfile.idl.

const unsigned long nsIProfile::SHUTDOWN_PERSIST = 0x00000001 [inherited]

Definition at line 74 of file nsIProfile.idl.

Affects startup behavior when there are multiple profiles.

If FALSE, the profile selection dialog will be shown. If TRUE, the last used profile will be chosen automatically.

Definition at line 127 of file nsIProfileInternal.idl.


The documentation for this class was generated from the following files: