261643 don't register error strings by name - they can be found by value too.

r+sr=darin


git-svn-id: svn://10.0.0.236/trunk@162888 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cbiesinger%web.de
2004-09-28 20:17:47 +00:00
parent 770ca54e96
commit a293325ba5
3 changed files with 4 additions and 27 deletions

View File

@@ -203,12 +203,6 @@ nsIOService::Init()
nsCOMPtr<nsIErrorService> errorService = do_GetService(kErrorServiceCID);
if (errorService) {
errorService->RegisterErrorStringBundle(NS_ERROR_MODULE_NETWORK, NECKO_MSGS_URL);
errorService->RegisterErrorStringBundleKey(nsISocketTransport::STATUS_RESOLVING, "ResolvingHost");
errorService->RegisterErrorStringBundleKey(nsISocketTransport::STATUS_CONNECTED_TO, "ConnectedTo");
errorService->RegisterErrorStringBundleKey(nsISocketTransport::STATUS_SENDING_TO, "SendingTo");
errorService->RegisterErrorStringBundleKey(nsISocketTransport::STATUS_RECEIVING_FROM, "ReceivingFrom");
errorService->RegisterErrorStringBundleKey(nsISocketTransport::STATUS_CONNECTING_TO, "ConnectingTo");
errorService->RegisterErrorStringBundleKey(nsISocketTransport::STATUS_WAITING_FOR, "WaitingFor");
}
else
NS_WARNING("failed to get error service");

View File

@@ -60,7 +60,6 @@
#include "nsIProgressEventSink.h"
#include "prlog.h"
#include "nsNetUtil.h"
#include "nsIErrorService.h"
#include "nsIPrefService.h"
#include "nsIPrefBranchInternal.h"
#include "nsIObserverService.h"
@@ -90,7 +89,6 @@ PRLogModuleInfo* gFTPLog = nsnull;
#define IDLE_CONNECTION_LIMIT 8 /* XXX pref me */
static NS_DEFINE_CID(kStandardURLCID, NS_STANDARDURL_CID);
static NS_DEFINE_CID(kErrorServiceCID, NS_ERRORSERVICE_CID);
static NS_DEFINE_CID(kCacheServiceCID, NS_CACHESERVICE_CID);
nsFtpProtocolHandler *gFtpHandler = nsnull;
@@ -128,15 +126,6 @@ nsFtpProtocolHandler::Init()
{
nsresult rv;
// XXX hack until xpidl supports error info directly (http://bugzilla.mozilla.org/show_bug.cgi?id=13423)
nsCOMPtr<nsIErrorService> errorService = do_GetService(kErrorServiceCID, &rv);
if (NS_SUCCEEDED(rv)) {
rv = errorService->RegisterErrorStringBundleKey(NS_NET_STATUS_BEGIN_FTP_TRANSACTION, "BeginFTPTransaction");
if (NS_FAILED(rv)) return rv;
rv = errorService->RegisterErrorStringBundleKey(NS_NET_STATUS_END_FTP_TRANSACTION, "EndFTPTransaction");
if (NS_FAILED(rv)) return rv;
}
if (mIdleTimeout == -1) {
nsCOMPtr<nsIPrefBranchInternal> branch = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv;

View File

@@ -47,17 +47,11 @@
7=Connecting to %1$S...
8=Read %1$S
9=Wrote %1$S
10=Waiting for %1$S...
27=Beginning FTP transaction...
28=Finished FTP transaction
ResolvingHost=Looking up %1$S...
ConnectedTo=Connected to %1$S...
SendingTo=Sending request to %1$S...
ReceivingFrom=Transferring data from %1$S...
ConnectingTo=Connecting to %1$S...
ReadFrom=Read %1$S
WroteTo=Wrote %1$S
WaitingFor=Waiting for %1$S...
BeginFTPTransaction=Beginning FTP transaction...
EndFTPTransaction=Finished FTP transaction
EnterUserPasswordForRealm=Enter username and password for "%1$S" at %2$S
EnterUserPasswordForProxy=Enter username and password for proxy "%1$S" at %2$S
EnterUserPasswordFor=Enter username and password for %1$S