Fixing bugs 28243, 27402 and 27850. MozRegistry is updated whenever the profile information is changed. This allows profile selector reflect the registry values directly. r=sspitzer,norris. a=jar,phil
git-svn-id: svn://10.0.0.236/trunk@61404 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
ac59fc3fc7
commit
4edef5c43b
@ -872,6 +872,7 @@ NS_IMETHODIMP nsProfile::CreateNewProfile(const char* profileName, const char* n
|
||||
|
||||
gProfileDataAccess->mNumProfiles++;
|
||||
gProfileDataAccess->mProfileDataChanged = PR_TRUE;
|
||||
gProfileDataAccess->UpdateRegistry();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
@ -977,6 +978,7 @@ NS_IMETHODIMP nsProfile::RenameProfile(const char* oldName, const char* newName)
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
gProfileDataAccess->mProfileDataChanged = PR_TRUE;
|
||||
gProfileDataAccess->UpdateRegistry();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
@ -1053,6 +1055,7 @@ NS_IMETHODIMP nsProfile::DeleteProfile(const char* profileName, PRBool canDelete
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
gProfileDataAccess->mProfileDataChanged = PR_TRUE;
|
||||
gProfileDataAccess->UpdateRegistry();
|
||||
|
||||
return rv;
|
||||
}
|
||||
@ -1156,6 +1159,8 @@ NS_IMETHODIMP nsProfile::MigrateProfileInfo()
|
||||
|
||||
#endif /* XP_PC || XP_MAC */
|
||||
|
||||
gProfileDataAccess->UpdateRegistry();
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
@ -1251,6 +1256,7 @@ NS_IMETHODIMP nsProfile::MigrateProfile(const char* profileName, PRBool showProg
|
||||
gProfileDataAccess->mNumOldProfiles--;
|
||||
|
||||
gProfileDataAccess->mProfileDataChanged = PR_TRUE;
|
||||
gProfileDataAccess->UpdateRegistry();
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
@ -653,8 +653,11 @@ nsProfileAccess::UpdateRegistry()
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
// Set the current profile
|
||||
rv = m_registry->SetStringUTF8(profilesTreeKey, REGISTRY_CURRENT_PROFILE_STRING, mCurrentProfile);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
if (mCurrentProfile)
|
||||
{
|
||||
rv = m_registry->SetStringUTF8(profilesTreeKey, REGISTRY_CURRENT_PROFILE_STRING, mCurrentProfile);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
}
|
||||
|
||||
// Set the registry version
|
||||
rv = m_registry->SetStringUTF8(profilesTreeKey, REGISTRY_VERSION_STRING, mVersion);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user