Bug 1282279 - Fix style in nsClientAuthRemember.h/cpp r=keeler
--- a/security/manager/ssl/nsClientAuthRemember.cpp
+++ b/security/manager/ssl/nsClientAuthRemember.cpp
@@ -2,18 +2,18 @@
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsClientAuthRemember.h"
#include "nsIX509Cert.h"
+#include "mozilla/BasePrincipal.h"
#include "mozilla/RefPtr.h"
-#include "mozilla/BasePrincipal.h"
#include "nsCRT.h"
#include "nsNSSCertHelper.h"
#include "nsIObserverService.h"
#include "nsNetUtil.h"
#include "nsISupportsPrimitives.h"
#include "nsPromiseFlatString.h"
#include "nsThreadUtils.h"
#include "nsStringBuffer.h"
@@ -54,19 +54,19 @@ nsClientAuthRememberService::Init()
if (observerService) {
observerService->AddObserver(this, "profile-before-change", true);
}
return NS_OK;
}
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")) {
// The profile is about to change,
// or is going away because the application is shutting down.
ReentrantMonitorAutoEnter lock(monitor);
RemoveAllFromMemory();
@@ -179,17 +179,17 @@ nsClientAuthRememberService::AddEntryToL
ReentrantMonitorAutoEnter lock(monitor);
nsClientAuthRememberEntry* entry = mSettingsTable.PutEntry(entryKey.get());
if (!entry) {
NS_ERROR("can't insert a null entry!");
return NS_ERROR_OUT_OF_MEMORY;
}
- entry->mHostWithCert = entryKey;
+ entry->mEntryKey = entryKey;
nsClientAuthRemember& settings = entry->mSettings;
settings.mAsciiHost = aHostName;
settings.mFingerprint = aFingerprint;
settings.mDBKey = aDBKey;
}
return NS_OK;
--- a/security/manager/ssl/nsClientAuthRemember.h
+++ b/security/manager/ssl/nsClientAuthRemember.h
@@ -24,27 +24,27 @@ using mozilla::NeckoOriginAttributes;
class nsClientAuthRemember
{
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;
}
nsCString mAsciiHost;
nsCString mFingerprint;
nsCString mDBKey;
};
@@ -57,79 +57,79 @@ class nsClientAuthRememberEntry final :
typedef const char* KeyType;
typedef const char* KeyTypePointer;
// do nothing with aHost - we require mHead to be set before we're live!
explicit nsClientAuthRememberEntry(KeyTypePointer aHostWithCertUTF8)
{
}
- nsClientAuthRememberEntry(const nsClientAuthRememberEntry& toCopy)
+ nsClientAuthRememberEntry(const nsClientAuthRememberEntry& aToCopy)
{
- mSettings = toCopy.mSettings;
+ mSettings = aToCopy.mSettings;
}
~nsClientAuthRememberEntry()
{
}
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)
{
return aKey;
}
static PLDHashNumber HashKey(KeyTypePointer aKey)
{
return PLDHashTable::HashStringKey(aKey);
}
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,
public nsSupportsWeakReference
{
public:
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIOBSERVER
nsClientAuthRememberService();
nsresult Init();
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,
CERTCertificate* aServerCert,
CERTCertificate* aClientCert);
nsresult HasRememberedDecision(const nsACString& aHostName,
const NeckoOriginAttributes& aOriginAttributes,