From d5c04f174efe1ed8d159434271d65d4d047a7ec7 Mon Sep 17 00:00:00 2001 From: "pete%alphanumerica.com" Date: Fri, 7 Dec 2001 23:06:51 +0000 Subject: [PATCH] b=77933, r=ccarlen, sr=jst nsIFile::CreateUnique() has unused parameter removed unused parameter /** WARNING commercial tree has one hit for this API change */ --pete git-svn-id: svn://10.0.0.236/trunk@110040 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/html/content/src/nsFormSubmitter.cpp | 2 +- mozilla/mailnews/base/src/nsMessengerMigrator.cpp | 2 +- mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp | 2 +- mozilla/netwerk/cache/src/nsDiskCacheDevice.cpp | 2 +- .../profile/pref-migrator/src/nsPrefMigration.cpp | 2 +- mozilla/profile/src/nsProfile.cpp | 12 +++--------- .../exthandler/nsExternalHelperAppService.cpp | 2 +- mozilla/xpcom/io/nsIFile.idl | 2 +- mozilla/xpcom/io/nsLocalFileCommon.cpp | 2 +- mozilla/xpcom/tests/nsIFileTest.cpp | 2 +- 10 files changed, 12 insertions(+), 18 deletions(-) diff --git a/mozilla/content/html/content/src/nsFormSubmitter.cpp b/mozilla/content/html/content/src/nsFormSubmitter.cpp index c6913e20ec2..6cd22e46dba 100644 --- a/mozilla/content/html/content/src/nsFormSubmitter.cpp +++ b/mozilla/content/html/content/src/nsFormSubmitter.cpp @@ -627,7 +627,7 @@ nsFormSubmitter::ProcessAsMultipart(nsIForm* form, if (tempDir) { tempDir->Append("formpost"); // mode is 0600 so that it's not world-readable - rv = tempDir->CreateUnique(nsnull, nsIFile::NORMAL_FILE_TYPE, 0600); + rv = tempDir->CreateUnique(nsIFile::NORMAL_FILE_TYPE, 0600); } nsCOMPtr outStream; if (NS_SUCCEEDED(rv)) { diff --git a/mozilla/mailnews/base/src/nsMessengerMigrator.cpp b/mozilla/mailnews/base/src/nsMessengerMigrator.cpp index 537dc7f3d72..1f617e071a7 100644 --- a/mozilla/mailnews/base/src/nsMessengerMigrator.cpp +++ b/mozilla/mailnews/base/src/nsMessengerMigrator.cpp @@ -1909,7 +1909,7 @@ nsMessengerMigrator::migrateAddressBookPrefEnum(const char *aPref, void *aClosur rv = tmpLDIFFile->Append("addr-migrate"); if (NS_FAILED(rv) || !tmpLDIFFile) return; - rv = tmpLDIFFile->CreateUnique("addr-migrate", nsIFile::DIRECTORY_TYPE, 0700); + rv = tmpLDIFFile->CreateUnique(nsIFile::DIRECTORY_TYPE, 0700); if (NS_FAILED(rv) || !tmpLDIFFile) return; // TODO: Change users of nsIFileSpec to nsIFile and avoid this. diff --git a/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp b/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp index 71dfc622122..f7551127cb3 100644 --- a/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp +++ b/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp @@ -1832,7 +1832,7 @@ nsPluginStreamListenerPeer::SetupPluginCacheFile(nsIChannel* channel) if (NS_FAILED(rv)) return rv; // Yes, make it unique. - rv = pluginTmp->CreateUnique(nsnull,nsIFile::NORMAL_FILE_TYPE, 0777); + rv = pluginTmp->CreateUnique(nsIFile::NORMAL_FILE_TYPE, 0777); if (NS_FAILED(rv)) return rv; // save the file path off. diff --git a/mozilla/netwerk/cache/src/nsDiskCacheDevice.cpp b/mozilla/netwerk/cache/src/nsDiskCacheDevice.cpp index 9beda39005d..7cff1baf85b 100644 --- a/mozilla/netwerk/cache/src/nsDiskCacheDevice.cpp +++ b/mozilla/netwerk/cache/src/nsDiskCacheDevice.cpp @@ -759,7 +759,7 @@ nsDiskCacheDevice::InitializeCacheDirectory() // create a directory with unique name to contain existing cache directory rv = cacheTrashDir->Append("Cache"); if (NS_FAILED(rv)) return rv; - rv = cacheTrashDir->CreateUnique(nsnull,nsIFile::DIRECTORY_TYPE, 0777); + rv = cacheTrashDir->CreateUnique(nsIFile::DIRECTORY_TYPE, 0777); if (NS_FAILED(rv)) return rv; // move existing cache directory into profileDir/Cache.Trash/CacheUnique diff --git a/mozilla/profile/pref-migrator/src/nsPrefMigration.cpp b/mozilla/profile/pref-migrator/src/nsPrefMigration.cpp index 318d115d40d..c987d15e9b9 100644 --- a/mozilla/profile/pref-migrator/src/nsPrefMigration.cpp +++ b/mozilla/profile/pref-migrator/src/nsPrefMigration.cpp @@ -638,7 +638,7 @@ nsPrefMigration::ProcessPrefsCallback(const char* oldProfilePathStr, const char if (NS_FAILED(rv)) return rv; //Create a unique directory in the system temp dir based on the name of the 4.x prefs file - rv = systemTempIFileDir->CreateUnique(nsnull, nsIFile::DIRECTORY_TYPE, 0700); + rv = systemTempIFileDir->CreateUnique(nsIFile::DIRECTORY_TYPE, 0700); if (NS_FAILED(rv)) return rv; rv = PrefsFile4xAsIFile->CopyTo(systemTempIFileDir, PREF_FILE_NAME_IN_4x); diff --git a/mozilla/profile/src/nsProfile.cpp b/mozilla/profile/src/nsProfile.cpp index d3cbf31c22c..7efb991c418 100644 --- a/mozilla/profile/src/nsProfile.cpp +++ b/mozilla/profile/src/nsProfile.cpp @@ -1504,9 +1504,7 @@ nsProfile::CreateNewProfileWithLocales(const PRUnichar* profileName, // Make profile directory unique only when the user // decides to not use an already existing profile directory if (!useExistingDir) { - nsXPIDLCString suggestedName; - profileDir->GetLeafName(getter_Copies(suggestedName)); - rv = profileDir->CreateUnique(suggestedName, nsIFile::DIRECTORY_TYPE, 0775); + rv = profileDir->CreateUnique(nsIFile::DIRECTORY_TYPE, 0775); if (NS_FAILED(rv)) return rv; } @@ -2060,10 +2058,7 @@ nsProfile::MigrateProfile(const PRUnichar* profileName, PRBool showProgressAsMod if (NS_FAILED(rv)) return rv; // This is unfortunate: There is no CreateUniqueUnicode - nsXPIDLCString suggestedName; - rv = newProfDir->GetLeafName(getter_Copies(suggestedName)); - if (NS_FAILED(rv)) return rv; - rv = newProfDir->CreateUnique(suggestedName, nsIFile::DIRECTORY_TYPE, 0775); + rv = newProfDir->CreateUnique(nsIFile::DIRECTORY_TYPE, 0775); if (NS_FAILED(rv)) return rv; // always create level indirection when migrating @@ -2260,8 +2255,7 @@ NS_IMETHODIMP nsProfile::CloneProfile(const PRUnichar* newProfile) destDir->AppendRelativeUnicodePath(newProfile); // Find a unique name in the dest dir - nsCAutoString suggestedName; suggestedName.AssignWithConversion(newProfile); - rv = destDir->CreateUnique(suggestedName.get(), nsIFile::DIRECTORY_TYPE, 0775); + rv = destDir->CreateUnique(nsIFile::DIRECTORY_TYPE, 0775); if (NS_FAILED(rv)) return rv; rv = RecursiveCopy(currProfileDir, destDir); diff --git a/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp b/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp index 8dfe32714bc..dc16ce21178 100644 --- a/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp +++ b/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp @@ -915,7 +915,7 @@ nsresult nsExternalAppHandler::SetUpTempFile(nsIChannel * aChannel) saltedTempLeafName.Append(mTempFileExtension); mTempFile->Append(saltedTempLeafName.get()); // make this file unique!!! - mTempFile->CreateUnique(nsnull, nsIFile::NORMAL_FILE_TYPE, 0644); + mTempFile->CreateUnique(nsIFile::NORMAL_FILE_TYPE, 0644); NS_DEFINE_CID(kFileTransportServiceCID, NS_FILETRANSPORTSERVICE_CID); nsCOMPtr fts = diff --git a/mozilla/xpcom/io/nsIFile.idl b/mozilla/xpcom/io/nsIFile.idl index 79d72805670..b314b52b5f2 100644 --- a/mozilla/xpcom/io/nsIFile.idl +++ b/mozilla/xpcom/io/nsIFile.idl @@ -256,7 +256,7 @@ interface nsIFile : nsISupports * be ignored on systems that do not need to do * permissions. */ - void createUnique(in string suggestedName, in unsigned long type, in unsigned long permissions); + void createUnique(in unsigned long type, in unsigned long permissions); /** diff --git a/mozilla/xpcom/io/nsLocalFileCommon.cpp b/mozilla/xpcom/io/nsLocalFileCommon.cpp index c26f4bc1693..607bd87044a 100644 --- a/mozilla/xpcom/io/nsLocalFileCommon.cpp +++ b/mozilla/xpcom/io/nsLocalFileCommon.cpp @@ -73,7 +73,7 @@ void NS_ShutdownLocalFile() #define kMaxFilenameLength 31 NS_IMETHODIMP -nsLocalFile::CreateUnique(const char* suggestedName, PRUint32 type, PRUint32 attributes) +nsLocalFile::CreateUnique(PRUint32 type, PRUint32 attributes) { nsresult rv = Create(type, attributes); diff --git a/mozilla/xpcom/tests/nsIFileTest.cpp b/mozilla/xpcom/tests/nsIFileTest.cpp index a266c05173a..6e9f49176da 100644 --- a/mozilla/xpcom/tests/nsIFileTest.cpp +++ b/mozilla/xpcom/tests/nsIFileTest.cpp @@ -209,7 +209,7 @@ void CreateUniqueTest(const char* creationPath, const char* appendPath, printf("no.\n"); - rv = file->CreateUnique(appendPath, whatToCreate, perm); + rv = file->CreateUnique(whatToCreate, perm); VerifyResult(rv); rv = file->Exists(&exists);