summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2022-04-09 16:53:35 -0500
committerMatt A. Tobin <email@mattatobin.com>2022-04-09 16:53:35 -0500
commit853befa9d5604186c6c452afe07a37d372700e26 (patch)
tree29493ecd6a4dd21ff966c29f4fc20a396ef9d715 /system
parent645c946aa77a55b259bd98de78a6a9d9c342ed94 (diff)
downloadaura-central-853befa9d5604186c6c452afe07a37d372700e26.tar.gz
Revert "Issue %3057 - Part 9: Adjust all callsites for no longer using GetNativePath"
This reverts commit 097fa969802f76530384926e8ef1f56777be3783.
Diffstat (limited to 'system')
-rw-r--r--system/interface/nsDeviceContextSpecProxy.cpp4
-rw-r--r--system/interface/windows/WinTaskbar.cpp3
-rw-r--r--system/interface/windows/nsDataObj.cpp2
-rw-r--r--system/network/base/nsDirectoryIndexStream.cpp8
-rw-r--r--system/network/base/nsStandardURL.cpp3
-rw-r--r--system/network/cache/nsCache.cpp8
-rw-r--r--system/network/cache/nsCacheService.cpp10
-rw-r--r--system/network/cache/nsDiskCacheDeviceSQL.cpp2
-rw-r--r--system/network/cache2/CacheFileContextEvictor.cpp8
-rw-r--r--system/network/cache2/CacheFileIOManager.cpp8
-rw-r--r--system/network/exthandler/nsMIMEInfoImpl.cpp8
-rw-r--r--system/network/test/TestFileInput2.cpp4
-rw-r--r--system/runtime/nsUpdateDriver.cpp6
-rw-r--r--system/security/manager/ssl/CertBlocklist.cpp4
14 files changed, 17 insertions, 61 deletions
diff --git a/system/interface/nsDeviceContextSpecProxy.cpp b/system/interface/nsDeviceContextSpecProxy.cpp
index 7ff3c6e97..df0927237 100644
--- a/system/interface/nsDeviceContextSpecProxy.cpp
+++ b/system/interface/nsDeviceContextSpecProxy.cpp
@@ -169,11 +169,7 @@ nsDeviceContextSpecProxy::CreateUniqueTempPath(nsACString& aFilePath)
return rv;
}
-#ifdef XP_WIN
- return recordingFile->GetPersistentDescriptor(aFilePath);
-#else
return recordingFile->GetNativePath(aFilePath);
-#endif
}
NS_IMETHODIMP
diff --git a/system/interface/windows/WinTaskbar.cpp b/system/interface/windows/WinTaskbar.cpp
index 3c00fae7a..530cfd5b9 100644
--- a/system/interface/windows/WinTaskbar.cpp
+++ b/system/interface/windows/WinTaskbar.cpp
@@ -1,3 +1,4 @@
+/* vim: se cin sw=2 ts=2 et : */
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
@@ -245,7 +246,7 @@ WinTaskbar::GetAppUserModelID(nsAString & aDefaultGroupId) {
bool exists = false;
if (profileDir && NS_SUCCEEDED(profileDir->Exists(&exists)) && exists) {
nsAutoCString path;
- if (NS_SUCCEEDED(profileDir->GetPersistentDescriptor(path))) {
+ if (NS_SUCCEEDED(profileDir->GetNativePath(path))) {
nsAutoString id;
id.AppendInt(HashString(path));
if (!id.IsEmpty()) {
diff --git a/system/interface/windows/nsDataObj.cpp b/system/interface/windows/nsDataObj.cpp
index 81dcb8f16..39b269d0d 100644
--- a/system/interface/windows/nsDataObj.cpp
+++ b/system/interface/windows/nsDataObj.cpp
@@ -1294,7 +1294,7 @@ nsDataObj :: GetFileContentsInternetShortcut ( FORMATETC& aFE, STGMEDIUM& aSTG )
rv = mozilla::widget::FaviconHelper::GetOutputIconPath(aUri, icoFile, true);
NS_ENSURE_SUCCESS(rv, E_FAIL);
- rv = icoFile->GetPersistentDescriptor(path);
+ rv = icoFile->GetNativePath(path);
NS_ENSURE_SUCCESS(rv, E_FAIL);
shortcutFormatStr = "[InternetShortcut]\r\nURL=%s\r\n"
diff --git a/system/network/base/nsDirectoryIndexStream.cpp b/system/network/base/nsDirectoryIndexStream.cpp
index 7b51a952d..87a57fd57 100644
--- a/system/network/base/nsDirectoryIndexStream.cpp
+++ b/system/network/base/nsDirectoryIndexStream.cpp
@@ -1,13 +1,17 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* vim:set sw=4 sts=4 et cin: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
/*
+
The converts a filesystem directory into an "HTTP index" stream per
Lou Montulli's original spec:
http://www.mozilla.org/projects/netlib/dirindexformat.html
+
*/
#include "nsEscape.h"
@@ -88,7 +92,7 @@ nsDirectoryIndexStream::Init(nsIFile* aDir)
if (MOZ_LOG_TEST(gLog, LogLevel::Debug)) {
nsAutoCString path;
- aDir->GetPersistentDescriptor(path);
+ aDir->GetNativePath(path);
MOZ_LOG(gLog, LogLevel::Debug,
("nsDirectoryIndexStream[%p]: initialized on %s",
this, path.get()));
@@ -235,7 +239,7 @@ nsDirectoryIndexStream::Read(char* aBuf, uint32_t aCount, uint32_t* aReadCount)
if (MOZ_LOG_TEST(gLog, LogLevel::Debug)) {
nsAutoCString path;
- current->GetPersistentDescriptor(path);
+ current->GetNativePath(path);
MOZ_LOG(gLog, LogLevel::Debug,
("nsDirectoryIndexStream[%p]: iterated %s",
this, path.get()));
diff --git a/system/network/base/nsStandardURL.cpp b/system/network/base/nsStandardURL.cpp
index 083a5178b..57337e480 100644
--- a/system/network/base/nsStandardURL.cpp
+++ b/system/network/base/nsStandardURL.cpp
@@ -1,4 +1,5 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* vim:set ts=4 sw=4 sts=4 et cindent: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -3158,7 +3159,7 @@ nsStandardURL::GetFile(nsIFile **result)
if (LOG_ENABLED()) {
nsAutoCString path;
- mFile->GetPersistentDescriptor(path);
+ mFile->GetNativePath(path);
LOG(("nsStandardURL::GetFile [this=%p spec=%s resulting_path=%s]\n",
this, mSpec.get(), path.get()));
}
diff --git a/system/network/cache/nsCache.cpp b/system/network/cache/nsCache.cpp
index b3ecfeae2..7f5d6a071 100644
--- a/system/network/cache/nsCache.cpp
+++ b/system/network/cache/nsCache.cpp
@@ -20,19 +20,11 @@ void
CacheLogPrintPath(mozilla::LogLevel level, const char * format, nsIFile * item)
{
nsAutoCString path;
-#ifdef XP_WIN
- nsresult rv = item->GetPersistentDescriptor(path);
-#else
nsresult rv = item->GetNativePath(path);
-#endif
if (NS_SUCCEEDED(rv)) {
MOZ_LOG(gCacheLog, level, (format, path.get()));
} else {
-#ifdef XP_WIN
- MOZ_LOG(gCacheLog, level, ("GetPersistentDescriptor failed: %x", rv));
-#else
MOZ_LOG(gCacheLog, level, ("GetNativePath failed: %x", rv));
-#endif
}
}
diff --git a/system/network/cache/nsCacheService.cpp b/system/network/cache/nsCacheService.cpp
index 50bf1095e..6c8e5f5b8 100644
--- a/system/network/cache/nsCacheService.cpp
+++ b/system/network/cache/nsCacheService.cpp
@@ -1739,7 +1739,7 @@ nsCacheService::CreateCustomOfflineDevice(nsIFile *aProfileDir,
if (MOZ_LOG_TEST(gCacheLog, LogLevel::Info)) {
nsAutoCString profilePath;
- aProfileDir->GetPersistentDescriptor(profilePath);
+ aProfileDir->GetNativePath(profilePath);
CACHE_LOG_INFO(("Creating custom offline device, %s, %d",
profilePath.BeginReading(), aQuota));
}
@@ -3093,11 +3093,7 @@ nsCacheService::MoveOrRemoveDiskCache(nsIFile *aOldCacheDir,
return;
nsAutoCString newPath;
-#ifdef XP_WIN
- rv = aNewCacheSubdir->GetPersistentDescriptor(newPath);
-#else
rv = aNewCacheSubdir->GetNativePath(newPath);
-#endif
if (NS_FAILED(rv))
return;
@@ -3109,11 +3105,7 @@ nsCacheService::MoveOrRemoveDiskCache(nsIFile *aOldCacheDir,
rv = aNewCacheDir->Create(nsIFile::DIRECTORY_TYPE, 0777);
if (NS_SUCCEEDED(rv) || NS_ERROR_FILE_ALREADY_EXISTS == rv) {
nsAutoCString oldPath;
-#ifdef XP_WIN
- rv = aOldCacheSubdir->GetPersistentDescriptor(oldPath);
-#else
rv = aOldCacheSubdir->GetNativePath(oldPath);
-#endif
if (NS_FAILED(rv))
return;
if (rename(oldPath.get(), newPath.get()) == 0)
diff --git a/system/network/cache/nsDiskCacheDeviceSQL.cpp b/system/network/cache/nsDiskCacheDeviceSQL.cpp
index caacf92a2..297c0f362 100644
--- a/system/network/cache/nsDiskCacheDeviceSQL.cpp
+++ b/system/network/cache/nsDiskCacheDeviceSQL.cpp
@@ -287,7 +287,7 @@ nsOfflineCacheEvictionFunction::Apply()
for (int32_t i = 0; i < items.Count(); i++) {
if (MOZ_LOG_TEST(gCacheLog, LogLevel::Debug)) {
nsAutoCString path;
- items[i]->GetPersistentDescriptor(path);
+ items[i]->GetNativePath(path);
LOG((" removing %s\n", path.get()));
}
diff --git a/system/network/cache2/CacheFileContextEvictor.cpp b/system/network/cache2/CacheFileContextEvictor.cpp
index fd4e97550..65feb4462 100644
--- a/system/network/cache2/CacheFileContextEvictor.cpp
+++ b/system/network/cache2/CacheFileContextEvictor.cpp
@@ -269,11 +269,7 @@ CacheFileContextEvictor::PersistEvictionInfoToDisk(
}
nsAutoCString path;
-#ifdef XP_WIN
- file->GetPersistentDescriptor(path);
-#else
file->GetNativePath(path);
-#endif
PRFileDesc *fd;
rv = file->OpenNSPRFileDesc(PR_RDWR | PR_CREATE_FILE | PR_TRUNCATE, 0600,
@@ -310,11 +306,7 @@ CacheFileContextEvictor::RemoveEvictInfoFromDisk(
}
nsAutoCString path;
-#ifdef XP_WIN
- file->GetPersistentDescriptor(path);
-#else
file->GetNativePath(path);
-#endif
rv = file->Remove(false);
if (NS_WARN_IF(NS_FAILED(rv))) {
diff --git a/system/network/cache2/CacheFileIOManager.cpp b/system/network/cache2/CacheFileIOManager.cpp
index 627d06ffa..845ad7314 100644
--- a/system/network/cache2/CacheFileIOManager.cpp
+++ b/system/network/cache2/CacheFileIOManager.cpp
@@ -3096,11 +3096,7 @@ nsresult
CacheFileIOManager::TrashDirectory(nsIFile *aFile)
{
nsAutoCString path;
-#ifdef XP_WIN
- aFile->GetPersistentDescriptor(path);
-#else
aFile->GetNativePath(path);
-#endif
LOG(("CacheFileIOManager::TrashDirectory() [file=%s]", path.get()));
nsresult rv;
@@ -3344,7 +3340,7 @@ CacheFileIOManager::RemoveTrashInternal()
"recursively, but this can block IO thread for a while!");
if (LOG_ENABLED()) {
nsAutoCString path;
- file->GetPersistentDescriptor(path);
+ file->GetNativePath(path);
LOG(("CacheFileIOManager::RemoveTrashInternal() - Found a directory in a trash "
"directory! It will be removed recursively, but this can block IO "
"thread for a while! [file=%s]", path.get()));
@@ -3877,7 +3873,7 @@ CacheFileIOManager::SyncRemoveDir(nsIFile *aFile, const char *aDir)
if (LOG_ENABLED()) {
nsAutoCString path;
- file->GetPersistentDescriptor(path);
+ file->GetNativePath(path);
LOG(("CacheFileIOManager::SyncRemoveDir() - Removing directory %s",
path.get()));
}
diff --git a/system/network/exthandler/nsMIMEInfoImpl.cpp b/system/network/exthandler/nsMIMEInfoImpl.cpp
index ca2372274..59886e465 100644
--- a/system/network/exthandler/nsMIMEInfoImpl.cpp
+++ b/system/network/exthandler/nsMIMEInfoImpl.cpp
@@ -305,11 +305,7 @@ nsMIMEInfoBase::LaunchWithFile(nsIFile* aFile)
NS_ENSURE_SUCCESS(rv, rv);
nsAutoCString path;
-#ifdef XP_WIN
- aFile->GetPersistentDescriptor(path);
-#else
aFile->GetNativePath(path);
-#endif
return LaunchWithIProcess(executable, path);
}
@@ -427,11 +423,7 @@ nsMIMEInfoImpl::LaunchDefaultWithFile(nsIFile* aFile)
return NS_ERROR_FILE_NOT_FOUND;
nsAutoCString nativePath;
-#ifdef XP_WIN
- aFile->GetPersistentDescriptor(nativePath);
-#else
aFile->GetNativePath(nativePath);
-#endif
return LaunchWithIProcess(mDefaultApplication, nativePath);
}
diff --git a/system/network/test/TestFileInput2.cpp b/system/network/test/TestFileInput2.cpp
index c75d7677c..f51988010 100644
--- a/system/network/test/TestFileInput2.cpp
+++ b/system/network/test/TestFileInput2.cpp
@@ -323,8 +323,8 @@ Test(CreateFun create, uint32_t count,
nsAutoCString inDir;
nsAutoCString outDir;
- (void)inDirSpec->GetPersistentDescriptor(inDir);
- (void)outDirSpec->GetPersistentDescriptor(outDir);
+ (void)inDirSpec->GetNativePath(inDir);
+ (void)outDirSpec->GetNativePath(outDir);
printf("###########\nTest: from %s to %s, bufSize = %d\n",
inDir.get(), outDir.get(), bufSize);
gTimeSampler.Reset();
diff --git a/system/runtime/nsUpdateDriver.cpp b/system/runtime/nsUpdateDriver.cpp
index dadae7ba1..812818788 100644
--- a/system/runtime/nsUpdateDriver.cpp
+++ b/system/runtime/nsUpdateDriver.cpp
@@ -958,13 +958,7 @@ nsUpdateProcessor::ProcessUpdate(nsIUpdate* aUpdate)
rv = ds->Get(XRE_EXECUTABLE_FILE, NS_GET_IID(nsIFile),
getter_AddRefs(binary));
NS_ASSERTION(NS_SUCCEEDED(rv), "Can't get the binary path");
-#ifdef XP_WIN
- nsAutoString binPathW;
- binary->GetPath(binPathW);
- NS_ConvertUTF16toUTF8 binPath(binPathW);
-#else
binary->GetNativePath(binPath);
-#endif
}
// Copy the parameters to the StagedUpdateInfo structure shared with the
diff --git a/system/security/manager/ssl/CertBlocklist.cpp b/system/security/manager/ssl/CertBlocklist.cpp
index 43b99b359..8701032ed 100644
--- a/system/security/manager/ssl/CertBlocklist.cpp
+++ b/system/security/manager/ssl/CertBlocklist.cpp
@@ -193,11 +193,7 @@ CertBlocklist::Init()
return rv;
}
nsAutoCString path;
-#ifdef XP_WIN
- rv = mBackingFile->GetPersistentDescriptor(path);
-#else
rv = mBackingFile->GetNativePath(path);
-#endif
if (NS_FAILED(rv)) {
return rv;
}