Bug 997141 - Remove the recur parameter from nsIFile::Contains(). r=bsmedberg

This commit is contained in:
Igor Kolupaev 2014-05-07 23:03:41 +03:00
parent 118c8420d0
commit a6147122b8
7 changed files with 13 additions and 13 deletions

View File

@ -1633,7 +1633,7 @@ GetPluginIsFromExtension(const nsCOMPtr<nsIFile>& pluginFile,
{
for (uint32_t i = 0; i < extensionDirs.Length(); ++i) {
bool contains;
if (NS_FAILED(extensionDirs[i]->Contains(pluginFile, true, &contains)) || !contains) {
if (NS_FAILED(extensionDirs[i]->Contains(pluginFile, &contains)) || !contains) {
continue;
}

View File

@ -2021,14 +2021,14 @@ NS_RelaxStrictFileOriginPolicy(nsIURI *aTargetURI,
bool allowed = false;
nsresult rv = sourceFile->IsDirectory(&sourceIsDir);
if (NS_SUCCEEDED(rv) && sourceIsDir) {
rv = sourceFile->Contains(targetFile, true, &allowed);
rv = sourceFile->Contains(targetFile, &allowed);
} else {
nsCOMPtr<nsIFile> sourceParent;
rv = sourceFile->GetParent(getter_AddRefs(sourceParent));
if (NS_SUCCEEDED(rv) && sourceParent) {
rv = sourceParent->Equals(targetFile, &allowed);
if (NS_FAILED(rv) || !allowed) {
rv = sourceParent->Contains(targetFile, true, &allowed);
rv = sourceParent->Contains(targetFile, &allowed);
} else {
MOZ_ASSERT(aAllowDirectoryTarget,
"sourceFile->Parent == targetFile, but targetFile "

View File

@ -435,9 +435,9 @@ RemoteOpenFileChild::Equals(nsIFile *inFile, bool *_retval)
}
NS_IMETHODIMP
RemoteOpenFileChild::Contains(nsIFile *inFile, bool recur, bool *_retval)
RemoteOpenFileChild::Contains(nsIFile *inFile, bool *_retval)
{
return mFile->Contains(inFile, recur, _retval);
return mFile->Contains(inFile, _retval);
}
NS_IMETHODIMP

View File

@ -745,7 +745,7 @@ nsToolkitProfileService::CreateProfileInternal(nsIFile* aRootDir,
nsCOMPtr<nsIFile> localDir;
bool isRelative;
rv = mAppData->Contains(rootDir, true, &isRelative);
rv = mAppData->Contains(rootDir, &isRelative);
if (NS_SUCCEEDED(rv) && isRelative) {
nsAutoCString path;
rv = rootDir->GetRelativeDescriptor(mAppData, path);
@ -912,7 +912,7 @@ nsToolkitProfileService::Flush()
while (cur) {
// if the profile dir is relative to appdir...
bool isRelative;
rv = mAppData->Contains(cur->mRootDir, true, &isRelative);
rv = mAppData->Contains(cur->mRootDir, &isRelative);
if (NS_SUCCEEDED(rv) && isRelative) {
// we use a relative descriptor
rv = cur->mRootDir->GetRelativeDescriptor(mAppData, path);

View File

@ -42,7 +42,7 @@ interface nsISimpleEnumerator;
* be safely passed to javascript via xpconnect. Therefore, the "native
* methods" are not scriptable.
*/
[scriptable, uuid(a99a6a06-f90d-4659-8fce-c2f87feb1167), builtinclass]
[scriptable, uuid(dfb5a307-7ecf-41dd-aee2-f1d623459c44), builtinclass]
interface nsIFile : nsISupports
{
/**
@ -311,10 +311,10 @@ interface nsIFile : nsISupports
boolean equals(in nsIFile inFile);
/**
* Will determine if inFile is a descendant of this file
* If |recur| is true, look in subdirectories too
* Will determine if inFile is a descendant of this file.
* This routine looks in subdirectories too.
*/
boolean contains(in nsIFile inFile, in boolean recur);
boolean contains(in nsIFile inFile);
/**
* Parent will be null when this is at the top of the volume.

View File

@ -1597,7 +1597,7 @@ nsLocalFile::Equals(nsIFile *inFile, bool *_retval)
}
NS_IMETHODIMP
nsLocalFile::Contains(nsIFile *inFile, bool recur, bool *_retval)
nsLocalFile::Contains(nsIFile *inFile, bool *_retval)
{
CHECK_mPath();
if (NS_WARN_IF(!inFile))

View File

@ -3024,7 +3024,7 @@ nsLocalFile::Equals(nsIFile *inFile, bool *_retval)
NS_IMETHODIMP
nsLocalFile::Contains(nsIFile *inFile, bool recur, bool *_retval)
nsLocalFile::Contains(nsIFile *inFile, bool *_retval)
{
// Check we are correctly initialized.
CHECK_mWorkingPath();