зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1282279 - Fix style in nsClientAuthRemember.h/cpp r=keeler
--HG-- extra : rebase_source : 97dcd2db763ba882e5abd792573bed98ff8bb1b5
This commit is contained in:
Родитель
8ed11ff0ff
Коммит
a1ed52af55
|
@ -7,8 +7,8 @@
|
|||
#include "nsClientAuthRemember.h"
|
||||
|
||||
#include "nsIX509Cert.h"
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "mozilla/BasePrincipal.h"
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsNSSCertHelper.h"
|
||||
#include "nsIObserverService.h"
|
||||
|
@ -59,9 +59,9 @@ nsClientAuthRememberService::Init()
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsClientAuthRememberService::Observe(nsISupports *aSubject,
|
||||
const char *aTopic,
|
||||
const char16_t *aData)
|
||||
nsClientAuthRememberService::Observe(nsISupports* aSubject,
|
||||
const char* aTopic,
|
||||
const char16_t* aData)
|
||||
{
|
||||
// check the topic
|
||||
if (!nsCRT::strcmp(aTopic, "profile-before-change")) {
|
||||
|
@ -184,7 +184,7 @@ nsClientAuthRememberService::AddEntryToList(
|
|||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
entry->mHostWithCert = entryKey;
|
||||
entry->mEntryKey = entryKey;
|
||||
|
||||
nsClientAuthRemember& settings = entry->mSettings;
|
||||
settings.mAsciiHost = aHostName;
|
||||
|
|
|
@ -29,17 +29,17 @@ public:
|
|||
nsClientAuthRemember()
|
||||
{
|
||||
}
|
||||
|
||||
nsClientAuthRemember(const nsClientAuthRemember &other)
|
||||
|
||||
nsClientAuthRemember(const nsClientAuthRemember& aOther)
|
||||
{
|
||||
this->operator=(other);
|
||||
this->operator=(aOther);
|
||||
}
|
||||
|
||||
nsClientAuthRemember &operator=(const nsClientAuthRemember &other)
|
||||
nsClientAuthRemember& operator=(const nsClientAuthRemember& aOther)
|
||||
{
|
||||
mAsciiHost = other.mAsciiHost;
|
||||
mFingerprint = other.mFingerprint;
|
||||
mDBKey = other.mDBKey;
|
||||
mAsciiHost = aOther.mAsciiHost;
|
||||
mFingerprint = aOther.mFingerprint;
|
||||
mDBKey = aOther.mDBKey;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@ -62,9 +62,9 @@ class nsClientAuthRememberEntry final : public PLDHashEntryHdr
|
|||
{
|
||||
}
|
||||
|
||||
nsClientAuthRememberEntry(const nsClientAuthRememberEntry& toCopy)
|
||||
nsClientAuthRememberEntry(const nsClientAuthRememberEntry& aToCopy)
|
||||
{
|
||||
mSettings = toCopy.mSettings;
|
||||
mSettings = aToCopy.mSettings;
|
||||
}
|
||||
|
||||
~nsClientAuthRememberEntry()
|
||||
|
@ -73,17 +73,17 @@ class nsClientAuthRememberEntry final : public PLDHashEntryHdr
|
|||
|
||||
KeyType GetKey() const
|
||||
{
|
||||
return HostWithCertPtr();
|
||||
return EntryKeyPtr();
|
||||
}
|
||||
|
||||
KeyTypePointer GetKeyPointer() const
|
||||
{
|
||||
return HostWithCertPtr();
|
||||
return EntryKeyPtr();
|
||||
}
|
||||
|
||||
bool KeyEquals(KeyTypePointer aKey) const
|
||||
{
|
||||
return !strcmp(HostWithCertPtr(), aKey);
|
||||
return !strcmp(EntryKeyPtr(), aKey);
|
||||
}
|
||||
|
||||
static KeyTypePointer KeyToPointer(KeyType aKey)
|
||||
|
@ -99,15 +99,15 @@ class nsClientAuthRememberEntry final : public PLDHashEntryHdr
|
|||
enum { ALLOW_MEMMOVE = false };
|
||||
|
||||
// get methods
|
||||
inline const nsCString &HostWithCert() const { return mHostWithCert; }
|
||||
inline const nsCString& GetEntryKey() const { return mEntryKey; }
|
||||
|
||||
inline KeyTypePointer HostWithCertPtr() const
|
||||
inline KeyTypePointer EntryKeyPtr() const
|
||||
{
|
||||
return mHostWithCert.get();
|
||||
return mEntryKey.get();
|
||||
}
|
||||
|
||||
nsClientAuthRemember mSettings;
|
||||
nsCString mHostWithCert;
|
||||
nsCString mEntryKey;
|
||||
};
|
||||
|
||||
class nsClientAuthRememberService final : public nsIObserver,
|
||||
|
@ -124,7 +124,7 @@ public:
|
|||
static void GetEntryKey(const nsACString& aHostName,
|
||||
const NeckoOriginAttributes& aOriginAttributes,
|
||||
const nsACString& aFingerprint,
|
||||
/* out */ nsACString& aEntryKey);
|
||||
/*out*/ nsACString& aEntryKey);
|
||||
|
||||
nsresult RememberDecision(const nsACString& aHostName,
|
||||
const NeckoOriginAttributes& aOriginAttributes,
|
||||
|
|
Загрузка…
Ссылка в новой задаче