Bug 1061056 - Fix more bad implicit constructors in WebRTC; r=jesup
authorEhsan Akhgari <ehsan@mozilla.com>
Mon, 01 Sep 2014 17:43:17 -0400
changeset 202903 e8298383cfe75bd03bb6f4102e81e9df976471fa
parent 202902 8106c19ed3b064bb99bef163a4b7b91c262cfeaa
child 202904 0c07ef5e87c084c4bbf81ee6f71cc0f4ca03e49c
push id8485
push userphilringnalda@gmail.com
push dateTue, 02 Sep 2014 05:54:21 +0000
treeherderfx-team@c360f3d1c00d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs1061056
milestone34.0a1
Bug 1061056 - Fix more bad implicit constructors in WebRTC; r=jesup
media/mtransport/test/runnable_utils_unittest.cpp
media/mtransport/test/sockettransportservice_unittest.cpp
media/mtransport/test/transport_unittests.cpp
media/webrtc/signaling/src/common/Wrapper.h
media/webrtc/signaling/src/media-conduit/MediaConduitInterface.h
media/webrtc/signaling/src/media/CSFAudioControlWrapper.h
media/webrtc/signaling/src/media/CSFVideoControlWrapper.h
media/webrtc/signaling/src/mediapipeline/MediaPipeline.h
media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.h
media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.h
media/webrtc/signaling/src/softphonewrapper/CC_SIPCCCall.h
media/webrtc/signaling/src/softphonewrapper/CC_SIPCCCallInfo.h
media/webrtc/signaling/src/softphonewrapper/CC_SIPCCCallServerInfo.h
media/webrtc/signaling/src/softphonewrapper/CC_SIPCCDevice.h
media/webrtc/signaling/src/softphonewrapper/CC_SIPCCDeviceInfo.h
media/webrtc/signaling/src/softphonewrapper/CC_SIPCCFeatureInfo.h
media/webrtc/signaling/src/softphonewrapper/CC_SIPCCLine.h
media/webrtc/signaling/src/softphonewrapper/CC_SIPCCLineInfo.h
media/webrtc/signaling/test/FakeMediaStreams.h
media/webrtc/signaling/test/signaling_unittests.cpp
--- a/media/mtransport/test/runnable_utils_unittest.cpp
+++ b/media/mtransport/test/runnable_utils_unittest.cpp
@@ -39,27 +39,27 @@ namespace {
 
 class Destructor {
  private:
   ~Destructor() {
     std::cerr << "Destructor called" << std::endl;
     *destroyed_ = true;
   }
  public:
-  Destructor(bool* destroyed) : destroyed_(destroyed) {}
+  explicit Destructor(bool* destroyed) : destroyed_(destroyed) {}
 
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(Destructor)
 
  private:
   bool *destroyed_;
 };
 
 class TargetClass {
  public:
-  TargetClass(int *ran) : ran_(ran) {}
+  explicit TargetClass(int *ran) : ran_(ran) {}
 
   void m1(int x) {
     std::cerr << __FUNCTION__ << " " << x << std::endl;
     *ran_ = 1;
   }
 
   void m2(int x, int y) {
     std::cerr << __FUNCTION__ << " " << x << " " << y << std::endl;
--- a/media/mtransport/test/sockettransportservice_unittest.cpp
+++ b/media/mtransport/test/sockettransportservice_unittest.cpp
@@ -73,46 +73,46 @@ class SocketTransportServiceTest : publi
   PRFileDesc *writepipe_;
   bool registered_;
 };
 
 
 // Received an event.
 class EventReceived : public nsRunnable {
 public:
-  EventReceived(SocketTransportServiceTest *test) :
+  explicit EventReceived(SocketTransportServiceTest *test) :
       test_(test) {}
 
   NS_IMETHOD Run() {
     test_->ReceiveEvent();
     return NS_OK;
   }
 
   SocketTransportServiceTest *test_;
 };
 
 
 // Register our listener on the socket
 class RegisterEvent : public nsRunnable {
 public:
-  RegisterEvent(SocketTransportServiceTest *test) :
+  explicit RegisterEvent(SocketTransportServiceTest *test) :
       test_(test) {}
 
   NS_IMETHOD Run() {
     test_->RegisterHandler();
     return NS_OK;
   }
 
   SocketTransportServiceTest *test_;
 };
 
 
 class SocketHandler : public nsASocketHandler {
  public:
-  SocketHandler(SocketTransportServiceTest *test) : test_(test) {
+  explicit SocketHandler(SocketTransportServiceTest *test) : test_(test) {
   }
 
   void OnSocketReady(PRFileDesc *fd, int16_t outflags) {
     unsigned char buf[1600];
 
     int32_t rv;
     rv = PR_Recv(fd, buf, sizeof(buf), 0, PR_INTERVAL_NO_WAIT);
     if (rv > 0) {
--- a/media/mtransport/test/transport_unittests.cpp
+++ b/media/mtransport/test/transport_unittests.cpp
@@ -329,17 +329,17 @@ class DtlsInspectorInjector : public Dtl
   bool injected_;
   UniquePtr<unsigned char[]> data_;
   size_t len_;
 };
 
 // Make a copy of the first instance of a message.
 class DtlsInspectorRecordHandshakeMessage : public DtlsRecordInspector {
  public:
-  DtlsInspectorRecordHandshakeMessage(uint8_t handshake_type)
+  explicit DtlsInspectorRecordHandshakeMessage(uint8_t handshake_type)
       : handshake_type_(handshake_type),
         buffer_() {}
 
   virtual void OnRecord(TransportLayer* layer,
                         uint8_t content_type,
                         const unsigned char *data, size_t len) {
     // Only do this once.
     if (buffer_.len()) {
--- a/media/webrtc/signaling/src/common/Wrapper.h
+++ b/media/webrtc/signaling/src/common/Wrapper.h
@@ -64,17 +64,17 @@ public:
   }
 
 private:
   PRLock *lock_;
 };
 
 class AutoLockNSPR {
 public:
-  AutoLockNSPR(LockNSPR& lock) : lock_(lock) {
+  explicit AutoLockNSPR(LockNSPR& lock) : lock_(lock) {
     lock_.Acquire();
   }
   ~AutoLockNSPR() {
     lock_.Release();
   }
 
 private:
   LockNSPR& lock_;
--- a/media/webrtc/signaling/src/media-conduit/MediaConduitInterface.h
+++ b/media/webrtc/signaling/src/media-conduit/MediaConduitInterface.h
@@ -49,17 +49,17 @@ public:
 
 /**
  * This class wraps image object for VideoRenderer::RenderVideoFrame()
  * callback implementation to use for rendering.
  */
 class ImageHandle
 {
 public:
-  ImageHandle(layers::Image* image) : mImage(image) {}
+  explicit ImageHandle(layers::Image* image) : mImage(image) {}
 
   const RefPtr<layers::Image>& GetImage() const { return mImage; }
 
 private:
   RefPtr<layers::Image> mImage;
 };
 
 /**
--- a/media/webrtc/signaling/src/media/CSFAudioControlWrapper.h
+++ b/media/webrtc/signaling/src/media/CSFAudioControlWrapper.h
@@ -11,17 +11,17 @@
 namespace CSF
 {
         DECLARE_NS_PTR(AudioControlWrapper)
 	class ECC_API AudioControlWrapper : public AudioControl
 	{
 	public:
 		// device names are in UTF-8 encoding
 
-		AudioControlWrapper(AudioControl * audioControl){_realAudioControl = audioControl;};
+		explicit AudioControlWrapper(AudioControl * audioControl){_realAudioControl = audioControl;};
 		virtual std::vector<std::string> getRecordingDevices();
 		virtual std::vector<std::string> getPlayoutDevices();
 
 		virtual std::string getRecordingDevice();
 		virtual std::string getPlayoutDevice();
 
 		virtual bool setRecordingDevice( const std::string& name );
 		virtual bool setPlayoutDevice( const std::string& name );
--- a/media/webrtc/signaling/src/media/CSFVideoControlWrapper.h
+++ b/media/webrtc/signaling/src/media/CSFVideoControlWrapper.h
@@ -16,17 +16,17 @@
 namespace CSF
 {
     DECLARE_NS_PTR(VideoControlWrapper)
     typedef void *VideoWindowHandle;
 
 	class ECC_API VideoControlWrapper : public VideoControl
 	{
 	public:
-		VideoControlWrapper(VideoControl * videoControl){_realVideoControl = videoControl;};
+		explicit VideoControlWrapper(VideoControl * videoControl){_realVideoControl = videoControl;};
 
 		virtual void setVideoMode( bool enable );
 
 		// window type is platform-specific
 		virtual void setPreviewWindow( VideoWindowHandle window, int top, int left, int bottom, int right, RenderScaling style );
 		virtual void showPreviewWindow( bool show );
 
 		// device names are in UTF-8 encoding
--- a/media/webrtc/signaling/src/mediapipeline/MediaPipeline.h
+++ b/media/webrtc/signaling/src/mediapipeline/MediaPipeline.h
@@ -338,31 +338,31 @@ class TrackAddedCallback {
   virtual ~TrackAddedCallback() {}
 };
 
 class GenericReceiveListener;
 
 class GenericReceiveCallback : public TrackAddedCallback
 {
  public:
-  GenericReceiveCallback(GenericReceiveListener* listener)
+  explicit GenericReceiveCallback(GenericReceiveListener* listener)
     : listener_(listener) {}
 
   void TrackAdded(TrackTicks time) {
     listener_->SetPlayedTicks(time);
   }
 
  private:
   RefPtr<GenericReceiveListener> listener_;
 };
 
 class ConduitDeleteEvent: public nsRunnable
 {
 public:
-  ConduitDeleteEvent(TemporaryRef<MediaSessionConduit> aConduit) :
+  explicit ConduitDeleteEvent(TemporaryRef<MediaSessionConduit> aConduit) :
     mConduit(aConduit) {}
 
   /* we exist solely to proxy release of the conduit */
   NS_IMETHOD Run() { return NS_OK; }
 private:
   RefPtr<MediaSessionConduit> mConduit;
 };
 
@@ -430,17 +430,17 @@ public:
   virtual nsresult ReplaceTrack(DOMMediaStream *domstream,
                                 TrackID track_id);
 
 
   // Separate class to allow ref counting
   class PipelineListener : public MediaStreamDirectListener {
    friend class MediaPipelineTransmit;
    public:
-    PipelineListener(const RefPtr<MediaSessionConduit>& conduit)
+    explicit PipelineListener(const RefPtr<MediaSessionConduit>& conduit)
       : conduit_(conduit),
         track_id_(TRACK_INVALID),
         mMutex("MediaPipelineTransmit::PipelineListener"),
         track_id_external_(TRACK_INVALID),
         active_(false),
         enabled_(false),
         direct_connect_(false),
         samples_10ms_buffer_(nullptr),
@@ -687,17 +687,17 @@ class MediaPipelineReceiveVideo : public
     stream_ = nullptr;
   }
 
   virtual nsresult Init() MOZ_OVERRIDE;
 
  private:
   class PipelineRenderer : public VideoRenderer {
    public:
-    PipelineRenderer(MediaPipelineReceiveVideo *pipeline) :
+    explicit PipelineRenderer(MediaPipelineReceiveVideo *pipeline) :
       pipeline_(pipeline) {}
 
     void Detach() { pipeline_ = nullptr; }
 
     // Implement VideoRenderer
     virtual void FrameSizeChange(unsigned int width,
                                  unsigned int height,
                                  unsigned int number_of_streams) {
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.h
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.h
@@ -30,17 +30,17 @@ namespace dom {
 class WebrtcGlobalInformation;
 }
 
 // Unit-test helper, because cc_media_options_t is hard to forward-declare
 
 class SipccOfferOptions {
 public:
   SipccOfferOptions();
-  SipccOfferOptions(const dom::RTCOfferOptions &aOther);
+  explicit SipccOfferOptions(const dom::RTCOfferOptions &aOther);
   cc_media_options_t* build() const;
 protected:
   cc_media_options_t mOptions;
 };
 }
 
 namespace sipcc {
 
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.h
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.h
@@ -52,17 +52,17 @@ namespace sipcc {
 class PeerConnectionImpl;
 class PeerConnectionMedia;
 
 /* Temporary for providing audio data */
 class Fake_AudioGenerator {
  public:
   typedef mozilla::DOMMediaStream DOMMediaStream;
 
-Fake_AudioGenerator(DOMMediaStream* aStream) : mStream(aStream), mCount(0) {
+  explicit Fake_AudioGenerator(DOMMediaStream* aStream) : mStream(aStream), mCount(0) {
     mTimer = do_CreateInstance("@mozilla.org/timer;1");
     MOZ_ASSERT(mTimer);
 
     // Make a track
     mozilla::AudioSegment *segment = new mozilla::AudioSegment();
     mStream->GetStream()->AsSourceStream()->AddTrack(1, 16000, 0, segment);
 
     // Set the timer
@@ -94,17 +94,17 @@ Fake_AudioGenerator(DOMMediaStream* aStr
 
 /* Temporary for providing video data */
 #ifdef MOZILLA_INTERNAL_API
 class Fake_VideoGenerator {
  public:
   typedef mozilla::DOMMediaStream DOMMediaStream;
   typedef mozilla::gfx::IntSize IntSize;
 
-  Fake_VideoGenerator(DOMMediaStream* aStream) {
+  explicit Fake_VideoGenerator(DOMMediaStream* aStream) {
     mStream = aStream;
     mCount = 0;
     mTimer = do_CreateInstance("@mozilla.org/timer;1");
     MOZ_ASSERT(mTimer);
 
     // Make a track
     mozilla::VideoSegment *segment = new mozilla::VideoSegment();
     mStream->GetStream()->AsSourceStream()->AddTrack(1, mozilla::USECS_PER_S, 0, segment);
@@ -284,17 +284,17 @@ public:
  private:
   std::map<int, bool> mTypes;
 };
 
 class PeerConnectionMedia : public sigslot::has_slots<> {
   ~PeerConnectionMedia() {}
 
  public:
-  PeerConnectionMedia(PeerConnectionImpl *parent);
+  explicit PeerConnectionMedia(PeerConnectionImpl *parent);
 
   nsresult Init(const std::vector<mozilla::NrIceStunServer>& stun_servers,
                 const std::vector<mozilla::NrIceTurnServer>& turn_servers);
   // WARNING: This destroys the object!
   void SelfDestruct();
 
   mozilla::RefPtr<mozilla::NrIceCtx> ice_ctx() const { return mIceCtx; }
 
--- a/media/webrtc/signaling/src/softphonewrapper/CC_SIPCCCall.h
+++ b/media/webrtc/signaling/src/softphonewrapper/CC_SIPCCCall.h
@@ -59,17 +59,17 @@ namespace CSF
 
 	DECLARE_NS_PTR(CC_SIPCCCall);
     class CC_SIPCCCall : public CC_Call
     {
 
     CSF_DECLARE_WRAP(CC_SIPCCCall, cc_call_handle_t);
     private:
         cc_call_handle_t callHandle;
-        CC_SIPCCCall (cc_call_handle_t aCallHandle);
+        explicit CC_SIPCCCall (cc_call_handle_t aCallHandle);
         CC_SIPCCCallMediaDataPtr  pMediaData;
         std::string peerconnection;  // The peerconnection handle
 
     public:
         virtual inline std::string toString() {
             std::string result;
             char tmpString[11];
             csf_sprintf(tmpString, sizeof(tmpString), "%X", callHandle);
--- a/media/webrtc/signaling/src/softphonewrapper/CC_SIPCCCallInfo.h
+++ b/media/webrtc/signaling/src/softphonewrapper/CC_SIPCCCallInfo.h
@@ -20,17 +20,17 @@ namespace CSF
 
 	DECLARE_NS_PTR(CC_SIPCCCallInfo);
     class CC_SIPCCCallInfo : public CC_CallInfo
     {
 
     private:
     	cc_callinfo_ref_t callinfo_ref;
 
-        CC_SIPCCCallInfo (cc_callinfo_ref_t callinfo);
+        explicit CC_SIPCCCallInfo (cc_callinfo_ref_t callinfo);
 
         CSF_DECLARE_WRAP(CC_SIPCCCallInfo, cc_callinfo_ref_t);
 
         CC_SIPCCCallMediaDataPtr  pMediaData;
 
     public:
         ~CC_SIPCCCallInfo ();
 
--- a/media/webrtc/signaling/src/softphonewrapper/CC_SIPCCCallServerInfo.h
+++ b/media/webrtc/signaling/src/softphonewrapper/CC_SIPCCCallServerInfo.h
@@ -12,17 +12,17 @@
 namespace CSF
 {
 	DECLARE_NS_PTR(CC_SIPCCCallServerInfo);
     class CC_SIPCCCallServerInfo : public CC_CallServerInfo
     {
     private:
         cc_callserver_ref_t callserverinfo_ref;
 
-        CC_SIPCCCallServerInfo (cc_callserver_ref_t aCallServerInfo);
+        explicit CC_SIPCCCallServerInfo (cc_callserver_ref_t aCallServerInfo);
 
         CSF_DECLARE_WRAP(CC_SIPCCCallServerInfo, cc_callserver_ref_t);
 
     public:
         ~CC_SIPCCCallServerInfo();
 
     public:
         virtual std::string getCallServerName();
--- a/media/webrtc/signaling/src/softphonewrapper/CC_SIPCCDevice.h
+++ b/media/webrtc/signaling/src/softphonewrapper/CC_SIPCCDevice.h
@@ -13,17 +13,17 @@ namespace CSF
 {
 	DECLARE_NS_PTR(CC_SIPCCDevice);
     class CC_SIPCCDevice : public CC_Device
     {
     private:
     	CSF_DECLARE_WRAP(CC_SIPCCDevice, cc_device_handle_t);
         static CC_DevicePtr create (const std::string & phoneConfigFileNameStr);
 
-        CC_SIPCCDevice (cc_device_handle_t aDeviceHandle);
+        explicit CC_SIPCCDevice (cc_device_handle_t aDeviceHandle);
 
     public:
 
         static CC_DevicePtr createDevice ();
 
         virtual CC_DeviceInfoPtr getDeviceInfo ();
         virtual std::string toString();
 
--- a/media/webrtc/signaling/src/softphonewrapper/CC_SIPCCDeviceInfo.h
+++ b/media/webrtc/signaling/src/softphonewrapper/CC_SIPCCDeviceInfo.h
@@ -10,17 +10,17 @@
 #include "common/Wrapper.h"
 
 namespace CSF
 {
 	DECLARE_NS_PTR(CC_SIPCCDeviceInfo);
     class CC_SIPCCDeviceInfo : public CC_DeviceInfo
     {
     private:
-        CC_SIPCCDeviceInfo (cc_deviceinfo_ref_t aDeviceInfo);
+        explicit CC_SIPCCDeviceInfo (cc_deviceinfo_ref_t aDeviceInfo);
         cc_deviceinfo_ref_t deviceinfo_ref;
 
         CSF_DECLARE_WRAP(CC_SIPCCDeviceInfo, cc_deviceinfo_ref_t);
 
     public:
         ~CC_SIPCCDeviceInfo();
 
     public:
--- a/media/webrtc/signaling/src/softphonewrapper/CC_SIPCCFeatureInfo.h
+++ b/media/webrtc/signaling/src/softphonewrapper/CC_SIPCCFeatureInfo.h
@@ -11,17 +11,17 @@
 
 namespace CSF
 {
 	DECLARE_NS_PTR(CC_SIPCCFeatureInfo);
     class CC_SIPCCFeatureInfo : public CC_FeatureInfo
     {
     private:
         cc_featureinfo_ref_t featureinfo_ref;
-        CC_SIPCCFeatureInfo (cc_featureinfo_ref_t aFeatureInfo);
+        explicit CC_SIPCCFeatureInfo (cc_featureinfo_ref_t aFeatureInfo);
         CSF_DECLARE_WRAP(CC_SIPCCFeatureInfo, cc_featureinfo_ref_t);
 
     public:
         ~CC_SIPCCFeatureInfo();
 
     public:
         virtual cc_int32_t getButton();
         virtual cc_int32_t getFeatureID();
--- a/media/webrtc/signaling/src/softphonewrapper/CC_SIPCCLine.h
+++ b/media/webrtc/signaling/src/softphonewrapper/CC_SIPCCLine.h
@@ -15,17 +15,17 @@ namespace CSF
 {
 	DECLARE_NS_PTR(CC_SIPCCLine);
     class CC_SIPCCLine : public CC_Line
     {
     private:
         CSF_DECLARE_WRAP(CC_SIPCCLine, cc_lineid_t);
 
         cc_lineid_t lineId;
-        CC_SIPCCLine (cc_lineid_t aLineId) : lineId(aLineId) { }
+        explicit CC_SIPCCLine (cc_lineid_t aLineId) : lineId(aLineId) { }
 
     public:
         virtual std::string toString() {
             std::string result;
             char tmpString[11];
             csf_sprintf(tmpString, sizeof(tmpString), "%X", lineId);
             result = tmpString;
             return result;
--- a/media/webrtc/signaling/src/softphonewrapper/CC_SIPCCLineInfo.h
+++ b/media/webrtc/signaling/src/softphonewrapper/CC_SIPCCLineInfo.h
@@ -14,17 +14,17 @@ namespace CSF
 	DECLARE_NS_PTR(CC_SIPCCLineInfo);
     class CC_SIPCCLineInfo : public CC_LineInfo
     {
     public:
         ~CC_SIPCCLineInfo ();
 
     private:
         cc_lineinfo_ref_t lineinfo;
-        CC_SIPCCLineInfo (cc_lineinfo_ref_t lineinfo);
+        explicit CC_SIPCCLineInfo (cc_lineinfo_ref_t lineinfo);
         CSF_DECLARE_WRAP(CC_SIPCCLineInfo, cc_lineinfo_ref_t);
 
     public:
         virtual std::string getName();
         virtual std::string getNumber();
         virtual cc_uint32_t getButton();
         virtual cc_line_feature_t getLineType();
         virtual bool getRegState();
--- a/media/webrtc/signaling/test/FakeMediaStreams.h
+++ b/media/webrtc/signaling/test/FakeMediaStreams.h
@@ -99,18 +99,18 @@ class Fake_MediaStream {
  protected:
   std::set<Fake_MediaStreamListener *> mListeners;
   mozilla::Mutex mMutex;  // Lock to prevent the listener list from being modified while
                           // executing Periodic().
 };
 
 class Fake_MediaPeriodic : public nsITimerCallback {
 public:
-Fake_MediaPeriodic(Fake_MediaStream *aStream) : mStream(aStream),
-                                                mCount(0) {}
+  explicit Fake_MediaPeriodic(Fake_MediaStream *aStream) : mStream(aStream),
+                                                           mCount(0) {}
   void Detach() {
     mStream = nullptr;
   }
 
   int GetTimesCalled() { return mCount; }
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSITIMERCALLBACK
@@ -212,17 +212,17 @@ class Fake_SourceMediaStream : public Fa
   nsCOMPtr<nsITimer> mTimer;
 };
 
 class Fake_DOMMediaStream;
 
 class Fake_MediaStreamTrack : public mozilla::RefCounted<Fake_MediaStreamTrack>
 {
 public:
-  Fake_MediaStreamTrack(bool aIsVideo) : mIsVideo (aIsVideo) {}
+  explicit Fake_MediaStreamTrack(bool aIsVideo) : mIsVideo (aIsVideo) {}
   mozilla::TrackID GetTrackID() { return mIsVideo ? 1 : 0; }
   Fake_DOMMediaStream *GetStream() { return nullptr; }
   const Fake_MediaStreamTrack* AsVideoStreamTrack() const
   {
     return mIsVideo? this : nullptr;
   }
   const Fake_MediaStreamTrack* AsAudioStreamTrack() const
   {
@@ -236,17 +236,17 @@ class Fake_DOMMediaStream : public nsIDO
 {
 protected:
   virtual ~Fake_DOMMediaStream() {
     // Note: memory leak
     mMediaStream->Stop();
   }
 
 public:
-  Fake_DOMMediaStream(Fake_MediaStream *stream = nullptr)
+  explicit Fake_DOMMediaStream(Fake_MediaStream *stream = nullptr)
     : mMediaStream(stream? stream : new Fake_MediaStream())
     , mVideoTrack(new Fake_MediaStreamTrack(true))
     , mAudioTrack(new Fake_MediaStreamTrack(false)) {}
 
   NS_DECL_THREADSAFE_ISUPPORTS
 
   static already_AddRefed<Fake_DOMMediaStream>
   CreateSourceStream(nsIDOMWindow* aWindow, uint32_t aHintContents) {
--- a/media/webrtc/signaling/test/signaling_unittests.cpp
+++ b/media/webrtc/signaling/test/signaling_unittests.cpp
@@ -522,17 +522,17 @@ TestObserver::OnAddIceCandidateError(uin
   std::cout << name << ": onAddIceCandidateError = " << code
             << " (" << message << ")" << std::endl;
   return NS_OK;
 }
 
 class ParsedSDP {
  public:
 
-  ParsedSDP(const std::string &sdp)
+  explicit ParsedSDP(const std::string &sdp)
   {
     Parse(sdp);
   }
 
   void DeleteLines(const std::string &objType,
                    uint32_t limit = UINT32_MAX)
   {
     for (auto it = sdp_lines_.begin(); it != sdp_lines_.end() && limit;) {
@@ -679,17 +679,17 @@ class ParsedSDP {
 // This class wraps the PeerConnection object and ensures that all calls
 // into it happen on the main thread.
 class PCDispatchWrapper : public nsSupportsWeakReference
 {
  protected:
   virtual ~PCDispatchWrapper() {}
 
  public:
-  PCDispatchWrapper(sipcc::PeerConnectionImpl *peerConnection) {
+  explicit PCDispatchWrapper(sipcc::PeerConnectionImpl *peerConnection) {
     pc_ = peerConnection;
   }
 
   NS_DECL_THREADSAFE_ISUPPORTS
 
   sipcc::PeerConnectionImpl *pcImpl() const {
     return pc_;
   }
@@ -936,17 +936,17 @@ class PCDispatchWrapper : public nsSuppo
   mozilla::RefPtr<sipcc::PeerConnectionImpl> pc_;
 };
 
 NS_IMPL_ISUPPORTS(PCDispatchWrapper, nsISupportsWeakReference)
 
 
 class SignalingAgent {
  public:
-  SignalingAgent(const std::string &aName,
+  explicit SignalingAgent(const std::string &aName,
     const std::string stun_addr = g_stun_server_address,
     uint16_t stun_port = g_stun_server_port) : pc(nullptr), name(aName) {
     cfg_.addStunServer(stun_addr, stun_port);
 
     sipcc::PeerConnectionImpl *pcImpl =
       sipcc::PeerConnectionImpl::CreatePeerConnection();
     EXPECT_TRUE(pcImpl);
 
@@ -1967,17 +1967,17 @@ static void SetMaxFsFr(nsCOMPtr<nsIPrefB
       prefs,
       "media.navigator.video.max_fr",
       max_fr),
     NS_DISPATCH_SYNC);
 }
 
 class FsFrPrefClearer {
   public:
-    FsFrPrefClearer(nsCOMPtr<nsIPrefBranch> prefs): mPrefs(prefs) {}
+    explicit FsFrPrefClearer(nsCOMPtr<nsIPrefBranch> prefs): mPrefs(prefs) {}
     ~FsFrPrefClearer() {
       gMainThread->Dispatch(
         WrapRunnableNM(FsFrPrefClearer::ClearUserPrefOnMainThread,
           mPrefs,
           "media.navigator.video.max_fs"),
         NS_DISPATCH_SYNC);
       gMainThread->Dispatch(
         WrapRunnableNM(FsFrPrefClearer::ClearUserPrefOnMainThread,