diff --git a/chrome/public/nsIChromeRegistry.idl b/chrome/public/nsIChromeRegistry.idl index 9b6191bec1e..1a22b4b75d4 100644 --- a/chrome/public/nsIChromeRegistry.idl +++ b/chrome/public/nsIChromeRegistry.idl @@ -69,6 +69,7 @@ interface nsIChromeRegistry : nsISupports /* Applies a skin or locale to all possible packages */ void selectSkin(in wstring skinName, in boolean useProfile); void selectLocale(in wstring localeName, in boolean useProfile); + void selectLocaleForProfile(in wstring localeName, in wstring profilePath); wstring getSelectedLocale(in wstring packageName); void deselectSkin(in wstring skinName, in boolean useProfile); diff --git a/chrome/src/nsChromeRegistry.cpp b/chrome/src/nsChromeRegistry.cpp index eadad6acb38..527d3e12f28 100644 --- a/chrome/src/nsChromeRegistry.cpp +++ b/chrome/src/nsChromeRegistry.cpp @@ -703,7 +703,7 @@ NS_IMETHODIMP nsChromeRegistry::GetDynamicDataSource(nsIURI *aChromeURL, PRBool overlayFile += "content/overlays.rdf"; else overlayFile += "skin/stylesheets.rdf"; - return LoadDataSource(overlayFile, aResult, aUseProfile); + return LoadDataSource(overlayFile, aResult, aUseProfile, nsnull); } NS_IMETHODIMP nsChromeRegistry::GetStyleSheets(nsIURI *aChromeURL, nsISupportsArray **aResult) @@ -799,7 +799,8 @@ NS_IMETHODIMP nsChromeRegistry::GetDynamicInfo(nsIURI *aChromeURL, PRBool aIsOve NS_IMETHODIMP nsChromeRegistry::LoadDataSource(const nsCString &aFileName, nsIRDFDataSource **aResult, - PRBool aUseProfileDir) + PRBool aUseProfileDir, + const char *aProfilePath) { // Init the data source to null. *aResult = nsnull; @@ -808,7 +809,14 @@ NS_IMETHODIMP nsChromeRegistry::LoadDataSource(const nsCString &aFileName, // Try the profile root first. if (aUseProfileDir) { - key = mProfileRoot; + // use given profile path if non-null + if (aProfilePath) { + key = aProfilePath; + key += "chrome/"; + } + else + key = mProfileRoot; + key += aFileName; } else { @@ -1283,13 +1291,20 @@ NS_IMETHODIMP nsChromeRegistry::UpdateDynamicDataSources(nsIRDFDataSource *aData NS_IMETHODIMP nsChromeRegistry::SelectSkin(const PRUnichar* aSkin, PRBool aUseProfile) { - return SetProvider("skin", mSelectedSkin, aSkin, aUseProfile, PR_TRUE); + return SetProvider("skin", mSelectedSkin, aSkin, aUseProfile, nsnull, PR_TRUE); } NS_IMETHODIMP nsChromeRegistry::SelectLocale(const PRUnichar* aLocale, PRBool aUseProfile) { - return SetProvider("locale", mSelectedLocale, aLocale, aUseProfile, PR_TRUE); + return SetProvider("locale", mSelectedLocale, aLocale, aUseProfile, nsnull, PR_TRUE); +} + +NS_IMETHODIMP nsChromeRegistry::SelectLocaleForProfile(const PRUnichar *aLocale, + const PRUnichar *aProfilePath) +{ + // to be changed to use given path + return SetProvider("locale", mSelectedLocale, aLocale, PR_TRUE, NS_ConvertUCS2toUTF8(aProfilePath), PR_TRUE); } /* wstring getSelectedLocale (); */ @@ -1370,19 +1385,19 @@ NS_IMETHODIMP nsChromeRegistry::GetSelectedLocale(const PRUnichar *aPackageName, NS_IMETHODIMP nsChromeRegistry::DeselectSkin(const PRUnichar* aSkin, PRBool aUseProfile) { - return SetProvider("skin", mSelectedSkin, aSkin, aUseProfile, PR_FALSE); + return SetProvider("skin", mSelectedSkin, aSkin, aUseProfile, nsnull, PR_FALSE); } NS_IMETHODIMP nsChromeRegistry::DeselectLocale(const PRUnichar* aLocale, PRBool aUseProfile) { - return SetProvider("locale", mSelectedLocale, aLocale, aUseProfile, PR_FALSE); + return SetProvider("locale", mSelectedLocale, aLocale, aUseProfile, nsnull, PR_FALSE); } NS_IMETHODIMP nsChromeRegistry::SetProvider(const nsCString& aProvider, nsIRDFResource* aSelectionArc, const PRUnichar* aProviderName, - PRBool aUseProfile, + PRBool aUseProfile, const char *aProfilePath, PRBool aIsAdding) { // Build the provider resource str. @@ -1454,7 +1469,7 @@ NS_IMETHODIMP nsChromeRegistry::SetProvider(const nsCString& aProvider, // Select the skin for this package resource. nsCOMPtr packageResource(do_QueryInterface(packageNode)); if (packageResource) { - SetProviderForPackage(aProvider, packageResource, entry, aSelectionArc, aUseProfile, aIsAdding); + SetProviderForPackage(aProvider, packageResource, entry, aSelectionArc, aUseProfile, aProfilePath, aIsAdding); } } } @@ -1472,7 +1487,8 @@ nsChromeRegistry::SetProviderForPackage(const nsCString& aProvider, nsIRDFResource* aPackageResource, nsIRDFResource* aProviderPackageResource, nsIRDFResource* aSelectionArc, - PRBool aUseProfile, PRBool aIsAdding) + PRBool aUseProfile, const char *aProfilePath, + PRBool aIsAdding) { // Figure out which file we're needing to modify, e.g., is it the install // dir or the profile dir, and get the right datasource. @@ -1481,7 +1497,7 @@ nsChromeRegistry::SetProviderForPackage(const nsCString& aProvider, dataSourceStr += "s.rdf"; nsCOMPtr dataSource; - LoadDataSource(dataSourceStr, getter_AddRefs(dataSource), aUseProfile); + LoadDataSource(dataSourceStr, getter_AddRefs(dataSource), aUseProfile, aProfilePath); if (!dataSource) return NS_ERROR_FAILURE; @@ -1567,7 +1583,8 @@ NS_IMETHODIMP nsChromeRegistry::SelectProviderForPackage(const nsCString& aProvi if (!providerResource) return NS_ERROR_FAILURE; - return SetProviderForPackage(aProviderType, packageResource, providerResource, aSelectionArc, aUseProfile, aIsAdding);; + return SetProviderForPackage(aProviderType, packageResource, providerResource, aSelectionArc, + aUseProfile, nsnull, aIsAdding);; } NS_IMETHODIMP nsChromeRegistry::InstallProvider(const nsCString& aProviderType, @@ -1607,7 +1624,7 @@ NS_IMETHODIMP nsChromeRegistry::InstallProvider(const nsCString& aProviderType, nsCAutoString installStr = "all-"; installStr += aProviderType; installStr += "s.rdf"; - LoadDataSource(installStr, getter_AddRefs(installSource), aUseProfile); + LoadDataSource(installStr, getter_AddRefs(installSource), aUseProfile, nsnull); if (!installSource) return NS_ERROR_FAILURE; @@ -1983,46 +2000,46 @@ nsChromeRegistry::AddToCompositeDataSource(PRBool aUseProfile) // Profiles take precedence. Load them first. nsCOMPtr dataSource; nsCAutoString name("user-skins.rdf"); - LoadDataSource(name, getter_AddRefs(dataSource), PR_TRUE); + LoadDataSource(name, getter_AddRefs(dataSource), PR_TRUE, nsnull); mChromeDataSource->AddDataSource(dataSource); name = "all-skins.rdf"; - LoadDataSource(name, getter_AddRefs(dataSource), PR_TRUE); + LoadDataSource(name, getter_AddRefs(dataSource), PR_TRUE, nsnull); mChromeDataSource->AddDataSource(dataSource); name = "user-locales.rdf"; - LoadDataSource(name, getter_AddRefs(dataSource), PR_TRUE); + LoadDataSource(name, getter_AddRefs(dataSource), PR_TRUE, nsnull); mChromeDataSource->AddDataSource(dataSource); name = "all-locales.rdf"; - LoadDataSource(name, getter_AddRefs(dataSource), PR_TRUE); + LoadDataSource(name, getter_AddRefs(dataSource), PR_TRUE, nsnull); mChromeDataSource->AddDataSource(dataSource); name = "all-packages.rdf"; - LoadDataSource(name, getter_AddRefs(dataSource), PR_TRUE); + LoadDataSource(name, getter_AddRefs(dataSource), PR_TRUE, nsnull); mChromeDataSource->AddDataSource(dataSource); } // Always load the install dir datasources nsCOMPtr dataSource; nsCAutoString name = "user-skins.rdf"; - LoadDataSource(name, getter_AddRefs(dataSource), PR_FALSE); + LoadDataSource(name, getter_AddRefs(dataSource), PR_FALSE, nsnull); mChromeDataSource->AddDataSource(dataSource); name = "all-skins.rdf"; - LoadDataSource(name, getter_AddRefs(dataSource), PR_FALSE); + LoadDataSource(name, getter_AddRefs(dataSource), PR_FALSE, nsnull); mChromeDataSource->AddDataSource(dataSource); name = "user-locales.rdf"; - LoadDataSource(name, getter_AddRefs(dataSource), PR_FALSE); + LoadDataSource(name, getter_AddRefs(dataSource), PR_FALSE, nsnull); mChromeDataSource->AddDataSource(dataSource); name = "all-locales.rdf"; - LoadDataSource(name, getter_AddRefs(dataSource), PR_FALSE); + LoadDataSource(name, getter_AddRefs(dataSource), PR_FALSE, nsnull); mChromeDataSource->AddDataSource(dataSource); name = "all-packages.rdf"; - LoadDataSource(name, getter_AddRefs(dataSource), PR_FALSE); + LoadDataSource(name, getter_AddRefs(dataSource), PR_FALSE, nsnull); mChromeDataSource->AddDataSource(dataSource); return NS_OK; } diff --git a/chrome/src/nsChromeRegistry.h b/chrome/src/nsChromeRegistry.h index 9a0266f755f..e61871fbb5a 100644 --- a/chrome/src/nsChromeRegistry.h +++ b/chrome/src/nsChromeRegistry.h @@ -78,7 +78,7 @@ protected: private: NS_IMETHOD LoadDataSource(const nsCString &aFileName, nsIRDFDataSource **aResult, - PRBool aUseProfileDirOnly = PR_FALSE); + PRBool aUseProfileDirOnly = PR_FALSE, const char *aProfilePath = nsnull); NS_IMETHOD GetProfileRoot(nsCString& aFileURL); NS_IMETHOD GetInstallRoot(nsCString& aFileURL); @@ -109,13 +109,16 @@ private: NS_IMETHOD SetProvider(const nsCString& aProvider, nsIRDFResource* aSelectionArc, const PRUnichar* aProviderName, - PRBool aAllUsers, PRBool aIsAdding); + PRBool aAllUsers, + const char *aProfilePath, + PRBool aIsAdding); NS_IMETHOD SetProviderForPackage(const nsCString& aProvider, nsIRDFResource* aPackageResource, nsIRDFResource* aProviderPackageResource, nsIRDFResource* aSelectionArc, - PRBool aAllUsers, PRBool aIsAdding); + PRBool aAllUsers, const char *aProfilePath, + PRBool aIsAdding); NS_IMETHOD SelectProviderForPackage(const nsCString& aProviderType, const PRUnichar *aProviderName, diff --git a/profile/resources/content/createProfileWizard.js b/profile/resources/content/createProfileWizard.js index 4157c930d8a..dabfec00dfa 100644 --- a/profile/resources/content/createProfileWizard.js +++ b/profile/resources/content/createProfileWizard.js @@ -83,8 +83,10 @@ function selectLocale(langcode) if ( chromeRegistry ) { chromeRegistry = chromeRegistry.QueryInterface( Components.interfaces.nsIChromeRegistry ); } - var old_lang = chromeRegistry.getSelectedLocale("navigator"); - chromeRegistry.selectLocale(langcode, false); + //var old_lang = chromeRegistry.getSelectedLocale("navigator"); + //dump("\n --> createPrifleWizard.j sold_lang=" + old_lang + "--\n"); + chromeRegistry.selectLocale(langcode, true); + dump("\n --> createPrifleWizard.js langcode=" + langcode + "--\n"); } catch(e) { dump("\n--> createPrifleWizard.js: selectLocale() failed!\n"); @@ -107,15 +109,12 @@ function onFinish() var profDir = wizardManager.WSM.PageData["newProfile1_2"].ProfileDir.value; var profLocale = wizardManager.WSM.PageData["newProfile1_2"].ProfileLocale.value; - // Get langcode + // Get & select langcode proceed = processCreateProfileData(profName, profDir, profLocale); if( proceed ) { if( window.opener ) { window.opener.CreateProfile(profName, profDir); window.close(); - - // select locale - selectLocale(profLocale); } else { profile.startApprunner(profName); diff --git a/profile/src/nsProfile.cpp b/profile/src/nsProfile.cpp index 5380df53e6b..01ea17aa35b 100644 --- a/profile/src/nsProfile.cpp +++ b/profile/src/nsProfile.cpp @@ -59,6 +59,8 @@ #include "nsICategoryManager.h" #include "nsISupportsPrimitives.h" +#include "nsIChromeRegistry.h" // chromeReg + // Interfaces Needed #include "nsIDocShell.h" #include "nsIWebShell.h" @@ -129,6 +131,7 @@ static NS_DEFINE_CID(kPrefMigrationCID, NS_PREFMIGRATION_CID); static NS_DEFINE_CID(kPrefConverterCID, NS_PREFCONVERTER_CID); static NS_DEFINE_IID(kCookieServiceCID, NS_COOKIESERVICE_CID); +static NS_DEFINE_CID(kChromeRegistryCID, NS_CHROMEREGISTRY_CID); static nsresult GetStringFromSpec(nsFileSpec inSpec, char **string) @@ -996,6 +999,13 @@ nsProfile::CreateNewProfile(const PRUnichar* profileName, if (tmpdir.Exists()) defaultsDirSpec = tmpdir; + nsCOMPtr chromeRegistry = do_GetService(kChromeRegistryCID, &rv); + if (NS_SUCCEEDED(rv)) { + nsFileURL fileURL(dirSpec); + const char* fileStr = fileURL.GetURLString(); + rv = chromeRegistry->SelectLocaleForProfile(langcode, + NS_ConvertUTF8toUCS2(fileStr)); + } } // Copy contents from defaults folder. if (defaultsDirSpec.Exists() && (!useExistingDir)) @@ -1006,7 +1016,6 @@ nsProfile::CreateNewProfile(const PRUnichar* profileName, gProfileDataAccess->mNumProfiles++; gProfileDataAccess->mProfileDataChanged = PR_TRUE; gProfileDataAccess->UpdateRegistry(); - return NS_OK; } diff --git a/rdf/chrome/public/nsIChromeRegistry.idl b/rdf/chrome/public/nsIChromeRegistry.idl index 9b6191bec1e..1a22b4b75d4 100644 --- a/rdf/chrome/public/nsIChromeRegistry.idl +++ b/rdf/chrome/public/nsIChromeRegistry.idl @@ -69,6 +69,7 @@ interface nsIChromeRegistry : nsISupports /* Applies a skin or locale to all possible packages */ void selectSkin(in wstring skinName, in boolean useProfile); void selectLocale(in wstring localeName, in boolean useProfile); + void selectLocaleForProfile(in wstring localeName, in wstring profilePath); wstring getSelectedLocale(in wstring packageName); void deselectSkin(in wstring skinName, in boolean useProfile); diff --git a/rdf/chrome/src/nsChromeRegistry.cpp b/rdf/chrome/src/nsChromeRegistry.cpp index eadad6acb38..527d3e12f28 100644 --- a/rdf/chrome/src/nsChromeRegistry.cpp +++ b/rdf/chrome/src/nsChromeRegistry.cpp @@ -703,7 +703,7 @@ NS_IMETHODIMP nsChromeRegistry::GetDynamicDataSource(nsIURI *aChromeURL, PRBool overlayFile += "content/overlays.rdf"; else overlayFile += "skin/stylesheets.rdf"; - return LoadDataSource(overlayFile, aResult, aUseProfile); + return LoadDataSource(overlayFile, aResult, aUseProfile, nsnull); } NS_IMETHODIMP nsChromeRegistry::GetStyleSheets(nsIURI *aChromeURL, nsISupportsArray **aResult) @@ -799,7 +799,8 @@ NS_IMETHODIMP nsChromeRegistry::GetDynamicInfo(nsIURI *aChromeURL, PRBool aIsOve NS_IMETHODIMP nsChromeRegistry::LoadDataSource(const nsCString &aFileName, nsIRDFDataSource **aResult, - PRBool aUseProfileDir) + PRBool aUseProfileDir, + const char *aProfilePath) { // Init the data source to null. *aResult = nsnull; @@ -808,7 +809,14 @@ NS_IMETHODIMP nsChromeRegistry::LoadDataSource(const nsCString &aFileName, // Try the profile root first. if (aUseProfileDir) { - key = mProfileRoot; + // use given profile path if non-null + if (aProfilePath) { + key = aProfilePath; + key += "chrome/"; + } + else + key = mProfileRoot; + key += aFileName; } else { @@ -1283,13 +1291,20 @@ NS_IMETHODIMP nsChromeRegistry::UpdateDynamicDataSources(nsIRDFDataSource *aData NS_IMETHODIMP nsChromeRegistry::SelectSkin(const PRUnichar* aSkin, PRBool aUseProfile) { - return SetProvider("skin", mSelectedSkin, aSkin, aUseProfile, PR_TRUE); + return SetProvider("skin", mSelectedSkin, aSkin, aUseProfile, nsnull, PR_TRUE); } NS_IMETHODIMP nsChromeRegistry::SelectLocale(const PRUnichar* aLocale, PRBool aUseProfile) { - return SetProvider("locale", mSelectedLocale, aLocale, aUseProfile, PR_TRUE); + return SetProvider("locale", mSelectedLocale, aLocale, aUseProfile, nsnull, PR_TRUE); +} + +NS_IMETHODIMP nsChromeRegistry::SelectLocaleForProfile(const PRUnichar *aLocale, + const PRUnichar *aProfilePath) +{ + // to be changed to use given path + return SetProvider("locale", mSelectedLocale, aLocale, PR_TRUE, NS_ConvertUCS2toUTF8(aProfilePath), PR_TRUE); } /* wstring getSelectedLocale (); */ @@ -1370,19 +1385,19 @@ NS_IMETHODIMP nsChromeRegistry::GetSelectedLocale(const PRUnichar *aPackageName, NS_IMETHODIMP nsChromeRegistry::DeselectSkin(const PRUnichar* aSkin, PRBool aUseProfile) { - return SetProvider("skin", mSelectedSkin, aSkin, aUseProfile, PR_FALSE); + return SetProvider("skin", mSelectedSkin, aSkin, aUseProfile, nsnull, PR_FALSE); } NS_IMETHODIMP nsChromeRegistry::DeselectLocale(const PRUnichar* aLocale, PRBool aUseProfile) { - return SetProvider("locale", mSelectedLocale, aLocale, aUseProfile, PR_FALSE); + return SetProvider("locale", mSelectedLocale, aLocale, aUseProfile, nsnull, PR_FALSE); } NS_IMETHODIMP nsChromeRegistry::SetProvider(const nsCString& aProvider, nsIRDFResource* aSelectionArc, const PRUnichar* aProviderName, - PRBool aUseProfile, + PRBool aUseProfile, const char *aProfilePath, PRBool aIsAdding) { // Build the provider resource str. @@ -1454,7 +1469,7 @@ NS_IMETHODIMP nsChromeRegistry::SetProvider(const nsCString& aProvider, // Select the skin for this package resource. nsCOMPtr packageResource(do_QueryInterface(packageNode)); if (packageResource) { - SetProviderForPackage(aProvider, packageResource, entry, aSelectionArc, aUseProfile, aIsAdding); + SetProviderForPackage(aProvider, packageResource, entry, aSelectionArc, aUseProfile, aProfilePath, aIsAdding); } } } @@ -1472,7 +1487,8 @@ nsChromeRegistry::SetProviderForPackage(const nsCString& aProvider, nsIRDFResource* aPackageResource, nsIRDFResource* aProviderPackageResource, nsIRDFResource* aSelectionArc, - PRBool aUseProfile, PRBool aIsAdding) + PRBool aUseProfile, const char *aProfilePath, + PRBool aIsAdding) { // Figure out which file we're needing to modify, e.g., is it the install // dir or the profile dir, and get the right datasource. @@ -1481,7 +1497,7 @@ nsChromeRegistry::SetProviderForPackage(const nsCString& aProvider, dataSourceStr += "s.rdf"; nsCOMPtr dataSource; - LoadDataSource(dataSourceStr, getter_AddRefs(dataSource), aUseProfile); + LoadDataSource(dataSourceStr, getter_AddRefs(dataSource), aUseProfile, aProfilePath); if (!dataSource) return NS_ERROR_FAILURE; @@ -1567,7 +1583,8 @@ NS_IMETHODIMP nsChromeRegistry::SelectProviderForPackage(const nsCString& aProvi if (!providerResource) return NS_ERROR_FAILURE; - return SetProviderForPackage(aProviderType, packageResource, providerResource, aSelectionArc, aUseProfile, aIsAdding);; + return SetProviderForPackage(aProviderType, packageResource, providerResource, aSelectionArc, + aUseProfile, nsnull, aIsAdding);; } NS_IMETHODIMP nsChromeRegistry::InstallProvider(const nsCString& aProviderType, @@ -1607,7 +1624,7 @@ NS_IMETHODIMP nsChromeRegistry::InstallProvider(const nsCString& aProviderType, nsCAutoString installStr = "all-"; installStr += aProviderType; installStr += "s.rdf"; - LoadDataSource(installStr, getter_AddRefs(installSource), aUseProfile); + LoadDataSource(installStr, getter_AddRefs(installSource), aUseProfile, nsnull); if (!installSource) return NS_ERROR_FAILURE; @@ -1983,46 +2000,46 @@ nsChromeRegistry::AddToCompositeDataSource(PRBool aUseProfile) // Profiles take precedence. Load them first. nsCOMPtr dataSource; nsCAutoString name("user-skins.rdf"); - LoadDataSource(name, getter_AddRefs(dataSource), PR_TRUE); + LoadDataSource(name, getter_AddRefs(dataSource), PR_TRUE, nsnull); mChromeDataSource->AddDataSource(dataSource); name = "all-skins.rdf"; - LoadDataSource(name, getter_AddRefs(dataSource), PR_TRUE); + LoadDataSource(name, getter_AddRefs(dataSource), PR_TRUE, nsnull); mChromeDataSource->AddDataSource(dataSource); name = "user-locales.rdf"; - LoadDataSource(name, getter_AddRefs(dataSource), PR_TRUE); + LoadDataSource(name, getter_AddRefs(dataSource), PR_TRUE, nsnull); mChromeDataSource->AddDataSource(dataSource); name = "all-locales.rdf"; - LoadDataSource(name, getter_AddRefs(dataSource), PR_TRUE); + LoadDataSource(name, getter_AddRefs(dataSource), PR_TRUE, nsnull); mChromeDataSource->AddDataSource(dataSource); name = "all-packages.rdf"; - LoadDataSource(name, getter_AddRefs(dataSource), PR_TRUE); + LoadDataSource(name, getter_AddRefs(dataSource), PR_TRUE, nsnull); mChromeDataSource->AddDataSource(dataSource); } // Always load the install dir datasources nsCOMPtr dataSource; nsCAutoString name = "user-skins.rdf"; - LoadDataSource(name, getter_AddRefs(dataSource), PR_FALSE); + LoadDataSource(name, getter_AddRefs(dataSource), PR_FALSE, nsnull); mChromeDataSource->AddDataSource(dataSource); name = "all-skins.rdf"; - LoadDataSource(name, getter_AddRefs(dataSource), PR_FALSE); + LoadDataSource(name, getter_AddRefs(dataSource), PR_FALSE, nsnull); mChromeDataSource->AddDataSource(dataSource); name = "user-locales.rdf"; - LoadDataSource(name, getter_AddRefs(dataSource), PR_FALSE); + LoadDataSource(name, getter_AddRefs(dataSource), PR_FALSE, nsnull); mChromeDataSource->AddDataSource(dataSource); name = "all-locales.rdf"; - LoadDataSource(name, getter_AddRefs(dataSource), PR_FALSE); + LoadDataSource(name, getter_AddRefs(dataSource), PR_FALSE, nsnull); mChromeDataSource->AddDataSource(dataSource); name = "all-packages.rdf"; - LoadDataSource(name, getter_AddRefs(dataSource), PR_FALSE); + LoadDataSource(name, getter_AddRefs(dataSource), PR_FALSE, nsnull); mChromeDataSource->AddDataSource(dataSource); return NS_OK; } diff --git a/rdf/chrome/src/nsChromeRegistry.h b/rdf/chrome/src/nsChromeRegistry.h index 9a0266f755f..e61871fbb5a 100644 --- a/rdf/chrome/src/nsChromeRegistry.h +++ b/rdf/chrome/src/nsChromeRegistry.h @@ -78,7 +78,7 @@ protected: private: NS_IMETHOD LoadDataSource(const nsCString &aFileName, nsIRDFDataSource **aResult, - PRBool aUseProfileDirOnly = PR_FALSE); + PRBool aUseProfileDirOnly = PR_FALSE, const char *aProfilePath = nsnull); NS_IMETHOD GetProfileRoot(nsCString& aFileURL); NS_IMETHOD GetInstallRoot(nsCString& aFileURL); @@ -109,13 +109,16 @@ private: NS_IMETHOD SetProvider(const nsCString& aProvider, nsIRDFResource* aSelectionArc, const PRUnichar* aProviderName, - PRBool aAllUsers, PRBool aIsAdding); + PRBool aAllUsers, + const char *aProfilePath, + PRBool aIsAdding); NS_IMETHOD SetProviderForPackage(const nsCString& aProvider, nsIRDFResource* aPackageResource, nsIRDFResource* aProviderPackageResource, nsIRDFResource* aSelectionArc, - PRBool aAllUsers, PRBool aIsAdding); + PRBool aAllUsers, const char *aProfilePath, + PRBool aIsAdding); NS_IMETHOD SelectProviderForPackage(const nsCString& aProviderType, const PRUnichar *aProviderName,