зеркало из https://github.com/mozilla/pjs.git
sr=rpotts, r=gagan. 70743. switching over to new extensible URI::SchemeIs() api. and changing existing implementations over to new api
This commit is contained in:
Родитель
708349f9c0
Коммит
57006ba345
|
@ -375,7 +375,7 @@ NS_IMETHODIMP nsAddbookUrl::SetPath(const char * aPath)
|
|||
return m_baseURL->SetPath(aPath);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAddbookUrl::SchemeIs(PRUint32 aScheme, PRBool *_retval)
|
||||
NS_IMETHODIMP nsAddbookUrl::SchemeIs(const char *aScheme, PRBool *_retval)
|
||||
{
|
||||
return m_baseURL->SchemeIs(aScheme, _retval);
|
||||
}
|
||||
|
|
|
@ -480,7 +480,7 @@ NS_IMETHODIMP nsMsgMailNewsUrl::Equals(nsIURI *other, PRBool *_retval)
|
|||
return m_baseURL->Equals(other, _retval);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsMsgMailNewsUrl::SchemeIs(PRUint32 aScheme, PRBool *_retval)
|
||||
NS_IMETHODIMP nsMsgMailNewsUrl::SchemeIs(const char *aScheme, PRBool *_retval)
|
||||
{
|
||||
return m_baseURL->SchemeIs(aScheme, _retval);
|
||||
}
|
||||
|
|
|
@ -1809,7 +1809,7 @@ GenerateFileNameFromURI(nsIURI *aURL)
|
|||
hostStr = cp2;
|
||||
|
||||
PRBool isHTTP = PR_FALSE;
|
||||
if (NS_SUCCEEDED(aURL->SchemeIs(nsIURI::HTTP, &isHTTP)) && isHTTP)
|
||||
if (NS_SUCCEEDED(aURL->SchemeIs("http", &isHTTP)) && isHTTP)
|
||||
{
|
||||
returnString = PR_smprintf("%s.html", hostStr);
|
||||
PR_FREEIF(hostStr);
|
||||
|
|
|
@ -573,7 +573,7 @@ MessageFolderIsLocal(nsIMsgIdentity *userIdentity,
|
|||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
/* mailbox:/ means its local (on disk) */
|
||||
rv = url->SchemeIs(nsIURI::MAILBOX, aResult);
|
||||
rv = url->SchemeIs("mailbox", aResult);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -378,7 +378,7 @@ NS_IMETHODIMP nsMailtoUrl::SetPath(const char * aPath)
|
|||
return m_baseURL->SetPath(aPath);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsMailtoUrl::SchemeIs(PRUint32 aScheme, PRBool *_retval)
|
||||
NS_IMETHODIMP nsMailtoUrl::SchemeIs(const char *aScheme, PRBool *_retval)
|
||||
{
|
||||
return m_baseURL->SchemeIs(aScheme, _retval);
|
||||
}
|
||||
|
|
|
@ -1752,8 +1752,8 @@ PRBool il_PermitLoad(const char * image_url, nsIImageRequestObserver * aObserver
|
|||
/* extract scheme -- we block loading of only http and https images */
|
||||
PRBool isHTTP = PR_FALSE;
|
||||
PRBool isHTTPS = PR_FALSE;
|
||||
if (NS_FAILED(uri->SchemeIs(nsIURI::HTTP, &isHTTP)) ||
|
||||
NS_FAILED(uri->SchemeIs(nsIURI::HTTPS, &isHTTPS)) ||
|
||||
if (NS_FAILED(uri->SchemeIs("http", &isHTTP)) ||
|
||||
NS_FAILED(uri->SchemeIs("https", &isHTTPS)) ||
|
||||
(!isHTTP && !isHTTPS))
|
||||
return PR_TRUE;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче