Bug 1375680 - Port bug 1367813 to TB/SM - rename ReadUserPrefs() to ReadUserPrefsFromFile(). rs=bustage-fix
authorJorg K <jorgk@jorgk.com>
Thu, 29 Jun 2017 18:35:52 +0200
changeset 28396 2983f04886b61661fc69d2eb5262084f902e0486
parent 28395 075b79fbed50d639f6f361560ddfb5709d64a542
child 28397 72afbd97238900cf27f9bbe59d7b238c5bd7b2e0
push id1986
push userclokep@gmail.com
push dateWed, 02 Aug 2017 14:43:31 +0000
treeherdercomm-beta@b51c9adf2c9e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage-fix
bugs1375680, 1367813
Bug 1375680 - Port bug 1367813 to TB/SM - rename ReadUserPrefs() to ReadUserPrefsFromFile(). rs=bustage-fix
mail/components/migration/src/nsNetscapeProfileMigratorBase.cpp
mail/components/migration/src/nsSeamonkeyProfileMigrator.cpp
mailnews/addrbook/test/unit/test_bug534822.js
suite/profile/migration.js
suite/profile/migration/src/nsNetscapeProfileMigratorBase.cpp
suite/profile/migration/src/nsThunderbirdProfileMigrator.cpp
--- a/mail/components/migration/src/nsNetscapeProfileMigratorBase.cpp
+++ b/mail/components/migration/src/nsNetscapeProfileMigratorBase.cpp
@@ -206,17 +206,17 @@ nsNetscapeProfileMigratorBase::GetSignon
     // Find out what the signons file was called, this is stored in a pref
     // in Seamonkey.
     nsCOMPtr<nsIPrefService> psvc(do_GetService(NS_PREFSERVICE_CONTRACTID));
     psvc->ResetPrefs();
 
     nsCOMPtr<nsIFile> sourcePrefsName;
     mSourceProfile->Clone(getter_AddRefs(sourcePrefsName));
     sourcePrefsName->Append(FILE_NAME_PREFS_5X);
-    psvc->ReadUserPrefs(sourcePrefsName);
+    psvc->ReadUserPrefsFromFile(sourcePrefsName);
 
     nsCOMPtr<nsIPrefBranch> branch(do_QueryInterface(psvc));
     rv = branch->GetCharPref("signon.SignonFileName", aFileName);
   }
   else
     rv = LocateSignonsFile(aFileName);
   return rv;
 }
--- a/mail/components/migration/src/nsSeamonkeyProfileMigrator.cpp
+++ b/mail/components/migration/src/nsSeamonkeyProfileMigrator.cpp
@@ -315,17 +315,17 @@ nsSeamonkeyProfileMigrator::TransformPre
 
   // Load the source pref file
   nsCOMPtr<nsIPrefService> psvc(do_GetService(NS_PREFSERVICE_CONTRACTID));
   psvc->ResetPrefs();
 
   nsCOMPtr<nsIFile> sourcePrefsFile;
   mSourceProfile->Clone(getter_AddRefs(sourcePrefsFile));
   sourcePrefsFile->Append(aSourcePrefFileName);
-  psvc->ReadUserPrefs(sourcePrefsFile);
+  psvc->ReadUserPrefsFromFile(sourcePrefsFile);
 
   nsCOMPtr<nsIPrefBranch> branch(do_QueryInterface(psvc));
   for (transform = gTransforms; transform < end; ++transform)
     transform->prefGetterFunc(transform, branch);
 
   static const char* branchNames[] =
   {
     // Keep the three below first, or change the indexes below
--- a/mailnews/addrbook/test/unit/test_bug534822.js
+++ b/mailnews/addrbook/test/unit/test_bug534822.js
@@ -9,17 +9,17 @@ function run_test() {
   let specialPrefs = do_get_file("data/bug534822prefs.js");
 
   var profileDir = do_get_profile();
   specialPrefs.copyTo(profileDir, "");
 
   specialPrefs = profileDir;
   specialPrefs.append("bug534822prefs.js");
 
-  Services.prefs.readUserPrefs(specialPrefs);
+  Services.prefs.readUserPrefsFromFile(specialPrefs);
 
   // Now load the ABs and check we've got all of them.
   let dirs = MailServices.ab.directories;
 
   let dir;
 
   let results = [
     { name: "extension", result: false },
--- a/suite/profile/migration.js
+++ b/suite/profile/migration.js
@@ -406,13 +406,13 @@ var MigrationWizard = {
 
     // If the target prefs file doesn't exist, then we can't have a
     // homepage set in the target profile.
     if (!targetPrefsFile.exists())
       return false;
 
     Services.prefs.resetPrefs();
 
-    Services.prefs.readUserPrefs(targetPrefsFile);
+    Services.prefs.readUserPrefsFromFile(targetPrefsFile);
 
     return Services.prefs.prefHasUserValue("browser.startup.homepage");
   }
 };
--- a/suite/profile/migration/src/nsNetscapeProfileMigratorBase.cpp
+++ b/suite/profile/migration/src/nsNetscapeProfileMigratorBase.cpp
@@ -119,17 +119,17 @@ nsNetscapeProfileMigratorBase::GetSource
   nsCOMPtr<nsIPrefService> psvc(do_GetService(NS_PREFSERVICE_CONTRACTID));
   psvc->ResetPrefs();
 
   nsCOMPtr<nsIFile> sourcePrefsFile;
 
   mSourceProfile->Clone(getter_AddRefs(sourcePrefsFile));
   sourcePrefsFile->AppendNative(NS_LITERAL_CSTRING(FILE_NAME_PREFS));
 
-  psvc->ReadUserPrefs(sourcePrefsFile);
+  psvc->ReadUserPrefsFromFile(sourcePrefsFile);
 
   nsCOMPtr<nsIPrefBranch> branch(do_QueryInterface(psvc));
 
   bool hasUserValue;
   nsresult rv = branch->PrefHasUserValue("browser.startup.homepage",
                                          &hasUserValue);
 
   return NS_SUCCEEDED(rv) && hasUserValue;
@@ -140,33 +140,33 @@ nsNetscapeProfileMigratorBase::CopyHomeP
 {
   // Load the source pref file
   nsCOMPtr<nsIPrefService> psvc(do_GetService(NS_PREFSERVICE_CONTRACTID));
   psvc->ResetPrefs();
 
   nsCOMPtr<nsIFile> sourcePrefsFile;
   mSourceProfile->Clone(getter_AddRefs(sourcePrefsFile));
   sourcePrefsFile->AppendNative(nsDependentCString(FILE_NAME_PREFS));
-  psvc->ReadUserPrefs(sourcePrefsFile);
+  psvc->ReadUserPrefsFromFile(sourcePrefsFile);
 
   PBStructArray homepageBranch;
   ReadBranch("browser.startup.homepage", psvc, homepageBranch);
 
   // Now that we have all the pref data in memory, load the target pref file,
   // and write it back out
   psvc->ResetPrefs();
 
   nsCOMPtr<nsIFile> targetPrefsFile;
   mTargetProfile->Clone(getter_AddRefs(targetPrefsFile));
   targetPrefsFile->AppendNative(nsDependentCString(FILE_NAME_PREFS));
 
   // Don't use nullptr here as we're too early in the cycle for the prefs
   // service to get its default file (because the NS_GetDirectoryService items
   // aren't fully set up yet).
-  psvc->ReadUserPrefs(targetPrefsFile);
+  psvc->ReadUserPrefsFromFile(targetPrefsFile);
 
   WriteBranch("browser.startup.homepage", psvc, homepageBranch);
 
   psvc->SavePrefFile(targetPrefsFile);
 
   return NS_OK;
 }
 
--- a/suite/profile/migration/src/nsThunderbirdProfileMigrator.cpp
+++ b/suite/profile/migration/src/nsThunderbirdProfileMigrator.cpp
@@ -465,17 +465,17 @@ nsThunderbirdProfileMigrator::TransformP
 
   // Load the source pref file
   nsCOMPtr<nsIPrefService> psvc(do_GetService(NS_PREFSERVICE_CONTRACTID));
   psvc->ResetPrefs();
 
   nsCOMPtr<nsIFile> sourcePrefsFile;
   mSourceProfile->Clone(getter_AddRefs(sourcePrefsFile));
   sourcePrefsFile->AppendNative(nsDependentCString(aSourcePrefFileName));
-  psvc->ReadUserPrefs(sourcePrefsFile);
+  psvc->ReadUserPrefsFromFile(sourcePrefsFile);
 
   nsCOMPtr<nsIPrefBranch> branch(do_QueryInterface(psvc));
   for (transform = gTransforms; transform < end; ++transform)
     transform->prefGetterFunc(transform, branch);
 
   // read in the various pref branch trees for accounts, identities, servers,
   // etc.
   static const char* branchNames[] =
@@ -535,17 +535,17 @@ nsThunderbirdProfileMigrator::TransformP
 
   nsCOMPtr<nsIFile> targetPrefsFile;
   mTargetProfile->Clone(getter_AddRefs(targetPrefsFile));
   targetPrefsFile->AppendNative(nsDependentCString(aTargetPrefFileName));
 
   // Don't use nullptr here as we're too early in the cycle for the prefs
   // service to get its default file (because the NS_GetDirectoryService items
   // aren't fully set up yet).
-  psvc->ReadUserPrefs(targetPrefsFile);
+  psvc->ReadUserPrefsFromFile(targetPrefsFile);
 
   for (transform = gTransforms; transform < end; ++transform)
     transform->prefSetterFunc(transform, branch);
 
   for (i = 0; i < MOZ_ARRAY_LENGTH(branchNames); ++i)
     WriteBranch(branchNames[i], psvc, branches[i]);
 
   psvc->SavePrefFile(targetPrefsFile);