Bug 1048271 - Fix more bad implicit constructors in netwerk; r=mcmanus
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 05 Aug 2014 09:20:24 -0400
changeset 197935 2d5be0125f46
parent 197934 3231ca1bb833
child 197936 1dfc15b582d1
push id27256
push userkwierso@gmail.com
push dateWed, 06 Aug 2014 00:06:20 +0000
treeherdermozilla-central@6cbdd4d523a7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcmanus
bugs1048271
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1048271 - Fix more bad implicit constructors in netwerk; r=mcmanus
netwerk/base/public/nsStreamListenerWrapper.h
netwerk/base/src/Predictor.cpp
netwerk/base/src/nsAsyncStreamCopier.cpp
netwerk/base/src/nsBaseChannel.cpp
netwerk/base/src/nsBaseContentStream.h
netwerk/base/src/nsIOService.cpp
netwerk/base/src/nsLoadGroup.cpp
netwerk/base/src/nsLoadGroup.h
netwerk/base/src/nsMediaFragmentURIParser.h
netwerk/base/src/nsPACMan.cpp
netwerk/base/src/nsRequestObserverProxy.h
netwerk/base/src/nsServerSocket.cpp
netwerk/base/src/nsSimpleNestedURI.h
netwerk/base/src/nsStandardURL.h
netwerk/base/src/nsTemporaryFileInputStream.h
netwerk/base/src/nsUDPSocket.cpp
netwerk/cache/nsCacheEntry.h
netwerk/cache/nsCacheService.cpp
netwerk/cache/nsCacheService.h
netwerk/cache/nsCacheUtils.cpp
netwerk/cache/nsCacheUtils.h
netwerk/cache/nsDiskCacheDevice.cpp
netwerk/cache/nsDiskCacheDeviceSQL.cpp
netwerk/cache/nsDiskCacheDeviceSQL.h
netwerk/cache/nsDiskCacheStreams.h
netwerk/cache/nsMemoryCacheDevice.h
netwerk/cache2/CacheEntry.h
netwerk/cache2/CacheFile.cpp
netwerk/cache2/CacheFile.h
netwerk/cache2/CacheFileIOManager.cpp
netwerk/cache2/CacheFileIOManager.h
netwerk/cache2/CacheFileInputStream.h
netwerk/cache2/CacheHashUtils.h
netwerk/cache2/CacheIndex.cpp
netwerk/cache2/CacheIndex.h
netwerk/cache2/CacheStorage.h
netwerk/cache2/CacheStorageService.cpp
netwerk/cache2/CacheStorageService.h
netwerk/cache2/OldWrappers.cpp
netwerk/cache2/OldWrappers.h
netwerk/cookie/nsCookieService.cpp
netwerk/cookie/nsCookieService.h
netwerk/dns/nsDNSService2.cpp
netwerk/dns/nsEffectiveTLDService.h
netwerk/dns/nsHostResolver.h
netwerk/ipc/RemoteOpenFileParent.h
netwerk/protocol/data/nsDataChannel.h
netwerk/protocol/file/nsFileChannel.h
netwerk/protocol/ftp/FTPChannelChild.cpp
netwerk/protocol/ftp/nsFTPChannel.cpp
netwerk/protocol/http/Http2Session.h
netwerk/protocol/http/HttpChannelChild.cpp
netwerk/protocol/http/HttpChannelParentListener.h
netwerk/protocol/http/SpdySession3.h
netwerk/protocol/http/SpdySession31.h
netwerk/protocol/http/TunnelUtils.cpp
netwerk/protocol/http/nsHttpChannel.cpp
netwerk/protocol/http/nsHttpTransaction.cpp
netwerk/protocol/websocket/WebSocketChannelChild.cpp
netwerk/protocol/websocket/WebSocketChannelChild.h
netwerk/protocol/wyciwyg/nsWyciwygChannel.cpp
netwerk/sctp/datachannel/DataChannel.h
netwerk/socket/nsSOCKSSocketProvider.h
netwerk/wifi/nsWifiMonitor.h
--- a/netwerk/base/public/nsStreamListenerWrapper.h
+++ b/netwerk/base/public/nsStreamListenerWrapper.h
@@ -12,17 +12,17 @@
 #include "mozilla/Attributes.h"
 
 // Wrapper class to make replacement of nsHttpChannel's listener
 // from JavaScript possible. It is workaround for bug 433711 and 682305.
 class nsStreamListenerWrapper MOZ_FINAL : public nsIStreamListener
                                         , public nsIThreadRetargetableStreamListener
 {
 public:
-  nsStreamListenerWrapper(nsIStreamListener *listener)
+  explicit nsStreamListenerWrapper(nsIStreamListener *listener)
     : mListener(listener)
   {
     NS_ASSERTION(mListener, "no stream listener specified");
   }
 
   NS_DECL_ISUPPORTS
   NS_FORWARD_NSIREQUESTOBSERVER(mListener->)
   NS_FORWARD_NSISTREAMLISTENER(mListener->)
--- a/netwerk/base/src/Predictor.cpp
+++ b/netwerk/base/src/Predictor.cpp
@@ -798,17 +798,17 @@ Predictor::EnsureInitStorage()
   NS_DispatchToMainThread(event);
 
   return NS_OK;
 }
 
 class PredictorThreadShutdownRunner : public nsRunnable
 {
 public:
-  PredictorThreadShutdownRunner(nsIThread *ioThread)
+  explicit PredictorThreadShutdownRunner(nsIThread *ioThread)
     :mIOThread(ioThread)
   { }
 
   NS_IMETHODIMP Run() MOZ_OVERRIDE
   {
     MOZ_ASSERT(NS_IsMainThread(),
                "Shut down predictor io thread off main thread");
     mIOThread->Shutdown();
--- a/netwerk/base/src/nsAsyncStreamCopier.cpp
+++ b/netwerk/base/src/nsAsyncStreamCopier.cpp
@@ -26,17 +26,17 @@ static PRLogModuleInfo *gStreamCopierLog
  */
 class AsyncApplyBufferingPolicyEvent MOZ_FINAL: public nsRunnable
 {
 public:
     /**
      * @param aCopier
      *        The nsAsyncStreamCopier requesting the information.
      */
-    AsyncApplyBufferingPolicyEvent(nsAsyncStreamCopier* aCopier)
+    explicit AsyncApplyBufferingPolicyEvent(nsAsyncStreamCopier* aCopier)
         : mCopier(aCopier)
       , mTarget(NS_GetCurrentThread())
       { }
     NS_METHOD Run()
     {
       nsresult rv = mCopier->ApplyBufferingPolicy();
       if (NS_FAILED(rv)) {
           mCopier->Cancel(rv);
--- a/netwerk/base/src/nsBaseChannel.cpp
+++ b/netwerk/base/src/nsBaseChannel.cpp
@@ -22,17 +22,17 @@ CopyProperties(const nsAString &key, nsI
 
   bag->SetProperty(key, data);
   return PL_DHASH_NEXT;
 }
 
 // This class is used to suspend a request across a function scope.
 class ScopedRequestSuspender {
 public:
-  ScopedRequestSuspender(nsIRequest *request)
+  explicit ScopedRequestSuspender(nsIRequest *request)
     : mRequest(request) {
     if (mRequest && NS_FAILED(mRequest->Suspend())) {
       NS_WARNING("Couldn't suspend pump");
       mRequest = nullptr;
     }
   }
   ~ScopedRequestSuspender() {
     if (mRequest)
--- a/netwerk/base/src/nsBaseContentStream.h
+++ b/netwerk/base/src/nsBaseContentStream.h
@@ -35,17 +35,17 @@
 
 class nsBaseContentStream : public nsIAsyncInputStream
 {
 public: 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIINPUTSTREAM
   NS_DECL_NSIASYNCINPUTSTREAM
 
-  nsBaseContentStream(bool nonBlocking)
+  explicit nsBaseContentStream(bool nonBlocking)
     : mStatus(NS_OK)
     , mNonBlocking(nonBlocking) {
   }
 
   nsresult Status() { return mStatus; }
   bool IsNonBlocking() { return mNonBlocking; }
   bool IsClosed() { return NS_FAILED(mStatus); }
 
--- a/netwerk/base/src/nsIOService.cpp
+++ b/netwerk/base/src/nsIOService.cpp
@@ -492,17 +492,17 @@ nsIOService::GetProtocolFlags(const char
 
     rv = handler->GetProtocolFlags(flags);
     return rv;
 }
 
 class AutoIncrement
 {
     public:
-        AutoIncrement(uint32_t *var) : mVar(var)
+        explicit AutoIncrement(uint32_t *var) : mVar(var)
         {
             ++*var;
         }
         ~AutoIncrement()
         {
             --*mVar;
         }
     private:
--- a/netwerk/base/src/nsLoadGroup.cpp
+++ b/netwerk/base/src/nsLoadGroup.cpp
@@ -45,17 +45,17 @@ static PRLogModuleInfo* gLoadGroupLog = 
 #undef LOG
 #define LOG(args) PR_LOG(gLoadGroupLog, PR_LOG_DEBUG, args)
 
 ////////////////////////////////////////////////////////////////////////////////
 
 class RequestMapEntry : public PLDHashEntryHdr
 {
 public:
-    RequestMapEntry(nsIRequest *aRequest) :
+    explicit RequestMapEntry(nsIRequest *aRequest) :
         mKey(aRequest)
     {
     }
 
     nsCOMPtr<nsIRequest> mKey;
 };
 
 static bool
--- a/netwerk/base/src/nsLoadGroup.h
+++ b/netwerk/base/src/nsLoadGroup.h
@@ -44,17 +44,17 @@ public:
 
     ////////////////////////////////////////////////////////////////////////////
     // nsISupportsPriority methods:
     NS_DECL_NSISUPPORTSPRIORITY
 
     ////////////////////////////////////////////////////////////////////////////
     // nsLoadGroup methods:
 
-    nsLoadGroup(nsISupports* outer);
+    explicit nsLoadGroup(nsISupports* outer);
 
     nsresult Init();
 
 protected:
     virtual ~nsLoadGroup();
 
     nsresult MergeLoadFlags(nsIRequest *aRequest, nsLoadFlags& flags);
 
--- a/netwerk/base/src/nsMediaFragmentURIParser.h
+++ b/netwerk/base/src/nsMediaFragmentURIParser.h
@@ -28,20 +28,20 @@ enum ClipUnit
   eClipUnit_Pixel,
   eClipUnit_Percent,
 };
 
 class nsMediaFragmentURIParser
 {
 public:
   // Create a parser with the provided URI.
-  nsMediaFragmentURIParser(nsIURI* aURI);
+  explicit nsMediaFragmentURIParser(nsIURI* aURI);
 
   // Create a parser with the provided URI reference portion.
-  nsMediaFragmentURIParser(nsCString& aRef);
+  explicit nsMediaFragmentURIParser(nsCString& aRef);
 
   // True if a valid temporal media fragment indicated a start time.
   bool HasStartTime() const { return !mStart.empty(); }
 
   // If a valid temporal media fragment indicated a start time, returns
   // it in units of seconds. If not, defaults to 0.
   double GetStartTime() const { return mStart.ref(); }
 
--- a/netwerk/base/src/nsPACMan.cpp
+++ b/netwerk/base/src/nsPACMan.cpp
@@ -92,17 +92,17 @@ private:
 
 // The PAC thread must be deleted from the main thread, this class
 // acts as a proxy to do that, as the PACMan is reference counted
 // and might be destroyed on either thread
 
 class ShutdownThread MOZ_FINAL : public nsRunnable
 {
 public:
-  ShutdownThread(nsIThread *thread)
+  explicit ShutdownThread(nsIThread *thread)
     : mThread(thread)
   {
   }
 
   NS_IMETHODIMP Run()
   {
     NS_ABORT_IF_FALSE(NS_IsMainThread(), "wrong thread");
     mThread->Shutdown();
@@ -117,17 +117,17 @@ private:
 
 // PACLoadComplete allows the PAC thread to tell the main thread that
 // the javascript PAC file has been installed (perhaps unsuccessfully)
 // and that there is no reason to queue executions anymore
 
 class PACLoadComplete MOZ_FINAL : public nsRunnable
 {
 public:
-  PACLoadComplete(nsPACMan *aPACMan)
+  explicit PACLoadComplete(nsPACMan *aPACMan)
     : mPACMan(aPACMan)
   {
   }
 
   NS_IMETHODIMP Run()
   {
     NS_ABORT_IF_FALSE(NS_IsMainThread(), "wrong thread");
     mPACMan->mLoader = nullptr;
@@ -144,17 +144,17 @@ private:
 // ExecutePACThreadAction is used to proxy actions from the main
 // thread onto the PAC thread. There are 3 options: process the queue,
 // cancel the queue, and setup the javascript context with a new PAC file
 
 class ExecutePACThreadAction MOZ_FINAL : public nsRunnable
 {
 public:
   // by default we just process the queue
-  ExecutePACThreadAction(nsPACMan *aPACMan)
+  explicit ExecutePACThreadAction(nsPACMan *aPACMan)
     : mPACMan(aPACMan)
     , mCancel(false)
     , mSetupPAC(false)
   { }
 
   void CancelQueue (nsresult status)
   {
     mCancel = true;
--- a/netwerk/base/src/nsRequestObserverProxy.h
+++ b/netwerk/base/src/nsRequestObserverProxy.h
@@ -36,17 +36,17 @@ protected:
 
     friend class nsOnStartRequestEvent;
     friend class nsOnStopRequestEvent;
 };
 
 class nsARequestObserverEvent : public nsRunnable
 {
 public:
-    nsARequestObserverEvent(nsIRequest *);
+    explicit nsARequestObserverEvent(nsIRequest *);
 
 protected:
     virtual ~nsARequestObserverEvent() {}
 
     nsCOMPtr<nsIRequest>  mRequest;
 };
 
 #endif // nsRequestObserverProxy_h__
--- a/netwerk/base/src/nsServerSocket.cpp
+++ b/netwerk/base/src/nsServerSocket.cpp
@@ -405,17 +405,17 @@ nsServerSocket::Close()
 
 namespace {
 
 class ServerSocketListenerProxy MOZ_FINAL : public nsIServerSocketListener
 {
   ~ServerSocketListenerProxy() {}
 
 public:
-  ServerSocketListenerProxy(nsIServerSocketListener* aListener)
+  explicit ServerSocketListenerProxy(nsIServerSocketListener* aListener)
     : mListener(new nsMainThreadPtrHolder<nsIServerSocketListener>(aListener))
     , mTargetThread(do_GetCurrentThread())
   { }
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSISERVERSOCKETLISTENER
 
   class OnSocketAcceptedRunnable : public nsRunnable
--- a/netwerk/base/src/nsSimpleNestedURI.h
+++ b/netwerk/base/src/nsSimpleNestedURI.h
@@ -30,17 +30,17 @@ public:
     // To be used by deserialization only.  Leaves this object in an
     // uninitialized state that will throw on most accesses.
     nsSimpleNestedURI()
     {
     }
 
     // Constructor that should generally be used when constructing an object of
     // this class with |operator new|.
-    nsSimpleNestedURI(nsIURI* innerURI);
+    explicit nsSimpleNestedURI(nsIURI* innerURI);
 
     NS_DECL_ISUPPORTS_INHERITED
     NS_DECL_NSINESTEDURI
 
     // Overrides for various methods nsSimpleURI implements follow.
   
     // nsSimpleURI overrides
     virtual nsresult EqualsInternal(nsIURI* other,
--- a/netwerk/base/src/nsStandardURL.h
+++ b/netwerk/base/src/nsStandardURL.h
@@ -56,17 +56,17 @@ public:
     NS_DECL_NSICLASSINFO
     NS_DECL_NSIMUTABLE
     NS_DECL_NSIIPCSERIALIZABLEURI
 
     // nsISizeOf
     virtual size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
     virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
 
-    nsStandardURL(bool aSupportsFileURL = false);
+    explicit nsStandardURL(bool aSupportsFileURL = false);
 
     static void InitGlobalObjects();
     static void ShutdownGlobalObjects();
 
 public: /* internal -- HPUX compiler can't handle this being private */
     //
     // location and length of an url segment relative to mSpec
     //
@@ -106,17 +106,17 @@ public: /* internal -- HPUX compiler can
     friend class nsPrefObserver;
 
     //
     // URL segment encoder : performs charset conversion and URL escaping.
     //
     class nsSegmentEncoder
     {
     public:
-        nsSegmentEncoder(const char *charset);
+        explicit nsSegmentEncoder(const char *charset);
 
         // Encode the given segment if necessary, and return the length of
         // the encoded segment.  The encoded segment is appended to |buf|
         // if and only if encoding is required.
         int32_t EncodeSegmentCount(const char *str,
                                    const URLSegment &segment,
                                    int16_t mask,
                                    nsAFlatCString &buf,
--- a/netwerk/base/src/nsTemporaryFileInputStream.h
+++ b/netwerk/base/src/nsTemporaryFileInputStream.h
@@ -15,17 +15,17 @@ class nsTemporaryFileInputStream : publi
 {
 public:
   //used to release a PRFileDesc
   class FileDescOwner
   {
     friend class nsTemporaryFileInputStream;
   public:
     NS_INLINE_DECL_THREADSAFE_REFCOUNTING(FileDescOwner)
-    FileDescOwner(PRFileDesc* aFD)
+    explicit FileDescOwner(PRFileDesc* aFD)
       : mFD(aFD),
         mMutex("FileDescOwner::mMutex")
     {
       MOZ_ASSERT(aFD);
     }
   private:
     ~FileDescOwner()
     {
--- a/netwerk/base/src/nsUDPSocket.cpp
+++ b/netwerk/base/src/nsUDPSocket.cpp
@@ -680,17 +680,17 @@ namespace {
 //-----------------------------------------------------------------------------
 // SocketListenerProxy
 //-----------------------------------------------------------------------------
 class SocketListenerProxy MOZ_FINAL : public nsIUDPSocketListener
 {
   ~SocketListenerProxy() {}
 
 public:
-  SocketListenerProxy(nsIUDPSocketListener* aListener)
+  explicit SocketListenerProxy(nsIUDPSocketListener* aListener)
     : mListener(new nsMainThreadPtrHolder<nsIUDPSocketListener>(aListener))
     , mTargetThread(do_GetCurrentThread())
   { }
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIUDPSOCKETLISTENER
 
   class OnPacketReceivedRunnable : public nsRunnable
--- a/netwerk/cache/nsCacheEntry.h
+++ b/netwerk/cache/nsCacheEntry.h
@@ -233,17 +233,17 @@ private:
 /******************************************************************************
 * nsCacheEntryInfo
 *******************************************************************************/
 class nsCacheEntryInfo : public nsICacheEntryInfo {
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSICACHEENTRYINFO
 
-    nsCacheEntryInfo(nsCacheEntry* entry)
+    explicit nsCacheEntryInfo(nsCacheEntry* entry)
         :   mCacheEntry(entry)
     {
     }
 
     void    DetachEntry() { mCacheEntry = nullptr; }
 
 private:
     nsCacheEntry * mCacheEntry;
--- a/netwerk/cache/nsCacheService.cpp
+++ b/netwerk/cache/nsCacheService.cpp
@@ -222,17 +222,17 @@ public:
 
 NS_IMPL_ISUPPORTS(nsSetDiskSmartSizeCallback, nsITimerCallback)
 
 // Runnable sent to main thread after the cache IO thread calculates available
 // disk space, so that there is no race in setting mDiskCacheCapacity.
 class nsSetSmartSizeEvent: public nsRunnable 
 {
 public:
-    nsSetSmartSizeEvent(int32_t smartSize)
+    explicit nsSetSmartSizeEvent(int32_t smartSize)
         : mSmartSize(smartSize) {}
 
     NS_IMETHOD Run() 
     {
         NS_ASSERTION(NS_IsMainThread(), 
                      "Setting smart size data off the main thread");
 
         // Main thread may have already called nsCacheService::Shutdown
@@ -969,17 +969,17 @@ nsCacheProfilePrefObserver::CacheCompres
 }
 
 /******************************************************************************
  * nsProcessRequestEvent
  *****************************************************************************/
 
 class nsProcessRequestEvent : public nsRunnable {
 public:
-    nsProcessRequestEvent(nsCacheRequest *aRequest)
+    explicit nsProcessRequestEvent(nsCacheRequest *aRequest)
     {
         MOZ_EVENT_TRACER_NAME_OBJECT(aRequest, aRequest->mKey.get());
         MOZ_EVENT_TRACER_WAIT(aRequest, "net::cache::ProcessRequest");
         mRequest = aRequest;
     }
 
     NS_IMETHOD Run()
     {
@@ -1342,17 +1342,17 @@ nsCacheService::EvictEntriesForSession(n
                                  session->StoragePolicy());
 }
 
 namespace {
 
 class EvictionNotifierRunnable : public nsRunnable
 {
 public:
-    EvictionNotifierRunnable(nsISupports* aSubject)
+    explicit EvictionNotifierRunnable(nsISupports* aSubject)
         : mSubject(aSubject)
     { }
 
     NS_DECL_NSIRUNNABLE
 
 private:
     nsCOMPtr<nsISupports> mSubject;
 };
--- a/netwerk/cache/nsCacheService.h
+++ b/netwerk/cache/nsCacheService.h
@@ -388,17 +388,17 @@ private:
 
 #define LOCK_TELEM(x) \
   (::mozilla::Telemetry::CACHE_SERVICE_LOCK_WAIT_MAINTHREAD_##x)
 
 // Instantiate this class to acquire the cache service lock for a particular
 // execution scope.
 class nsCacheServiceAutoLock {
 public:
-    nsCacheServiceAutoLock(mozilla::Telemetry::ID mainThreadLockerID) {
+    explicit nsCacheServiceAutoLock(mozilla::Telemetry::ID mainThreadLockerID) {
         nsCacheService::Lock(mainThreadLockerID);
     }
     ~nsCacheServiceAutoLock() {
         nsCacheService::Unlock();
     }
 };
 
 #endif // _nsCacheService_h_
--- a/netwerk/cache/nsCacheUtils.cpp
+++ b/netwerk/cache/nsCacheUtils.cpp
@@ -7,17 +7,17 @@
 #include "nsCache.h"
 #include "nsCacheUtils.h"
 #include "nsThreadUtils.h"
 
 using namespace mozilla;
 
 class nsDestroyThreadEvent : public nsRunnable {
 public:
-  nsDestroyThreadEvent(nsIThread *thread)
+  explicit nsDestroyThreadEvent(nsIThread *thread)
     : mThread(thread)
   {}
   NS_IMETHOD Run()
   {
     mThread->Shutdown();
     return NS_OK;
   }
 private:
--- a/netwerk/cache/nsCacheUtils.h
+++ b/netwerk/cache/nsCacheUtils.h
@@ -14,17 +14,17 @@
 
 class nsIThread;
 
 /**
  * A class with utility methods for shutting down nsIThreads easily.
   */
 class nsShutdownThread : public nsRunnable {
 public:
-  nsShutdownThread(nsIThread *aThread);
+  explicit nsShutdownThread(nsIThread *aThread);
   ~nsShutdownThread();
 
   NS_IMETHOD Run();
 
 /**
  * Shutdown ensures that aThread->Shutdown() is called on a main thread
  */
   static nsresult Shutdown(nsIThread *aThread);
--- a/netwerk/cache/nsDiskCacheDevice.cpp
+++ b/netwerk/cache/nsDiskCacheDevice.cpp
@@ -79,17 +79,17 @@ private:
     bool mCanceled;
     nsCacheEntry *mEntry;
     nsDiskCacheDevice *mDevice;
     nsDiskCacheBinding *mBinding;
 };
 
 class nsEvictDiskCacheEntriesEvent : public nsRunnable {
 public:
-    nsEvictDiskCacheEntriesEvent(nsDiskCacheDevice *device)
+    explicit nsEvictDiskCacheEntriesEvent(nsDiskCacheDevice *device)
         : mDevice(device) {}
 
     NS_IMETHOD Run()
     {
         nsCacheServiceAutoLock lock(LOCK_TELEM(NSEVICTDISKCACHEENTRIESEVENT_RUN));
         mDevice->EvictDiskCacheEntries(mDevice->mCacheCapacity);
         return NS_OK;
     }
@@ -177,17 +177,17 @@ nsDiskCacheEvictor::VisitRecord(nsDiskCa
  *  nsDiskCacheDeviceInfo
  *****************************************************************************/
 
 class nsDiskCacheDeviceInfo : public nsICacheDeviceInfo {
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSICACHEDEVICEINFO
 
-    nsDiskCacheDeviceInfo(nsDiskCacheDevice* device)
+    explicit nsDiskCacheDeviceInfo(nsDiskCacheDevice* device)
         :   mDevice(device)
     {
     }
 
 private:
     virtual ~nsDiskCacheDeviceInfo() {}
 
     nsDiskCacheDevice* mDevice;
--- a/netwerk/cache/nsDiskCacheDeviceSQL.cpp
+++ b/netwerk/cache/nsDiskCacheDeviceSQL.cpp
@@ -86,17 +86,17 @@ DecomposeCacheEntryKey(const nsCString *
   *key = buf.get() + colon + 1;
 
   return true;
 }
 
 class AutoResetStatement
 {
   public:
-    AutoResetStatement(mozIStorageStatement *s)
+    explicit AutoResetStatement(mozIStorageStatement *s)
       : mStatement(s) {}
     ~AutoResetStatement() { mStatement->Reset(); }
     mozIStorageStatement *operator->() { return mStatement; }
   private:
     mozIStorageStatement *mStatement;
 };
 
 class EvictionObserver
@@ -270,17 +270,17 @@ private:
  */
 
 class nsOfflineCacheDeviceInfo MOZ_FINAL : public nsICacheDeviceInfo
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSICACHEDEVICEINFO
 
-  nsOfflineCacheDeviceInfo(nsOfflineCacheDevice* device)
+  explicit nsOfflineCacheDeviceInfo(nsOfflineCacheDevice* device)
     : mDevice(device)
   {}
 
 private:
   ~nsOfflineCacheDeviceInfo() {}
 
   nsOfflineCacheDevice* mDevice;
 };
@@ -856,17 +856,17 @@ nsApplicationCache::GetUsage(uint32_t *u
 }
 
 /******************************************************************************
  * nsCloseDBEvent
  *****************************************************************************/
 
 class nsCloseDBEvent : public nsRunnable {
 public:
-  nsCloseDBEvent(mozIStorageConnection *aDB)
+  explicit nsCloseDBEvent(mozIStorageConnection *aDB)
   {
     mDB = aDB;
   }
 
   NS_IMETHOD Run()
   {
     mDB->Close();
     return NS_OK;
--- a/netwerk/cache/nsDiskCacheDeviceSQL.h
+++ b/netwerk/cache/nsDiskCacheDeviceSQL.h
@@ -42,17 +42,17 @@ private:
   nsCString mData;
 };
 
 class nsOfflineCacheEvictionFunction MOZ_FINAL : public mozIStorageFunction {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_MOZISTORAGEFUNCTION
 
-  nsOfflineCacheEvictionFunction(nsOfflineCacheDevice *device)
+  explicit nsOfflineCacheEvictionFunction(nsOfflineCacheDevice *device)
     : mDevice(device)
   {}
 
   void Reset() { mItems.Clear(); }
   void Apply();
 
 private:
   ~nsOfflineCacheEvictionFunction() {}
--- a/netwerk/cache/nsDiskCacheStreams.h
+++ b/netwerk/cache/nsDiskCacheStreams.h
@@ -18,17 +18,17 @@
 
 #include "mozilla/Atomics.h"
 
 class nsDiskCacheInputStream;
 class nsDiskCacheDevice;
 
 class nsDiskCacheStreamIO : public nsIOutputStream {
 public:
-    nsDiskCacheStreamIO(nsDiskCacheBinding *   binding);
+    explicit nsDiskCacheStreamIO(nsDiskCacheBinding *   binding);
     
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSIOUTPUTSTREAM
 
     nsresult    GetInputStream(uint32_t offset, nsIInputStream ** inputStream);
     nsresult    GetOutputStream(uint32_t offset, nsIOutputStream ** outputStream);
 
     nsresult    ClearBinding();
--- a/netwerk/cache/nsMemoryCacheDevice.h
+++ b/netwerk/cache/nsMemoryCacheDevice.h
@@ -105,17 +105,17 @@ private:
 /******************************************************************************
  * nsMemoryCacheDeviceInfo - used to call nsIVisitor for about:cache
  ******************************************************************************/
 class nsMemoryCacheDeviceInfo : public nsICacheDeviceInfo {
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSICACHEDEVICEINFO
 
-    nsMemoryCacheDeviceInfo(nsMemoryCacheDevice* device)
+    explicit nsMemoryCacheDeviceInfo(nsMemoryCacheDevice* device)
         :   mDevice(device)
     {
     }
 
 private:
     virtual ~nsMemoryCacheDeviceInfo() {}
     nsMemoryCacheDevice* mDevice;
 };
--- a/netwerk/cache2/CacheEntry.h
+++ b/netwerk/cache2/CacheEntry.h
@@ -349,17 +349,17 @@ private:
   uint32_t mUseCount;
   nsCOMPtr<nsIThread> mReleaseThread;
 };
 
 
 class CacheEntryHandle : public nsICacheEntry
 {
 public:
-  CacheEntryHandle(CacheEntry* aEntry);
+  explicit CacheEntryHandle(CacheEntry* aEntry);
   CacheEntry* Entry() const { return mEntry; }
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_FORWARD_NSICACHEENTRY(mEntry->)
 private:
   virtual ~CacheEntryHandle();
   nsRefPtr<CacheEntry> mEntry;
 };
@@ -371,17 +371,17 @@ public:
   void OnOutputClosed();
 
 private:
   friend class CacheEntry;
 
   virtual ~CacheOutputCloseListener();
 
   NS_DECL_NSIRUNNABLE
-  CacheOutputCloseListener(CacheEntry* aEntry);
+  explicit CacheOutputCloseListener(CacheEntry* aEntry);
 
 private:
   nsRefPtr<CacheEntry> mEntry;
 };
 
 } // net
 } // mozilla
 
--- a/netwerk/cache2/CacheFile.cpp
+++ b/netwerk/cache2/CacheFile.cpp
@@ -105,17 +105,17 @@ protected:
 };
 
 
 class DoomFileHelper : public CacheFileIOListener
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
 
-  DoomFileHelper(CacheFileListener *aListener)
+  explicit DoomFileHelper(CacheFileListener *aListener)
     : mListener(aListener)
   {
     MOZ_COUNT_CTOR(DoomFileHelper);
   }
 
 
   NS_IMETHOD OnFileOpened(CacheFileHandle *aHandle, nsresult aResult)
   {
@@ -404,17 +404,17 @@ CacheFile::OnFileOpened(CacheFileHandle 
 {
   nsresult rv;
 
   // Using an 'auto' class to perform doom or fail the listener
   // outside the CacheFile's lock.
   class AutoFailDoomListener
   {
   public:
-    AutoFailDoomListener(CacheFileHandle *aHandle)
+    explicit AutoFailDoomListener(CacheFileHandle *aHandle)
       : mHandle(aHandle)
       , mAlreadyDoomed(false)
     {}
     ~AutoFailDoomListener()
     {
       if (!mListener)
         return;
 
--- a/netwerk/cache2/CacheFile.h
+++ b/netwerk/cache2/CacheFile.h
@@ -214,17 +214,17 @@ private:
   nsTArray<CacheFileInputStream*> mInputs;
   CacheFileOutputStream          *mOutput;
 
   nsTArray<nsISupports*>          mObjsToRelease;
 };
 
 class CacheFileAutoLock {
 public:
-  CacheFileAutoLock(CacheFile *aFile)
+  explicit CacheFileAutoLock(CacheFile *aFile)
     : mFile(aFile)
     , mLocked(true)
   {
     mFile->Lock();
   }
   ~CacheFileAutoLock()
   {
     if (mLocked)
--- a/netwerk/cache2/CacheFileIOManager.cpp
+++ b/netwerk/cache2/CacheFileIOManager.cpp
@@ -901,17 +901,17 @@ protected:
   nsCOMPtr<CacheFileIOListener> mCallback;
   nsCOMPtr<nsIEventTarget>      mTarget;
   nsRefPtr<CacheFileIOManager>  mIOMan;
   nsresult                      mRV;
 };
 
 class ReleaseNSPRHandleEvent : public nsRunnable {
 public:
-  ReleaseNSPRHandleEvent(CacheFileHandle *aHandle)
+  explicit ReleaseNSPRHandleEvent(CacheFileHandle *aHandle)
     : mHandle(aHandle)
   {
     MOZ_COUNT_CTOR(ReleaseNSPRHandleEvent);
   }
 
 protected:
   ~ReleaseNSPRHandleEvent()
   {
--- a/netwerk/cache2/CacheFileIOManager.h
+++ b/netwerk/cache2/CacheFileIOManager.h
@@ -107,17 +107,17 @@ public:
   size_t SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const;
 
   class HandleHashKey : public PLDHashEntryHdr
   {
   public:
     typedef const SHA1Sum::Hash& KeyType;
     typedef const SHA1Sum::Hash* KeyTypePointer;
 
-    HandleHashKey(KeyTypePointer aKey)
+    explicit HandleHashKey(KeyTypePointer aKey)
     {
       MOZ_COUNT_CTOR(HandleHashKey);
       mHash = (SHA1Sum::Hash*)new uint8_t[SHA1Sum::kHashSize];
       memcpy(mHash, aKey, sizeof(SHA1Sum::Hash));
     }
     HandleHashKey(const HandleHashKey& aOther)
     {
       NS_NOTREACHED("HandleHashKey copy constructor is forbidden!");
--- a/netwerk/cache2/CacheFileInputStream.h
+++ b/netwerk/cache2/CacheFileInputStream.h
@@ -22,17 +22,17 @@ class CacheFileInputStream : public nsIA
                            , public CacheFileChunkListener
 {
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIINPUTSTREAM
   NS_DECL_NSIASYNCINPUTSTREAM
   NS_DECL_NSISEEKABLESTREAM
 
 public:
-  CacheFileInputStream(CacheFile *aFile);
+  explicit CacheFileInputStream(CacheFile *aFile);
 
   NS_IMETHOD OnChunkRead(nsresult aResult, CacheFileChunk *aChunk);
   NS_IMETHOD OnChunkWritten(nsresult aResult, CacheFileChunk *aChunk);
   NS_IMETHOD OnChunkAvailable(nsresult aResult, uint32_t aChunkIdx,
                               CacheFileChunk *aChunk);
   NS_IMETHOD OnChunkUpdated(CacheFileChunk *aChunk);
 
   // Memory reporting
--- a/netwerk/cache2/CacheHashUtils.h
+++ b/netwerk/cache2/CacheHashUtils.h
@@ -30,17 +30,17 @@ public:
 
   typedef uint16_t Hash16_t;
   typedef uint32_t Hash32_t;
 
   static Hash32_t Hash(const char* aData, uint32_t aSize, uint32_t aInitval=0);
   static Hash16_t Hash16(const char* aData, uint32_t aSize,
                          uint32_t aInitval=0);
 
-  CacheHash(uint32_t aInitval=0);
+  explicit CacheHash(uint32_t aInitval=0);
 
   void     Update(const char *aData, uint32_t aLen);
   Hash32_t GetHash();
   Hash16_t GetHash16();
 
 private:
   virtual ~CacheHash() {}
 
--- a/netwerk/cache2/CacheIndex.cpp
+++ b/netwerk/cache2/CacheIndex.cpp
@@ -161,17 +161,17 @@ private:
   bool                 mDoNotSearchInUpdates;
 };
 
 class FileOpenHelper : public CacheFileIOListener
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
 
-  FileOpenHelper(CacheIndex* aIndex)
+  explicit FileOpenHelper(CacheIndex* aIndex)
     : mIndex(aIndex)
     , mCanceled(false)
   {}
 
   void Cancel() {
     mIndex->AssertOwnsLock();
     mCanceled = true;
   }
@@ -1817,17 +1817,17 @@ CacheIndex::RemoveIndexFromDisk()
   RemoveFile(NS_LITERAL_CSTRING(kIndexName));
   RemoveFile(NS_LITERAL_CSTRING(kTempIndexName));
   RemoveFile(NS_LITERAL_CSTRING(kJournalName));
 }
 
 class WriteLogHelper
 {
 public:
-  WriteLogHelper(PRFileDesc *aFD)
+  explicit WriteLogHelper(PRFileDesc *aFD)
     : mStatus(NS_OK)
     , mFD(aFD)
     , mBufSize(kMaxBufSize)
     , mBufPos(0)
   {
     mHash = new CacheHash();
     mBuf = static_cast<char *>(moz_xmalloc(mBufSize));
   }
--- a/netwerk/cache2/CacheIndex.h
+++ b/netwerk/cache2/CacheIndex.h
@@ -82,17 +82,17 @@ struct CacheIndexRecord {
 };
 
 class CacheIndexEntry : public PLDHashEntryHdr
 {
 public:
   typedef const SHA1Sum::Hash& KeyType;
   typedef const SHA1Sum::Hash* KeyTypePointer;
 
-  CacheIndexEntry(KeyTypePointer aKey)
+  explicit CacheIndexEntry(KeyTypePointer aKey)
   {
     MOZ_COUNT_CTOR(CacheIndexEntry);
     mRec = new CacheIndexRecord();
     LOG(("CacheIndexEntry::CacheIndexEntry() - Created record [rec=%p]", mRec.get()));
     memcpy(&mRec->mHash, aKey, sizeof(SHA1Sum::Hash));
   }
   CacheIndexEntry(const CacheIndexEntry& aOther)
   {
@@ -965,17 +965,17 @@ private:
 
     void OnDiskConsumption(int64_t aSize)
     {
       mSize = aSize;
       NS_DispatchToMainThread(this);
     }
 
   private:
-    DiskConsumptionObserver(nsWeakPtr const &aWeakObserver)
+    explicit DiskConsumptionObserver(nsWeakPtr const &aWeakObserver)
       : mObserver(aWeakObserver) { }
     virtual ~DiskConsumptionObserver() { }
 
     NS_IMETHODIMP Run()
     {
       MOZ_ASSERT(NS_IsMainThread());
 
       nsCOMPtr<nsICacheStorageConsumptionObserver> observer =
@@ -993,17 +993,17 @@ private:
   };
 
   // List of async observers that want to get disk consumption information
   nsTArray<nsRefPtr<DiskConsumptionObserver> > mDiskConsumptionObservers;
 };
 
 class CacheIndexAutoLock {
 public:
-  CacheIndexAutoLock(CacheIndex *aIndex)
+  explicit CacheIndexAutoLock(CacheIndex *aIndex)
     : mIndex(aIndex)
     , mLocked(true)
   {
     mIndex->Lock();
   }
   ~CacheIndexAutoLock()
   {
     if (mLocked) {
@@ -1025,17 +1025,17 @@ public:
 
 private:
   nsRefPtr<CacheIndex> mIndex;
   bool mLocked;
 };
 
 class CacheIndexAutoUnlock {
 public:
-  CacheIndexAutoUnlock(CacheIndex *aIndex)
+  explicit CacheIndexAutoUnlock(CacheIndex *aIndex)
     : mIndex(aIndex)
     , mLocked(false)
   {
     mIndex->Unlock();
   }
   ~CacheIndexAutoUnlock()
   {
     if (!mLocked) {
--- a/netwerk/cache2/CacheStorage.h
+++ b/netwerk/cache2/CacheStorage.h
@@ -29,17 +29,17 @@ class CacheEntryTable : public TCacheEnt
 {
 public:
   enum EType
   {
     MEMORY_ONLY,
     ALL_ENTRIES
   };
 
-  CacheEntryTable(EType aType) : mType(aType) { }
+  explicit CacheEntryTable(EType aType) : mType(aType) { }
   EType Type() const
   {
     return mType;
   }
 private:
   EType const mType;
   CacheEntryTable() MOZ_DELETE;
 };
--- a/netwerk/cache2/CacheStorageService.cpp
+++ b/netwerk/cache2/CacheStorageService.cpp
@@ -352,17 +352,17 @@ public:
   }
 
 private:
   // Invokes OnCacheEntryInfo callback for each single found entry.
   // There is one instance of this class per one entry.
   class OnCacheEntryInfoRunnable : public nsRunnable
   {
   public:
-    OnCacheEntryInfoRunnable(WalkDiskCacheRunnable* aWalker)
+    explicit OnCacheEntryInfoRunnable(WalkDiskCacheRunnable* aWalker)
       : mWalker(aWalker)
     {
     }
 
     NS_IMETHODIMP Run()
     {
       MOZ_ASSERT(NS_IsMainThread());
 
@@ -1493,17 +1493,17 @@ CacheStorageService::CheckStorageEntry(C
 
 namespace { // anon
 
 class CacheEntryDoomByKeyCallback : public CacheFileIOListener
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
 
-  CacheEntryDoomByKeyCallback(nsICacheEntryDoomCallback* aCallback)
+  explicit CacheEntryDoomByKeyCallback(nsICacheEntryDoomCallback* aCallback)
     : mCallback(aCallback) { }
 
 private:
   virtual ~CacheEntryDoomByKeyCallback();
 
   NS_IMETHOD OnFileOpened(CacheFileHandle *aHandle, nsresult aResult) { return NS_OK; }
   NS_IMETHOD OnDataWritten(CacheFileHandle *aHandle, const char *aBuf, nsresult aResult) { return NS_OK; }
   NS_IMETHOD OnDataRead(CacheFileHandle *aHandle, char *aBuf, nsresult aResult) { return NS_OK; }
@@ -1683,17 +1683,17 @@ CacheStorageService::DoomStorageEntries(
   // cache any 'doom' or 'evict' function ensures that the entry or entries
   // being doomed is/are not accessible after the function returns.  So there is
   // probably no need for a callback - has no meaning.  But for compatibility
   // with the old cache that is still in the tree we keep the API similar to be
   // able to make tests as well as other consumers work for now.
   class Callback : public nsRunnable
   {
   public:
-    Callback(nsICacheEntryDoomCallback* aCallback) : mCallback(aCallback) { }
+    explicit Callback(nsICacheEntryDoomCallback* aCallback) : mCallback(aCallback) { }
     NS_IMETHODIMP Run()
     {
       mCallback->OnCacheEntryDoomed(NS_OK);
       return NS_OK;
     }
     nsCOMPtr<nsICacheEntryDoomCallback> mCallback;
   };
 
--- a/netwerk/cache2/CacheStorageService.h
+++ b/netwerk/cache2/CacheStorageService.h
@@ -54,17 +54,17 @@ protected:
     // which of the two disk and memory pools count this consumption at.
     MEMORY_ONLY = 1 << 0,
     // Prevent reports of this consumer at all, used for disk data chunks since
     // we throw them away as soon as the entry is not used by any consumer and
     // don't want to make them wipe the whole pool out during their short life.
     DONT_REPORT = 1 << 1
   };
 
-  CacheMemoryConsumer(uint32_t aFlags);
+  explicit CacheMemoryConsumer(uint32_t aFlags);
   ~CacheMemoryConsumer() { DoMemoryReport(0); }
   void DoMemoryReport(uint32_t aCurrentSize);
 };
 
 class CacheStorageService : public nsICacheStorageService
                           , public nsIMemoryReporter
                           , public nsITimerCallback
 {
@@ -301,17 +301,17 @@ private:
   {
   public:
     enum EType
     {
       DISK,
       MEMORY,
     } mType;
 
-    MemoryPool(EType aType);
+    explicit MemoryPool(EType aType);
     ~MemoryPool();
 
     nsTArray<nsRefPtr<CacheEntry> > mFrecencyArray;
     nsTArray<nsRefPtr<CacheEntry> > mExpirationArray;
     mozilla::Atomic<uint32_t> mMemorySize;
 
     bool OnMemoryConsumptionChange(uint32_t aSavedMemorySize,
                                    uint32_t aCurrentMemoryConsumption);
--- a/netwerk/cache2/OldWrappers.cpp
+++ b/netwerk/cache2/OldWrappers.cpp
@@ -34,17 +34,17 @@ namespace net {
 namespace { // anon
 
 // Fires the doom callback back on the main thread
 // after the cache I/O thread is looped.
 
 class DoomCallbackSynchronizer : public nsRunnable
 {
 public:
-  DoomCallbackSynchronizer(nsICacheEntryDoomCallback* cb) : mCB(cb)
+  explicit DoomCallbackSynchronizer(nsICacheEntryDoomCallback* cb) : mCB(cb)
   {
     MOZ_COUNT_CTOR(DoomCallbackSynchronizer);
   }
   nsresult Dispatch();
 
 private:
   virtual ~DoomCallbackSynchronizer()
   {
@@ -87,17 +87,17 @@ NS_IMETHODIMP DoomCallbackSynchronizer::
 
 // Receives doom callback from the old API and forwards to the new API
 
 class DoomCallbackWrapper : public nsICacheListener
 {
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSICACHELISTENER
 
-  DoomCallbackWrapper(nsICacheEntryDoomCallback* cb) : mCB(cb)
+  explicit DoomCallbackWrapper(nsICacheEntryDoomCallback* cb) : mCB(cb)
   {
     MOZ_COUNT_CTOR(DoomCallbackWrapper);
   }
 
 private:
   virtual ~DoomCallbackWrapper()
   {
     MOZ_COUNT_DTOR(DoomCallbackWrapper);
@@ -493,17 +493,17 @@ NS_IMETHODIMP _OldCacheEntryWrapper::Has
 namespace { // anon
 
 class MetaDataVisitorWrapper : public nsICacheMetaDataVisitor
 {
   virtual ~MetaDataVisitorWrapper() {}
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSICACHEMETADATAVISITOR
-  MetaDataVisitorWrapper(nsICacheEntryMetaDataVisitor* cb) : mCB(cb) {}
+  explicit MetaDataVisitorWrapper(nsICacheEntryMetaDataVisitor* cb) : mCB(cb) {}
   nsCOMPtr<nsICacheEntryMetaDataVisitor> mCB;
 };
 
 NS_IMPL_ISUPPORTS(MetaDataVisitorWrapper, nsICacheMetaDataVisitor)
 
 NS_IMETHODIMP
 MetaDataVisitorWrapper::VisitMetaDataElement(char const * key,
                                              char const * value,
--- a/netwerk/cache2/OldWrappers.h
+++ b/netwerk/cache2/OldWrappers.h
@@ -40,18 +40,18 @@ public:
   NS_IMETHOD Recreate(bool, nsICacheEntry**);
   NS_IMETHOD GetDataSize(int64_t *size);
   NS_IMETHOD OpenInputStream(int64_t offset, nsIInputStream * *_retval);
   NS_IMETHOD OpenOutputStream(int64_t offset, nsIOutputStream * *_retval);
   NS_IMETHOD MaybeMarkValid();
   NS_IMETHOD HasWriteAccess(bool aWriteOnly, bool *aWriteAccess);
   NS_IMETHOD VisitMetaData(nsICacheEntryMetaDataVisitor*);
 
-  _OldCacheEntryWrapper(nsICacheEntryDescriptor* desc);
-  _OldCacheEntryWrapper(nsICacheEntryInfo* info);
+  explicit _OldCacheEntryWrapper(nsICacheEntryDescriptor* desc);
+  explicit _OldCacheEntryWrapper(nsICacheEntryInfo* info);
 
 private:
   virtual ~_OldCacheEntryWrapper();
 
   _OldCacheEntryWrapper() MOZ_DELETE;
   nsICacheEntryDescriptor* mOldDesc; // ref holded in mOldInfo
   nsCOMPtr<nsICacheEntryInfo> mOldInfo;
 };
@@ -157,17 +157,17 @@ private:
 
 class _OldGetDiskConsumption : public nsRunnable,
                                public nsICacheVisitor
 {
 public:
   static nsresult Get(nsICacheStorageConsumptionObserver* aCallback);
 
 private:
-  _OldGetDiskConsumption(nsICacheStorageConsumptionObserver* aCallback);
+  explicit _OldGetDiskConsumption(nsICacheStorageConsumptionObserver* aCallback);
   virtual ~_OldGetDiskConsumption() {}
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSICACHEVISITOR
   NS_DECL_NSIRUNNABLE
 
   nsCOMPtr<nsICacheStorageConsumptionObserver> mCallback;
   int64_t mSize;
 };
--- a/netwerk/cookie/nsCookieService.cpp
+++ b/netwerk/cookie/nsCookieService.cpp
@@ -352,17 +352,17 @@ LogSuccess(bool aSetCookie, nsIURI *aHos
 /******************************************************************************
  * DBListenerErrorHandler impl:
  * Parent class for our async storage listeners that handles the logging of
  * errors.
  ******************************************************************************/
 class DBListenerErrorHandler : public mozIStorageStatementCallback
 {
 protected:
-  DBListenerErrorHandler(DBState* dbState) : mDBState(dbState) { }
+  explicit DBListenerErrorHandler(DBState* dbState) : mDBState(dbState) { }
   nsRefPtr<DBState> mDBState;
   virtual const char *GetOpType() = 0;
 
 public:
   NS_IMETHOD HandleError(mozIStorageError* aError)
   {
     int32_t result = -1;
     aError->GetResult(&result);
@@ -392,17 +392,17 @@ class InsertCookieDBListener MOZ_FINAL :
 private:
   virtual const char *GetOpType() { return "INSERT"; }
 
   ~InsertCookieDBListener() {}
 
 public:
   NS_DECL_ISUPPORTS
 
-  InsertCookieDBListener(DBState* dbState) : DBListenerErrorHandler(dbState) { }
+  explicit InsertCookieDBListener(DBState* dbState) : DBListenerErrorHandler(dbState) { }
   NS_IMETHOD HandleResult(mozIStorageResultSet*)
   {
     NS_NOTREACHED("Unexpected call to InsertCookieDBListener::HandleResult");
     return NS_OK;
   }
   NS_IMETHOD HandleCompletion(uint16_t aReason)
   {
     // If we were rebuilding the db and we succeeded, make our corruptFlag say
@@ -428,17 +428,17 @@ class UpdateCookieDBListener MOZ_FINAL :
 private:
   virtual const char *GetOpType() { return "UPDATE"; }
 
   ~UpdateCookieDBListener() {}
 
 public:
   NS_DECL_ISUPPORTS
 
-  UpdateCookieDBListener(DBState* dbState) : DBListenerErrorHandler(dbState) { }
+  explicit UpdateCookieDBListener(DBState* dbState) : DBListenerErrorHandler(dbState) { }
   NS_IMETHOD HandleResult(mozIStorageResultSet*)
   {
     NS_NOTREACHED("Unexpected call to UpdateCookieDBListener::HandleResult");
     return NS_OK;
   }
   NS_IMETHOD HandleCompletion(uint16_t aReason)
   {
     return NS_OK;
@@ -456,17 +456,17 @@ class RemoveCookieDBListener MOZ_FINAL :
 private:
   virtual const char *GetOpType() { return "REMOVE"; }
 
   ~RemoveCookieDBListener() {}
 
 public:
   NS_DECL_ISUPPORTS
 
-  RemoveCookieDBListener(DBState* dbState) : DBListenerErrorHandler(dbState) { }
+  explicit RemoveCookieDBListener(DBState* dbState) : DBListenerErrorHandler(dbState) { }
   NS_IMETHOD HandleResult(mozIStorageResultSet*)
   {
     NS_NOTREACHED("Unexpected call to RemoveCookieDBListener::HandleResult");
     return NS_OK;
   }
   NS_IMETHOD HandleCompletion(uint16_t aReason)
   {
     return NS_OK;
@@ -485,17 +485,17 @@ private:
   virtual const char *GetOpType() { return "READ"; }
   bool mCanceled;
 
   ~ReadCookieDBListener() {}
 
 public:
   NS_DECL_ISUPPORTS
 
-  ReadCookieDBListener(DBState* dbState)
+  explicit ReadCookieDBListener(DBState* dbState)
     : DBListenerErrorHandler(dbState)
     , mCanceled(false)
   {
   }
 
   void Cancel() { mCanceled = true; }
 
   NS_IMETHOD HandleResult(mozIStorageResultSet *aResult)
@@ -561,17 +561,17 @@ NS_IMPL_ISUPPORTS(ReadCookieDBListener, 
  * Static mozIStorageCompletionCallback used to notify when the database is
  * successfully closed.
  ******************************************************************************/
 class CloseCookieDBListener MOZ_FINAL :  public mozIStorageCompletionCallback
 {
   ~CloseCookieDBListener() {}
 
 public:
-  CloseCookieDBListener(DBState* dbState) : mDBState(dbState) { }
+  explicit CloseCookieDBListener(DBState* dbState) : mDBState(dbState) { }
   nsRefPtr<DBState> mDBState;
   NS_DECL_ISUPPORTS
 
   NS_IMETHOD Complete(nsresult, nsISupports*)
   {
     gCookieService->HandleDBClosed(mDBState);
     return NS_OK;
   }
@@ -1479,17 +1479,17 @@ RebuildDBCallback(nsCookieEntry *aEntry,
   mozIStorageBindingParamsArray* paramsArray =
     static_cast<mozIStorageBindingParamsArray*>(aArg);
 
   const nsCookieEntry::ArrayType &cookies = aEntry->GetCookies();
   for (nsCookieEntry::IndexType i = 0; i < cookies.Length(); ++i) {
     nsCookie* cookie = cookies[i];
 
     if (!cookie->IsSession()) {
-      bindCookieParameters(paramsArray, aEntry, cookie);
+      bindCookieParameters(paramsArray, nsCookieKey(aEntry), cookie);
     }
   }
 
   return PL_DHASH_NEXT;
 }
 
 void
 nsCookieService::RebuildCorruptDB(DBState* aDBState)
--- a/netwerk/cookie/nsCookieService.h
+++ b/netwerk/cookie/nsCookieService.h
@@ -61,17 +61,17 @@ public:
   {}
 
   nsCookieKey(const nsCString &baseDomain, uint32_t appId, bool inBrowser)
     : mBaseDomain(baseDomain)
     , mAppId(appId)
     , mInBrowserElement(inBrowser)
   {}
 
-  nsCookieKey(KeyTypePointer other)
+  explicit nsCookieKey(KeyTypePointer other)
     : mBaseDomain(other->mBaseDomain)
     , mAppId(other->mAppId)
     , mInBrowserElement(other->mInBrowserElement)
   {}
 
   nsCookieKey(KeyType other)
     : mBaseDomain(other.mBaseDomain)
     , mAppId(other.mAppId)
@@ -117,17 +117,17 @@ public:
 // TODO: why aren't we using nsClassHashTable<nsCookieKey, ArrayType>?
 class nsCookieEntry : public nsCookieKey
 {
   public:
     // Hash methods
     typedef nsTArray< nsRefPtr<nsCookie> > ArrayType;
     typedef ArrayType::index_type IndexType;
 
-    nsCookieEntry(KeyTypePointer aKey)
+    explicit nsCookieEntry(KeyTypePointer aKey)
      : nsCookieKey(aKey)
     {}
 
     nsCookieEntry(const nsCookieEntry& toCopy)
     {
       // if we end up here, things will break. nsTHashtable shouldn't
       // allow this, since we set ALLOW_MEMMOVE to true.
       NS_NOTREACHED("nsCookieEntry copy constructor is forbidden!");
--- a/netwerk/dns/nsDNSService2.cpp
+++ b/netwerk/dns/nsDNSService2.cpp
@@ -52,17 +52,17 @@ static const char kPrefDnsNotifyResoluti
 //-----------------------------------------------------------------------------
 
 class nsDNSRecord : public nsIDNSRecord
 {
 public:
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSIDNSRECORD
 
-    nsDNSRecord(nsHostRecord *hostRecord)
+    explicit nsDNSRecord(nsHostRecord *hostRecord)
         : mHostRecord(hostRecord)
         , mIter(nullptr)
         , mIterGenCnt(-1)
         , mDone(false) {}
 
 private:
     virtual ~nsDNSRecord() {}
 
@@ -337,17 +337,17 @@ nsDNSAsyncRequest::Cancel(nsresult reaso
     return NS_OK;
 }
 
 //-----------------------------------------------------------------------------
 
 class nsDNSSyncRequest : public nsResolveHostCallback
 {
 public:
-    nsDNSSyncRequest(PRMonitor *mon)
+    explicit nsDNSSyncRequest(PRMonitor *mon)
         : mDone(false)
         , mStatus(NS_OK)
         , mMonitor(mon) {}
     virtual ~nsDNSSyncRequest() {}
 
     void OnLookupComplete(nsHostResolver *, nsHostRecord *, nsresult);
     bool EqualsAsyncListener(nsIDNSListener *aListener);
     size_t SizeOfIncludingThis(mozilla::MallocSizeOf) const;
--- a/netwerk/dns/nsEffectiveTLDService.h
+++ b/netwerk/dns/nsEffectiveTLDService.h
@@ -31,17 +31,17 @@ struct ETLDEntry {
 class nsDomainEntry : public PLDHashEntryHdr
 {
   friend class nsEffectiveTLDService;
 public:
   // Hash methods
   typedef const char* KeyType;
   typedef const char* KeyTypePointer;
 
-  nsDomainEntry(KeyTypePointer aEntry)
+  explicit nsDomainEntry(KeyTypePointer aEntry)
   {
   }
 
   nsDomainEntry(const nsDomainEntry& toCopy)
   {
     // if we end up here, things will break. nsTHashtable shouldn't
     // allow this, since we set ALLOW_MEMMOVE to true.
     NS_NOTREACHED("nsDomainEntry copy constructor is forbidden!");
--- a/netwerk/dns/nsHostResolver.h
+++ b/netwerk/dns/nsHostResolver.h
@@ -101,17 +101,17 @@ private:
     bool    usingAnyThread; /* true if off queue and contributing to mActiveAnyThreadCount */
     bool    mDoomed; /* explicitly expired */
 
     // a list of addresses associated with this record that have been reported
     // as unusable. the list is kept as a set of strings to make it independent
     // of gencnt.
     nsTArray<nsCString> mBlacklistedItems;
 
-    nsHostRecord(const nsHostKey *key);           /* use Create() instead */
+    explicit nsHostRecord(const nsHostKey *key);           /* use Create() instead */
    ~nsHostRecord();
 };
 
 /**
  * ResolveHost callback object.  It's PRCList members are used by
  * the nsHostResolver and should not be used by anything else.
  */
 class NS_NO_VTABLE nsResolveHostCallback : public PRCList
@@ -234,18 +234,18 @@ public:
         RES_SPECULATE     = 1 << 4,
         //RES_DISABLE_IPV6 = 1 << 5, // Not used
         RES_OFFLINE       = 1 << 6
     };
 
     size_t SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const;
 
 private:
-    nsHostResolver(uint32_t maxCacheEntries = 50, uint32_t maxCacheLifetime = 60,
-                   uint32_t lifetimeGracePeriod = 0);
+   explicit nsHostResolver(uint32_t maxCacheEntries = 50, uint32_t maxCacheLifetime = 60,
+                            uint32_t lifetimeGracePeriod = 0);
    ~nsHostResolver();
 
     nsresult Init();
     nsresult IssueLookup(nsHostRecord *);
     bool     GetHostToLookup(nsHostRecord **m);
     void     OnLookupComplete(nsHostRecord *, nsresult, mozilla::net::AddrInfo *);
     void     DeQueue(PRCList &aQ, nsHostRecord **aResult);
     void     ClearPendingQueue(PRCList *aPendingQueue);
--- a/netwerk/ipc/RemoteOpenFileParent.h
+++ b/netwerk/ipc/RemoteOpenFileParent.h
@@ -13,17 +13,17 @@
 #include "nsIFileURL.h"
 
 namespace mozilla {
 namespace net {
 
 class RemoteOpenFileParent : public PRemoteOpenFileParent
 {
 public:
-  RemoteOpenFileParent(nsIFileURL* aURI)
+  explicit RemoteOpenFileParent(nsIFileURL* aURI)
   : mURI(aURI)
   {}
 
   virtual void ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
 
   bool OpenSendCloseDelete();
 
 private:
--- a/netwerk/protocol/data/nsDataChannel.h
+++ b/netwerk/protocol/data/nsDataChannel.h
@@ -9,17 +9,17 @@
 #define nsDataChannel_h___
 
 #include "nsBaseChannel.h"
 
 class nsIInputStream;
 
 class nsDataChannel : public nsBaseChannel {
 public:
-    nsDataChannel(nsIURI *uri) {
+    explicit nsDataChannel(nsIURI *uri) {
         SetURI(uri);
     }
 
 protected:
     virtual nsresult OpenContentStream(bool async, nsIInputStream **result,
                                        nsIChannel** channel);
 };
 
--- a/netwerk/protocol/file/nsFileChannel.h
+++ b/netwerk/protocol/file/nsFileChannel.h
@@ -15,17 +15,17 @@ class nsFileChannel : public nsBaseChann
                     , public nsIFileChannel
                     , public nsIUploadChannel
 {
 public: 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIFILECHANNEL
   NS_DECL_NSIUPLOADCHANNEL
 
-  nsFileChannel(nsIURI *uri);
+  explicit nsFileChannel(nsIURI *uri);
 
 protected:
   ~nsFileChannel();
 
   // Called to construct a blocking file input stream for the given file.  This
   // method also returns a best guess at the content-type for the data stream.
   // NOTE: If the channel has a type hint set, contentType will be left
   // untouched. The caller should not use it in that case.
--- a/netwerk/protocol/ftp/FTPChannelChild.cpp
+++ b/netwerk/protocol/ftp/FTPChannelChild.cpp
@@ -539,17 +539,17 @@ FTPChannelChild::DoFailedAsyncOpen(const
 
   if (mIPCOpen)
     Send__delete__(this);
 }
 
 class FTPFlushedForDiversionEvent : public ChannelEvent
 {
  public:
-  FTPFlushedForDiversionEvent(FTPChannelChild* aChild)
+  explicit FTPFlushedForDiversionEvent(FTPChannelChild* aChild)
   : mChild(aChild)
   {
     MOZ_RELEASE_ASSERT(aChild);
   }
 
   void Run()
   {
     mChild->FlushedForDiversion();
@@ -596,17 +596,17 @@ FTPChannelChild::RecvDivertMessages()
     return false;
   }
   return true;
 }
 
 class FTPDeleteSelfEvent : public ChannelEvent
 {
  public:
-  FTPDeleteSelfEvent(FTPChannelChild* aChild)
+  explicit FTPDeleteSelfEvent(FTPChannelChild* aChild)
   : mChild(aChild) {}
   void Run() { mChild->DoDeleteSelf(); }
  private:
   FTPChannelChild* mChild;
 };
 
 bool
 FTPChannelChild::RecvDeleteSelf()
--- a/netwerk/protocol/ftp/nsFTPChannel.cpp
+++ b/netwerk/protocol/ftp/nsFTPChannel.cpp
@@ -131,17 +131,17 @@ nsFtpChannel::OnCallbacksChanged()
 
 namespace {
 
 class FTPEventSinkProxy MOZ_FINAL : public nsIFTPEventSink
 {
     ~FTPEventSinkProxy() {}
 
 public:
-    FTPEventSinkProxy(nsIFTPEventSink* aTarget)
+    explicit FTPEventSinkProxy(nsIFTPEventSink* aTarget)
         : mTarget(aTarget)
         , mTargetThread(do_GetCurrentThread())
     { }
         
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSIFTPEVENTSINK
 
     class OnFTPControlLogRunnable : public nsRunnable
--- a/netwerk/protocol/http/Http2Session.h
+++ b/netwerk/protocol/http/Http2Session.h
@@ -36,17 +36,17 @@ class Http2Session MOZ_FINAL : public AS
 
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSAHTTPTRANSACTION
   NS_DECL_NSAHTTPCONNECTION(mConnection)
   NS_DECL_NSAHTTPSEGMENTREADER
   NS_DECL_NSAHTTPSEGMENTWRITER
 
-  Http2Session(nsISocketTransport *);
+  explicit Http2Session(nsISocketTransport *);
 
   bool AddStream(nsAHttpTransaction *, int32_t,
                  bool, nsIInterfaceRequestor *);
   bool CanReuse() { return !mShouldGoAway && !mClosed; }
   bool RoomForMoreStreams();
 
   // When the connection is active this is called up to once every 1 second
   // return the interval (in seconds) that the connection next wants to
--- a/netwerk/protocol/http/HttpChannelChild.cpp
+++ b/netwerk/protocol/http/HttpChannelChild.cpp
@@ -723,17 +723,17 @@ HttpChannelChild::DoNotifyListenerCleanu
 {
   if (mIPCOpen)
     PHttpChannelChild::Send__delete__(this);
 }
 
 class DeleteSelfEvent : public ChannelEvent
 {
  public:
-  DeleteSelfEvent(HttpChannelChild* child) : mChild(child) {}
+  explicit DeleteSelfEvent(HttpChannelChild* child) : mChild(child) {}
   void Run() { mChild->DeleteSelf(); }
  private:
   HttpChannelChild* mChild;
 };
 
 bool
 HttpChannelChild::RecvDeleteSelf()
 {
@@ -847,17 +847,17 @@ HttpChannelChild::Redirect1Begin(const u
 
   if (NS_FAILED(rv))
     OnRedirectVerifyCallback(rv);
 }
 
 class Redirect3Event : public ChannelEvent
 {
  public:
-  Redirect3Event(HttpChannelChild* child) : mChild(child) {}
+  explicit Redirect3Event(HttpChannelChild* child) : mChild(child) {}
   void Run() { mChild->Redirect3Complete(); }
  private:
   HttpChannelChild* mChild;
 };
 
 bool
 HttpChannelChild::RecvRedirect3Complete()
 {
@@ -867,17 +867,17 @@ HttpChannelChild::RecvRedirect3Complete(
     Redirect3Complete();
   }
   return true;
 }
 
 class HttpFlushedForDiversionEvent : public ChannelEvent
 {
  public:
-  HttpFlushedForDiversionEvent(HttpChannelChild* aChild)
+  explicit HttpFlushedForDiversionEvent(HttpChannelChild* aChild)
   : mChild(aChild)
   {
     MOZ_RELEASE_ASSERT(aChild);
   }
 
   void Run()
   {
     mChild->FlushedForDiversion();
--- a/netwerk/protocol/http/HttpChannelParentListener.h
+++ b/netwerk/protocol/http/HttpChannelParentListener.h
@@ -27,17 +27,17 @@ class HttpChannelParentListener : public
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIINTERFACEREQUESTOR
   NS_DECL_NSICHANNELEVENTSINK
   NS_DECL_NSIREDIRECTRESULTLISTENER
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSISTREAMLISTENER
 
-  HttpChannelParentListener(HttpChannelParent* aInitialChannel);
+  explicit HttpChannelParentListener(HttpChannelParent* aInitialChannel);
 
   // For channel diversion from child to parent.
   nsresult DivertTo(nsIStreamListener *aListener);
   nsresult SuspendForDiversion();
 
 private:
   virtual ~HttpChannelParentListener();
 
--- a/netwerk/protocol/http/SpdySession3.h
+++ b/netwerk/protocol/http/SpdySession3.h
@@ -35,17 +35,17 @@ class SpdySession3 MOZ_FINAL : public AS
 
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSAHTTPTRANSACTION
   NS_DECL_NSAHTTPCONNECTION(mConnection)
   NS_DECL_NSAHTTPSEGMENTREADER
   NS_DECL_NSAHTTPSEGMENTWRITER
 
-  SpdySession3(nsISocketTransport *);
+  explicit SpdySession3(nsISocketTransport *);
 
   bool AddStream(nsAHttpTransaction *, int32_t,
                  bool, nsIInterfaceRequestor *);
   bool CanReuse() { return !mShouldGoAway && !mClosed; }
   bool RoomForMoreStreams();
 
   // When the connection is active this is called up to once every 1 second
   // return the interval (in seconds) that the connection next wants to
--- a/netwerk/protocol/http/SpdySession31.h
+++ b/netwerk/protocol/http/SpdySession31.h
@@ -34,17 +34,17 @@ class SpdySession31 MOZ_FINAL : public A
 
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSAHTTPTRANSACTION
   NS_DECL_NSAHTTPCONNECTION(mConnection)
   NS_DECL_NSAHTTPSEGMENTREADER
   NS_DECL_NSAHTTPSEGMENTWRITER
 
-  SpdySession31(nsISocketTransport *);
+  explicit SpdySession31(nsISocketTransport *);
 
   bool AddStream(nsAHttpTransaction *, int32_t,
                  bool, nsIInterfaceRequestor *);
   bool CanReuse() { return !mShouldGoAway && !mClosed; }
   bool RoomForMoreStreams();
 
   // When the connection is active this is called up to once every 1 second
   // return the interval (in seconds) that the connection next wants to
--- a/netwerk/protocol/http/TunnelUtils.cpp
+++ b/netwerk/protocol/http/TunnelUtils.cpp
@@ -912,17 +912,17 @@ TLSFilterTransaction::QuerySpdyConnectTr
 
 class SocketTransportShim : public nsISocketTransport
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSITRANSPORT
   NS_DECL_NSISOCKETTRANSPORT
 
-  SocketTransportShim(nsISocketTransport *aWrapped)
+  explicit SocketTransportShim(nsISocketTransport *aWrapped)
     : mWrapped(aWrapped)
   {};
 
 private:
   virtual ~SocketTransportShim() {};
 
   nsCOMPtr<nsISocketTransport> mWrapped;
 };
@@ -931,17 +931,17 @@ class OutputStreamShim : public nsIAsync
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIOUTPUTSTREAM
   NS_DECL_NSIASYNCOUTPUTSTREAM
 
   friend class SpdyConnectTransaction;
 
-  OutputStreamShim(SpdyConnectTransaction *aTrans)
+  explicit OutputStreamShim(SpdyConnectTransaction *aTrans)
     : mCallback(nullptr)
     , mStatus(NS_OK)
   {
     mWeakTrans = do_GetWeakReference(aTrans);
   }
 
 private:
   virtual ~OutputStreamShim() {};
@@ -955,17 +955,17 @@ class InputStreamShim : public nsIAsyncI
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIINPUTSTREAM
   NS_DECL_NSIASYNCINPUTSTREAM
 
   friend class SpdyConnectTransaction;
 
-  InputStreamShim(SpdyConnectTransaction *aTrans)
+  explicit InputStreamShim(SpdyConnectTransaction *aTrans)
     : mCallback(nullptr)
     , mStatus(NS_OK)
   {
     mWeakTrans = do_GetWeakReference(aTrans);
   }
 
 private:
   virtual ~InputStreamShim() {};
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -149,17 +149,17 @@ WillRedirect(const nsHttpResponseHead * 
            response->PeekHeader(nsHttp::Location);
 }
 
 } // unnamed namespace
 
 class AutoRedirectVetoNotifier
 {
 public:
-    AutoRedirectVetoNotifier(nsHttpChannel* channel) : mChannel(channel)
+    explicit AutoRedirectVetoNotifier(nsHttpChannel* channel) : mChannel(channel)
     {
       if (mChannel->mHasAutoRedirectVetoNotifier) {
         MOZ_CRASH("Nested AutoRedirectVetoNotifier on the stack");
         mChannel = nullptr;
         return;
       }
 
       mChannel->mHasAutoRedirectVetoNotifier = true;
--- a/netwerk/protocol/http/nsHttpTransaction.cpp
+++ b/netwerk/protocol/http/nsHttpTransaction.cpp
@@ -1738,17 +1738,17 @@ nsHttpTransaction::ReleaseBlockingTransa
 }
 
 //-----------------------------------------------------------------------------
 // nsHttpTransaction deletion event
 //-----------------------------------------------------------------------------
 
 class DeleteHttpTransaction : public nsRunnable {
 public:
-    DeleteHttpTransaction(nsHttpTransaction *trans)
+    explicit DeleteHttpTransaction(nsHttpTransaction *trans)
         : mTrans(trans)
     {}
 
     NS_IMETHOD Run()
     {
         delete mTrans;
         return NS_OK;
     }
--- a/netwerk/protocol/websocket/WebSocketChannelChild.cpp
+++ b/netwerk/protocol/websocket/WebSocketChannelChild.cpp
@@ -78,17 +78,17 @@ WebSocketChannelChild::ReleaseIPDLRefere
   NS_ABORT_IF_FALSE(mIPCOpen, "Attempt to release nonexistent IPDL reference");
   mIPCOpen = false;
   Release();
 }
 
 class WrappedChannelEvent : public nsRunnable
 {
 public:
-  WrappedChannelEvent(ChannelEvent *aChannelEvent)
+  explicit WrappedChannelEvent(ChannelEvent *aChannelEvent)
     : mChannelEvent(aChannelEvent)
   {
     MOZ_RELEASE_ASSERT(aChannelEvent);
   }
   NS_IMETHOD Run()
   {
     mChannelEvent->Run();
     return NS_OK;
--- a/netwerk/protocol/websocket/WebSocketChannelChild.h
+++ b/netwerk/protocol/websocket/WebSocketChannelChild.h
@@ -16,17 +16,17 @@ namespace net {
 
 class ChannelEvent;
 class ChannelEventQueue;
 
 class WebSocketChannelChild : public BaseWebSocketChannel,
                               public PWebSocketChild
 {
  public:
-  WebSocketChannelChild(bool aSecure);
+  explicit WebSocketChannelChild(bool aSecure);
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSITHREADRETARGETABLEREQUEST
 
   // nsIWebSocketChannel methods BaseWebSocketChannel didn't implement for us
   //
   NS_IMETHOD AsyncOpen(nsIURI *aURI, const nsACString &aOrigin,
                        nsIWebSocketListener *aListener, nsISupports *aContext);
--- a/netwerk/protocol/wyciwyg/nsWyciwygChannel.cpp
+++ b/netwerk/protocol/wyciwyg/nsWyciwygChannel.cpp
@@ -26,17 +26,17 @@
 #include "mozilla/DebugOnly.h"
 #include "mozilla/unused.h"
 
 typedef mozilla::net::LoadContextInfo LoadContextInfo;
 
 // Must release mChannel on the main thread
 class nsWyciwygAsyncEvent : public nsRunnable {
 public:
-  nsWyciwygAsyncEvent(nsWyciwygChannel *aChannel) : mChannel(aChannel) {}
+  explicit nsWyciwygAsyncEvent(nsWyciwygChannel *aChannel) : mChannel(aChannel) {}
 
   ~nsWyciwygAsyncEvent()
   {
     nsCOMPtr<nsIThread> thread = do_GetMainThread();
     NS_WARN_IF_FALSE(thread, "Couldn't get the main thread!");
     if (thread) {
       nsIWyciwygChannel *chan = static_cast<nsIWyciwygChannel *>(mChannel);
       mozilla::unused << mChannel.forget();
@@ -44,17 +44,17 @@ public:
     }
   }
 protected:
   nsRefPtr<nsWyciwygChannel> mChannel;
 };
 
 class nsWyciwygSetCharsetandSourceEvent : public nsWyciwygAsyncEvent {
 public:
-  nsWyciwygSetCharsetandSourceEvent(nsWyciwygChannel *aChannel)
+  explicit nsWyciwygSetCharsetandSourceEvent(nsWyciwygChannel *aChannel)
     : nsWyciwygAsyncEvent(aChannel) {}
 
   NS_IMETHOD Run()
   {
     mChannel->SetCharsetAndSourceInternal();
     return NS_OK;
   }
 };
--- a/netwerk/sctp/datachannel/DataChannel.h
+++ b/netwerk/sctp/datachannel/DataChannel.h
@@ -109,17 +109,17 @@ public:
   public:
     MOZ_DECLARE_REFCOUNTED_TYPENAME(DataChannelConnection::DataConnectionListener)
     virtual ~DataConnectionListener() {}
 
     // Called when a new DataChannel has been opened by the other side.
     virtual void NotifyDataChannel(already_AddRefed<DataChannel> channel) = 0;
   };
 
-  DataChannelConnection(DataConnectionListener *listener);
+  explicit DataChannelConnection(DataConnectionListener *listener);
 
   bool Init(unsigned short aPort, uint16_t aNumStreams, bool aUsingDtls);
   void Destroy(); // So we can spawn refs tied to runnables in shutdown
   // Finish Destroy on STS to avoid SCTP race condition with ABORT from far end
   void DestroyOnSTS(struct socket *aMasterSocket,
                     struct socket *aSocket);
 
 #ifdef ALLOW_DIRECT_SCTP_LISTEN_CONNECT
--- a/netwerk/socket/nsSOCKSSocketProvider.h
+++ b/netwerk/socket/nsSOCKSSocketProvider.h
@@ -16,17 +16,17 @@ enum {
 };
 
 class nsSOCKSSocketProvider : public nsISocketProvider
 {
 public:
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSISOCKETPROVIDER
 
-    nsSOCKSSocketProvider(uint32_t version) : mVersion(version) {}
+    explicit nsSOCKSSocketProvider(uint32_t version) : mVersion(version) {}
 
     static nsresult CreateV4(nsISupports *, REFNSIID aIID, void **aResult);
     static nsresult CreateV5(nsISupports *, REFNSIID aIID, void **aResult);
 
 private:
     virtual ~nsSOCKSSocketProvider() {}
 
     uint32_t mVersion; // NS_SOCKS_VERSION_4 or 5
--- a/netwerk/wifi/nsWifiMonitor.h
+++ b/netwerk/wifi/nsWifiMonitor.h
@@ -33,17 +33,17 @@ extern PRLogModuleInfo *gWifiMonitorLog;
 class nsWifiAccessPoint;
 
 #define kDefaultWifiScanInterval 5 /* seconds */
 
 class nsWifiListener
 {
  public:
 
-  nsWifiListener(nsMainThreadPtrHolder<nsIWifiListener>* aListener)
+  explicit nsWifiListener(nsMainThreadPtrHolder<nsIWifiListener>* aListener)
   {
     mListener = aListener;
     mHasSentData = false;
   }
   ~nsWifiListener() {}
 
   nsMainThreadPtrHandle<nsIWifiListener> mListener;
   bool mHasSentData;