mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
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
This commit is contained in:
parent
a7a30140b7
commit
efee7eec18
@ -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<nsIOutputStream> outStream;
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
2
netwerk/cache/src/nsDiskCacheDevice.cpp
vendored
2
netwerk/cache/src/nsDiskCacheDevice.cpp
vendored
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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<nsIFileTransportService> fts =
|
||||
|
@ -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);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user