Replace NULL with nullptr or null in webrtc/api/.

BUG=webrtc:7147

Review-Url: https://codereview.webrtc.org/2715103002
Cr-Commit-Position: refs/heads/master@{#16880}
diff --git a/webrtc/api/jsep.h b/webrtc/api/jsep.h
index 5ebf7c1..aa6e9a1 100644
--- a/webrtc/api/jsep.h
+++ b/webrtc/api/jsep.h
@@ -68,8 +68,8 @@
 };
 
 // Creates a IceCandidateInterface based on SDP string.
-// Returns NULL if the sdp string can't be parsed.
-// |error| may be NULL.
+// Returns null if the sdp string can't be parsed.
+// |error| may be null.
 IceCandidateInterface* CreateIceCandidate(const std::string& sdp_mid,
                                           int sdp_mline_index,
                                           const std::string& sdp,
@@ -141,8 +141,8 @@
 };
 
 // Creates a SessionDescriptionInterface based on the SDP string and the type.
-// Returns NULL if the sdp string can't be parsed or the type is unsupported.
-// |error| may be NULL.
+// Returns null if the sdp string can't be parsed or the type is unsupported.
+// |error| may be null.
 SessionDescriptionInterface* CreateSessionDescription(const std::string& type,
                                                       const std::string& sdp,
                                                       SdpParseError* error);
diff --git a/webrtc/api/jsepicecandidate.h b/webrtc/api/jsepicecandidate.h
index a8919e0..3566013 100644
--- a/webrtc/api/jsepicecandidate.h
+++ b/webrtc/api/jsepicecandidate.h
@@ -31,7 +31,7 @@
   JsepIceCandidate(const std::string& sdp_mid, int sdp_mline_index,
                    const cricket::Candidate& candidate);
   ~JsepIceCandidate();
-  // |err| may be NULL.
+  // |err| may be null.
   bool Initialize(const std::string& sdp, SdpParseError* err);
   void SetCandidate(const cricket::Candidate& candidate) {
     candidate_ = candidate;
diff --git a/webrtc/api/jsepsessiondescription.h b/webrtc/api/jsepsessiondescription.h
index b5e1b4f..e4855b9 100644
--- a/webrtc/api/jsepsessiondescription.h
+++ b/webrtc/api/jsepsessiondescription.h
@@ -35,7 +35,7 @@
   explicit JsepSessionDescription(const std::string& type);
   virtual ~JsepSessionDescription();
 
-  // |error| may be NULL.
+  // |error| may be null.
   bool Initialize(const std::string& sdp, SdpParseError* error);
 
   // Takes ownership of |description|.
diff --git a/webrtc/api/mediastreaminterface.h b/webrtc/api/mediastreaminterface.h
index 59ca66c..2d16e52 100644
--- a/webrtc/api/mediastreaminterface.h
+++ b/webrtc/api/mediastreaminterface.h
@@ -260,7 +260,7 @@
   // virtual after it's implemented in chromium.
   virtual bool GetSignalLevel(int* level) { return false; }
 
-  // Get the audio processor used by the audio track. Return NULL if the track
+  // Get the audio processor used by the audio track. Return null if the track
   // does not have any processor.
   // TODO(deadbeef): Make the interface pure virtual.
   virtual rtc::scoped_refptr<AudioProcessorInterface> GetAudioProcessor() {
diff --git a/webrtc/api/notifier.h b/webrtc/api/notifier.h
index 878d01c..d883051 100644
--- a/webrtc/api/notifier.h
+++ b/webrtc/api/notifier.h
@@ -27,7 +27,7 @@
   }
 
   virtual void RegisterObserver(ObserverInterface* observer) {
-    RTC_DCHECK(observer != NULL);
+    RTC_DCHECK(observer != nullptr);
     observers_.push_back(observer);
   }
 
diff --git a/webrtc/api/peerconnectioninterface.h b/webrtc/api/peerconnectioninterface.h
index 69bae29..165f2d5 100644
--- a/webrtc/api/peerconnectioninterface.h
+++ b/webrtc/api/peerconnectioninterface.h
@@ -532,7 +532,7 @@
     return false;
   }
 
-  // Returns pointer to a DtmfSender on success. Otherwise returns NULL.
+  // Returns pointer to a DtmfSender on success. Otherwise returns null.
   //
   // This API is no longer part of the standard; instead DtmfSenders are
   // obtained from RtpSenders. Which is what the implementation does; it finds
@@ -922,8 +922,8 @@
   }
 
   // A video source creator that allows selection of resolution and frame rate.
-  // |constraints| decides video resolution and frame rate but can be NULL.
-  // In the NULL case, use the version above.
+  // |constraints| decides video resolution and frame rate but can be null.
+  // In the null case, use the version above.
   //
   // |constraints| is only used for the invocation of this method, and can
   // safely be destroyed afterwards.
@@ -952,7 +952,7 @@
       const std::string& label,
       VideoTrackSourceInterface* source) = 0;
 
-  // Creates an new AudioTrack. At the moment |source| can be NULL.
+  // Creates an new AudioTrack. At the moment |source| can be null.
   virtual rtc::scoped_refptr<AudioTrackInterface>
       CreateAudioTrack(const std::string& label,
                        AudioSourceInterface* source) = 0;
diff --git a/webrtc/api/proxy.h b/webrtc/api/proxy.h
index 46c424d..862de87 100644
--- a/webrtc/api/proxy.h
+++ b/webrtc/api/proxy.h
@@ -128,7 +128,7 @@
 
   void Invoke(const rtc::Location& posted_from, rtc::Thread* t) {
     if (t->IsCurrent()) {
-      proxy_->OnMessage(NULL);
+      proxy_->OnMessage(nullptr);
     } else {
       e_.reset(new rtc::Event(false, false));
       t->Post(posted_from, this, 0);
@@ -137,7 +137,10 @@
   }
 
  private:
-  void OnMessage(rtc::Message*) { proxy_->OnMessage(NULL); e_->Set(); }
+  void OnMessage(rtc::Message*) {
+    proxy_->OnMessage(nullptr);
+    e_->Set();
+  }
   std::unique_ptr<rtc::Event> e_;
   rtc::MessageHandler* proxy_;
 };
diff --git a/webrtc/api/statstypes.cc b/webrtc/api/statstypes.cc
index 300bb4a..b7459fa 100644
--- a/webrtc/api/statstypes.cc
+++ b/webrtc/api/statstypes.cc
@@ -779,7 +779,7 @@
   return InsertNew(id);
 }
 
-// Looks for a report with the given |id|.  If one is not found, NULL
+// Looks for a report with the given |id|.  If one is not found, null
 // will be returned.
 StatsReport* StatsCollection::Find(const StatsReport::Id& id) {
   RTC_DCHECK(thread_checker_.CalledOnValidThread());
diff --git a/webrtc/api/statstypes.h b/webrtc/api/statstypes.h
index 40d26ab..8ef79d9 100644
--- a/webrtc/api/statstypes.h
+++ b/webrtc/api/statstypes.h
@@ -415,7 +415,7 @@
   StatsReport* FindOrAddNew(const StatsReport::Id& id);
   StatsReport* ReplaceOrAddNew(const StatsReport::Id& id);
 
-  // Looks for a report with the given |id|.  If one is not found, NULL
+  // Looks for a report with the given |id|.  If one is not found, null
   // will be returned.
   StatsReport* Find(const StatsReport::Id& id);