Bug 1386916 - Port 1326520 to mailnews: Rename GetPath/SetPath to GetPathQueryRef/SetpathQueryRef. r=jorgk

This commit is contained in:
Edmund Wong 2017-08-02 21:39:00 +02:00
Родитель 430f6d8fdc
Коммит 6b13bb1bb9
16 изменённых файлов: 46 добавлений и 46 удалений

Просмотреть файл

@ -304,15 +304,15 @@ nsLDAPURL::SetPort(int32_t aPort)
return mBaseURL->SetPort(aPort);
}
NS_IMETHODIMP nsLDAPURL::GetPath(nsACString &_retval)
NS_IMETHODIMP nsLDAPURL::GetPathQueryRef(nsACString &_retval)
{
if (!mBaseURL)
return NS_ERROR_NOT_INITIALIZED;
return mBaseURL->GetPath(_retval);
return mBaseURL->GetPathQueryRef(_retval);
}
NS_IMETHODIMP nsLDAPURL::SetPath(const nsACString &aPath)
NS_IMETHODIMP nsLDAPURL::SetPathQueryRef(const nsACString &aPath)
{
if (!mBaseURL)
return NS_ERROR_NOT_INITIALIZED;
@ -320,7 +320,7 @@ NS_IMETHODIMP nsLDAPURL::SetPath(const nsACString &aPath)
nsresult rv = SetPathInternal(PromiseFlatCString(aPath));
NS_ENSURE_SUCCESS(rv, rv);
return mBaseURL->SetPath(aPath);
return mBaseURL->SetPathQueryRef(aPath);
}
NS_IMETHODIMP nsLDAPURL::GetAsciiSpec(nsACString &_retval)
@ -477,7 +477,7 @@ NS_IMETHODIMP nsLDAPURL::SetDn(const nsACString& aDn)
GetPathInternal(newPath);
// and update the base url
return mBaseURL->SetPath(newPath);
return mBaseURL->SetPathQueryRef(newPath);
}
NS_IMETHODIMP nsLDAPURL::GetAttributes(nsACString &aAttributes)
@ -523,7 +523,7 @@ NS_IMETHODIMP nsLDAPURL::SetAttributes(const nsACString &aAttributes)
GetPathInternal(newPath);
// and update the base url
return mBaseURL->SetPath(newPath);
return mBaseURL->SetPathQueryRef(newPath);
}
nsresult nsLDAPURL::SetAttributeArray(char** aAttributes)
@ -578,7 +578,7 @@ NS_IMETHODIMP nsLDAPURL::AddAttribute(const nsACString &aAttribute)
GetPathInternal(newPath);
// and update the base url
return mBaseURL->SetPath(newPath);
return mBaseURL->SetPathQueryRef(newPath);
}
NS_IMETHODIMP nsLDAPURL::RemoveAttribute(const nsACString &aAttribute)
@ -609,7 +609,7 @@ NS_IMETHODIMP nsLDAPURL::RemoveAttribute(const nsACString &aAttribute)
GetPathInternal(newPath);
// and update the base url
return mBaseURL->SetPath(newPath);
return mBaseURL->SetPathQueryRef(newPath);
}
NS_IMETHODIMP nsLDAPURL::HasAttribute(const nsACString &aAttribute,
@ -649,7 +649,7 @@ NS_IMETHODIMP nsLDAPURL::SetScope(int32_t aScope)
GetPathInternal(newPath);
// and update the base url
return mBaseURL->SetPath(newPath);
return mBaseURL->SetPathQueryRef(newPath);
}
NS_IMETHODIMP nsLDAPURL::GetFilter(nsACString& _retval)
@ -672,7 +672,7 @@ NS_IMETHODIMP nsLDAPURL::SetFilter(const nsACString& aFilter)
GetPathInternal(newPath);
// and update the base url
return mBaseURL->SetPath(newPath);
return mBaseURL->SetPathQueryRef(newPath);
}
NS_IMETHODIMP nsLDAPURL::GetOptions(uint32_t *_retval)

Просмотреть файл

@ -54,7 +54,7 @@ nsAbContentHandler::HandleContent(const char *aContentType,
if (uri)
{
nsAutoCString path;
rv = uri->GetPath(path);
rv = uri->GetPathQueryRef(path);
NS_ENSURE_SUCCESS(rv,rv);
const char *startOfVCard = strstr(path.get(), "add?vcard=");

Просмотреть файл

@ -214,7 +214,7 @@ nsAddbookProtocolHandler::GeneratePrintOutput(nsIAddbookUrl *addbookUrl,
NS_ENSURE_ARG_POINTER(addbookUrl);
nsAutoCString uri;
nsresult rv = addbookUrl->GetPath(uri);
nsresult rv = addbookUrl->GetPathQueryRef(uri);
NS_ENSURE_SUCCESS(rv,rv);
/* turn

Просмотреть файл

@ -39,7 +39,7 @@ nsresult nsAddbookUrl::ParseUrl()
{
nsAutoCString pathStr;
nsresult rv = m_baseURL->GetPath(pathStr);
nsresult rv = m_baseURL->GetPathQueryRef(pathStr);
NS_ENSURE_SUCCESS(rv,rv);
if (strstr(pathStr.get(), "?action=print"))
@ -141,14 +141,14 @@ NS_IMETHODIMP nsAddbookUrl::SetPort(int32_t aPort)
return m_baseURL->SetPort(aPort);
}
NS_IMETHODIMP nsAddbookUrl::GetPath(nsACString &aPath)
NS_IMETHODIMP nsAddbookUrl::GetPathQueryRef(nsACString &aPath)
{
return m_baseURL->GetPath(aPath);
return m_baseURL->GetPathQueryRef(aPath);
}
NS_IMETHODIMP nsAddbookUrl::SetPath(const nsACString &aPath)
NS_IMETHODIMP nsAddbookUrl::SetPathQueryRef(const nsACString &aPath)
{
m_baseURL->SetPath(aPath);
m_baseURL->SetPathQueryRef(aPath);
return ParseUrl();
}

Просмотреть файл

@ -3134,7 +3134,7 @@ nsMsgDBFolder::parseURI(bool needServer)
if (!mIsServerIsValid)
{
nsAutoCString path;
rv = url->GetPath(path);
rv = url->GetPathQueryRef(path);
if (NS_SUCCEEDED(rv))
mIsServer = path.EqualsLiteral("/");
mIsServerIsValid = true;

Просмотреть файл

@ -520,14 +520,14 @@ NS_IMETHODIMP nsMsgMailNewsUrl::SetPort(int32_t aPort)
return m_baseURL->SetPort(aPort);
}
NS_IMETHODIMP nsMsgMailNewsUrl::GetPath(nsACString &aPath)
NS_IMETHODIMP nsMsgMailNewsUrl::GetPathQueryRef(nsACString &aPath)
{
return m_baseURL->GetPath(aPath);
return m_baseURL->GetPathQueryRef(aPath);
}
NS_IMETHODIMP nsMsgMailNewsUrl::SetPath(const nsACString &aPath)
NS_IMETHODIMP nsMsgMailNewsUrl::SetPathQueryRef(const nsACString &aPath)
{
return m_baseURL->SetPath(aPath);
return m_baseURL->SetPathQueryRef(aPath);
}
NS_IMETHODIMP nsMsgMailNewsUrl::GetAsciiHost(nsACString &aHostA)

Просмотреть файл

@ -175,7 +175,7 @@ nsresult nsMsgProtocol::GetFileFromURL(nsIURI * aURL, nsIFile **aResult)
NS_ENSURE_ARG_POINTER(aResult);
// extract the file path from the uri...
nsAutoCString urlSpec;
aURL->GetPath(urlSpec);
aURL->GetPathQueryRef(urlSpec);
urlSpec.Insert(NS_LITERAL_CSTRING("file://"), 0);
nsresult rv;

Просмотреть файл

@ -1614,7 +1614,7 @@ GenerateFileNameFromURI(nsIURI *aURL)
char *cp = nullptr;
char *cp1 = nullptr;
rv = aURL->GetPath(file);
rv = aURL->GetPathQueryRef(file);
if ( NS_SUCCEEDED(rv) && !file.IsEmpty())
{
char *newFile = ToNewCString(file);

Просмотреть файл

@ -306,7 +306,7 @@ bool nsMsgCompose::IsEmbeddedObjectSafe(const char * originalScheme,
if (NS_SUCCEEDED(rv) && (host.IsEmpty() || originalHost || host.Equals(originalHost, nsCaseInsensitiveCStringComparator())))
{
nsAutoCString path;
rv = uri->GetPath(path);
rv = uri->GetPathQueryRef(path);
if (NS_SUCCEEDED(rv))
{
const char * query = strrchr(path.get(), '?');
@ -499,7 +499,7 @@ nsresult nsMsgCompose::TagEmbeddedObjects(nsIEditorMailSupport *aEditor)
{
originalUrl->GetScheme(originalScheme);
originalUrl->GetAsciiHost(originalHost);
originalUrl->GetPath(originalPath);
originalUrl->GetPathQueryRef(originalPath);
}
}

Просмотреть файл

@ -291,7 +291,7 @@ nsresult nsMailtoUrl::ParseUrl()
{
// we can get the path from the simple url.....
nsCString escapedPath;
m_baseURL->GetPath(escapedPath);
m_baseURL->GetPathQueryRef(escapedPath);
int32_t startOfSearchPart = escapedPath.FindChar('?');
if (startOfSearchPart >= 0)
@ -477,14 +477,14 @@ NS_IMETHODIMP nsMailtoUrl::SetPort(int32_t aPort)
return ParseUrl();
}
NS_IMETHODIMP nsMailtoUrl::GetPath(nsACString &aPath)
NS_IMETHODIMP nsMailtoUrl::GetPathQueryRef(nsACString &aPath)
{
return m_baseURL->GetPath(aPath);
return m_baseURL->GetPathQueryRef(aPath);
}
NS_IMETHODIMP nsMailtoUrl::SetPath(const nsACString &aPath)
NS_IMETHODIMP nsMailtoUrl::SetPathQueryRef(const nsACString &aPath)
{
m_baseURL->SetPath(aPath);
m_baseURL->SetPathQueryRef(aPath);
return ParseUrl();
}

Просмотреть файл

@ -9398,7 +9398,7 @@ nsresult nsImapMockChannel::OpenCacheEntry()
nsCOMPtr<nsIURI> newUri;
m_url->Clone(getter_AddRefs(newUri));
nsAutoCString path;
newUri->GetPath(path);
newUri->GetPathQueryRef(path);
// First we need to "normalise" the URL by extracting ?part= and &filename.
// The path should only contain: ?part=x.y&filename=file.ext
@ -9428,7 +9428,7 @@ nsresult nsImapMockChannel::OpenCacheEntry()
if (partQuery.IsEmpty())
{
// Not looking for a part. That's the easy part.
newUri->SetPath(path);
newUri->SetPathQueryRef(path);
return cacheStorage->AsyncOpenURI(newUri, extension, cacheAccess, this);
}
@ -9444,7 +9444,7 @@ nsresult nsImapMockChannel::OpenCacheEntry()
mTryingToReadPart = false;
// Note that part extraction was already set the first time.
newUri->SetPath(path + partQuery + filenameQuery);
newUri->SetPathQueryRef(path + partQuery + filenameQuery);
return cacheStorage->AsyncOpenURI(newUri, extension, cacheAccess, this);
}
@ -9453,7 +9453,7 @@ nsresult nsImapMockChannel::OpenCacheEntry()
// Check whether part is in the cache.
bool exists = false;
newUri->SetPath(path + partQuery + filenameQuery);
newUri->SetPathQueryRef(path + partQuery + filenameQuery);
rv = cacheStorage->Exists(newUri, extension, &exists);
NS_ENSURE_SUCCESS(rv, rv);
if (exists) {
@ -9461,13 +9461,13 @@ nsresult nsImapMockChannel::OpenCacheEntry()
}
// Let's see whether we have the entire message instead.
newUri->SetPath(path);
newUri->SetPathQueryRef(path);
rv = cacheStorage->Exists(newUri, extension, &exists);
NS_ENSURE_SUCCESS(rv, rv);
if (!exists) {
// The entire message is not in the cache. Request the part.
newUri->SetPath(path + partQuery + filenameQuery);
newUri->SetPathQueryRef(path + partQuery + filenameQuery);
return cacheStorage->AsyncOpenURI(newUri, extension, cacheAccess, this);
}

Просмотреть файл

@ -231,7 +231,7 @@ nsresult nsImapUrl::ParseUrl()
GetUserPass(m_userName);
nsAutoCString imapPartOfUrl;
rv = GetPath(imapPartOfUrl);
rv = GetPathQueryRef(imapPartOfUrl);
nsAutoCString unescapedImapPartOfUrl;
MsgUnescapeString(imapPartOfUrl, 0, unescapedImapPartOfUrl);
if (NS_SUCCEEDED(rv) && !unescapedImapPartOfUrl.IsEmpty())

Просмотреть файл

@ -411,7 +411,7 @@ nsresult nsMailboxUrl::ParseUrl()
NS_ENSURE_SUCCESS(rv, rv);
}
GetPath(m_file);
GetPathQueryRef(m_file);
return NS_OK;
}

Просмотреть файл

@ -832,11 +832,11 @@ nsresult nsNNTPProtocol::OpenCacheEntry()
nsCOMPtr<nsIURI> newUri;
uri->Clone(getter_AddRefs(newUri));
nsAutoCString path;
newUri->GetPath(path);
newUri->GetPathQueryRef(path);
int32_t pos = path.FindChar('?');
if (pos != kNotFound) {
path.SetLength(pos);
newUri->SetPath(path);
newUri->SetPathQueryRef(path);
}
return cacheStorage->AsyncOpenURI(newUri, EmptyCString(), nsICacheStorage::OPEN_NORMALLY, this);
}

Просмотреть файл

@ -559,7 +559,7 @@ nsNntpService::GetFolderFromUri(const char *aUri, nsIMsgFolder **aFolder)
NS_ENSURE_SUCCESS(rv,rv);
nsAutoCString path;
rv = uri->GetPath(path);
rv = uri->GetPathQueryRef(path);
NS_ENSURE_SUCCESS(rv,rv);
nsCOMPtr <nsIMsgAccountManager> accountManager = do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
@ -977,7 +977,7 @@ nsNntpService::GetServerForUri(nsIURI *aUri, nsINntpIncomingServer **aServer)
rv = aUri->GetAsciiHost(hostName);
rv = aUri->GetScheme(scheme);
rv = aUri->GetPort(&port);
rv = aUri->GetPath(path);
rv = aUri->GetPathQueryRef(path);
nsCOMPtr <nsIMsgAccountManager> accountManager = do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv,rv);
@ -1516,11 +1516,11 @@ NS_IMETHODIMP nsNntpService::IsMsgInMemCache(nsIURI *aUrl,
nsCOMPtr <nsIURI> newUri;
aUrl->Clone(getter_AddRefs(newUri));
nsAutoCString path;
newUri->GetPath(path);
newUri->GetPathQueryRef(path);
int32_t pos = path.FindChar('?');
if (pos != kNotFound) {
path.SetLength(pos);
newUri->SetPath(path);
newUri->SetPathQueryRef(path);
}
bool exists;
rv = mCacheStorage->Exists(newUri, EmptyCString(), &exists);

Просмотреть файл

@ -196,7 +196,7 @@ nsresult nsNntpUrl::ParseNntpURL()
nsresult nsNntpUrl::DetermineNewsAction()
{
nsAutoCString path;
nsresult rv = nsMsgMailNewsUrl::GetPath(path);
nsresult rv = nsMsgMailNewsUrl::GetPathQueryRef(path);
NS_ENSURE_SUCCESS(rv,rv);
nsAutoCString query;