Bug 1770342 - Remove the aRealFlag argument from nsIMsgAccountManager.findServerByURI. r=mkmelin
Depends on D146987. Differential Revision: https://phabricator.services.mozilla.com/D146988 --HG-- extra : amend_source : 235dc0e1d0040ea8249c4c56161cc5b04375404d
This commit is contained in:
Родитель
307d9cf592
Коммит
b6e130263e
|
@ -127,11 +127,8 @@ interface nsIMsgAccountManager : nsISupports {
|
|||
/*
|
||||
* search for the server with the given uri
|
||||
* an analog to FindServer()
|
||||
* The boolean flag selects whether we compare input against the
|
||||
* 'realhostname' and 'realuserName' pref settings.
|
||||
*/
|
||||
nsIMsgIncomingServer
|
||||
findServerByURI(in nsIURI aURI, in boolean aRealFlag);
|
||||
nsIMsgIncomingServer findServerByURI(in nsIURI aURI);
|
||||
|
||||
/**
|
||||
* find the index of this server in the (ordered) list of accounts
|
||||
|
|
|
@ -1727,7 +1727,7 @@ NS_IMETHODIMP nsMsgAccountManager::NotifyServerChanged(
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsMsgAccountManager::FindServerByURI(nsIURI* aURI, bool aRealFlag,
|
||||
nsMsgAccountManager::FindServerByURI(nsIURI* aURI,
|
||||
nsIMsgIncomingServer** aResult) {
|
||||
NS_ENSURE_ARG_POINTER(aURI);
|
||||
|
||||
|
|
|
@ -2908,7 +2908,7 @@ nsresult nsMsgDBFolder::parseURI(bool needServer) {
|
|||
|
||||
rv = NS_MutateURI(url).SetScheme(serverType).Finalize(url);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
rv = accountManager->FindServerByURI(url, false, getter_AddRefs(server));
|
||||
rv = accountManager->FindServerByURI(url, getter_AddRefs(server));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
mServer = do_GetWeakReference(server);
|
||||
|
|
|
@ -286,7 +286,7 @@ NS_IMETHODIMP nsMsgMailNewsUrl::GetServer(
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIMsgIncomingServer> server;
|
||||
rv = accountManager->FindServerByURI(url, false, aIncomingServer);
|
||||
rv = accountManager->FindServerByURI(url, aIncomingServer);
|
||||
if (!*aIncomingServer && scheme.EqualsLiteral("imap")) {
|
||||
// look for any imap server with this host name so clicking on
|
||||
// other users folder urls will work. We could override this method
|
||||
|
@ -294,7 +294,7 @@ NS_IMETHODIMP nsMsgMailNewsUrl::GetServer(
|
|||
// just set the server in the imap code for this case.
|
||||
rv = NS_MutateURI(url).SetUserPass(EmptyCString()).Finalize(url);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
rv = accountManager->FindServerByURI(url, false, aIncomingServer);
|
||||
rv = accountManager->FindServerByURI(url, aIncomingServer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ class ImapChannel {
|
|||
*/
|
||||
constructor(uri, loadInfo) {
|
||||
this._server = MailServices.accounts
|
||||
.findServerByURI(uri, false)
|
||||
.findServerByURI(uri)
|
||||
.QueryInterface(Ci.nsIImapIncomingServer);
|
||||
|
||||
// nsIChannel attributes.
|
||||
|
|
|
@ -2329,7 +2329,7 @@ nsresult nsImapService::GetServerFromUrl(nsIImapUrl* aImapUrl,
|
|||
do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = accountManager->FindServerByURI(mailnewsUrl, false, aServer);
|
||||
rv = accountManager->FindServerByURI(mailnewsUrl, aServer);
|
||||
|
||||
// look for server with any user name, in case we're trying to subscribe
|
||||
// to a folder with some one else's user name like the following
|
||||
|
@ -2346,7 +2346,7 @@ nsresult nsImapService::GetServerFromUrl(nsIImapUrl* aImapUrl,
|
|||
.Finalize(url);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = accountManager->FindServerByURI(url, false, aServer);
|
||||
rv = accountManager->FindServerByURI(url, aServer);
|
||||
if (*aServer) aImapUrl->SetExternalLinkUrl(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ class Pop3Channel {
|
|||
*/
|
||||
constructor(uri, loadInfo) {
|
||||
this._server = MailServices.accounts
|
||||
.findServerByURI(uri, false)
|
||||
.findServerByURI(uri)
|
||||
.QueryInterface(Ci.nsIPop3IncomingServer);
|
||||
|
||||
// nsIChannel attributes.
|
||||
|
|
|
@ -2783,22 +2783,21 @@ nsMsgLocalMailFolder::GetIncomingServerType(nsACString& aServerType) {
|
|||
// try "none" first
|
||||
rv = NS_MutateURI(url).SetScheme("none"_ns).Finalize(url);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
rv = accountManager->FindServerByURI(url, false, getter_AddRefs(server));
|
||||
rv = accountManager->FindServerByURI(url, getter_AddRefs(server));
|
||||
if (NS_SUCCEEDED(rv) && server)
|
||||
mType.AssignLiteral("none");
|
||||
else {
|
||||
// next try "pop3"
|
||||
rv = NS_MutateURI(url).SetScheme("pop3"_ns).Finalize(url);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
rv = accountManager->FindServerByURI(url, false, getter_AddRefs(server));
|
||||
rv = accountManager->FindServerByURI(url, getter_AddRefs(server));
|
||||
if (NS_SUCCEEDED(rv) && server)
|
||||
mType.AssignLiteral("pop3");
|
||||
else {
|
||||
// next try "rss"
|
||||
rv = NS_MutateURI(url).SetScheme("rss"_ns).Finalize(url);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
rv =
|
||||
accountManager->FindServerByURI(url, false, getter_AddRefs(server));
|
||||
rv = accountManager->FindServerByURI(url, getter_AddRefs(server));
|
||||
if (NS_SUCCEEDED(rv) && server)
|
||||
mType.AssignLiteral("rss");
|
||||
else {
|
||||
|
|
|
@ -43,7 +43,7 @@ static nsresult nsGetMailboxServer(const char* uriStr,
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
// No unescaping of username or hostname done here.
|
||||
// The unescaping is done inside of FindServerByURI
|
||||
rv = accountManager->FindServerByURI(url, false, getter_AddRefs(none_server));
|
||||
rv = accountManager->FindServerByURI(url, getter_AddRefs(none_server));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
none_server.forget(aResult);
|
||||
return rv;
|
||||
|
@ -53,7 +53,7 @@ static nsresult nsGetMailboxServer(const char* uriStr,
|
|||
nsCOMPtr<nsIMsgIncomingServer> rss_server;
|
||||
rv = NS_MutateURI(url).SetScheme("rss"_ns).Finalize(url);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
rv = accountManager->FindServerByURI(url, false, getter_AddRefs(rss_server));
|
||||
rv = accountManager->FindServerByURI(url, getter_AddRefs(rss_server));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rss_server.forget(aResult);
|
||||
return rv;
|
||||
|
@ -64,14 +64,14 @@ static nsresult nsGetMailboxServer(const char* uriStr,
|
|||
if (NS_FAILED(rv)) {
|
||||
rv = NS_MutateURI(url).SetScheme("pop3"_ns).Finalize(url);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
rv = accountManager->FindServerByURI(url, false, getter_AddRefs(server));
|
||||
rv = accountManager->FindServerByURI(url, getter_AddRefs(server));
|
||||
|
||||
// if we can't find a pop server, maybe it's a local message
|
||||
// in an imap hierarchy. look for an imap server.
|
||||
if (NS_FAILED(rv)) {
|
||||
rv = NS_MutateURI(url).SetScheme("imap"_ns).Finalize(url);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
rv = accountManager->FindServerByURI(url, false, getter_AddRefs(server));
|
||||
rv = accountManager->FindServerByURI(url, getter_AddRefs(server));
|
||||
}
|
||||
}
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
|
|
|
@ -529,7 +529,7 @@ nsresult nsNntpService::GetFolderFromUri(const nsACString& aUri,
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIMsgIncomingServer> server;
|
||||
rv = accountManager->FindServerByURI(uri, false, getter_AddRefs(server));
|
||||
rv = accountManager->FindServerByURI(uri, getter_AddRefs(server));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIMsgFolder> rootFolder;
|
||||
|
|
Загрузка…
Ссылка в новой задаче