Reformat the WebRTC code base

Running clang-format with chromium's style guide.

The goal is n-fold:
 * providing consistency and readability (that's what code guidelines are for)
 * preventing noise with presubmit checks and git cl format
 * building on the previous point: making it easier to automatically fix format issues
 * you name it

Please consider using git-hyper-blame to ignore this commit.

Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
diff --git a/api/array_view.h b/api/array_view.h
index 4c1fc86..efc642d 100644
--- a/api/array_view.h
+++ b/api/array_view.h
@@ -11,8 +11,8 @@
 #ifndef API_ARRAY_VIEW_H_
 #define API_ARRAY_VIEW_H_
 
-#include <array>
 #include <algorithm>
+#include <array>
 #include <type_traits>
 
 #include "rtc_base/checks.h"
diff --git a/api/audio/audio_frame.cc b/api/audio/audio_frame.cc
index b477a17..75d30b0 100644
--- a/api/audio/audio_frame.cc
+++ b/api/audio/audio_frame.cc
@@ -66,7 +66,8 @@
 }
 
 void AudioFrame::CopyFrom(const AudioFrame& src) {
-  if (this == &src) return;
+  if (this == &src)
+    return;
 
   timestamp_ = src.timestamp_;
   elapsed_time_ms_ = src.elapsed_time_ms_;
@@ -116,7 +117,9 @@
   muted_ = true;
 }
 
-bool AudioFrame::muted() const { return muted_; }
+bool AudioFrame::muted() const {
+  return muted_;
+}
 
 // static
 const int16_t* AudioFrame::empty_data() {
diff --git a/api/audio/audio_frame.h b/api/audio/audio_frame.h
index 39840e5..d80868a 100644
--- a/api/audio/audio_frame.h
+++ b/api/audio/audio_frame.h
@@ -43,11 +43,7 @@
     kMaxDataSizeBytes = kMaxDataSizeSamples * sizeof(int16_t),
   };
 
-  enum VADActivity {
-    kVadActive = 0,
-    kVadPassive = 1,
-    kVadUnknown = 2
-  };
+  enum VADActivity { kVadActive = 0, kVadPassive = 1, kVadUnknown = 2 };
   enum SpeechType {
     kNormalSpeech = 0,
     kPLC = 1,
@@ -66,9 +62,12 @@
   // ResetWithoutMuting() to skip this wasteful zeroing.
   void ResetWithoutMuting();
 
-  void UpdateFrame(uint32_t timestamp, const int16_t* data,
-                   size_t samples_per_channel, int sample_rate_hz,
-                   SpeechType speech_type, VADActivity vad_activity,
+  void UpdateFrame(uint32_t timestamp,
+                   const int16_t* data,
+                   size_t samples_per_channel,
+                   int sample_rate_hz,
+                   SpeechType speech_type,
+                   VADActivity vad_activity,
                    size_t num_channels = 1);
 
   void CopyFrom(const AudioFrame& src);
diff --git a/api/audio/test/audio_frame_unittest.cc b/api/audio/test/audio_frame_unittest.cc
index 2a41e76..b969d90 100644
--- a/api/audio/test/audio_frame_unittest.cc
+++ b/api/audio/test/audio_frame_unittest.cc
@@ -87,9 +87,8 @@
   AudioFrame frame2;
 
   int16_t samples[kNumChannels * kSamplesPerChannel] = {17};
-  frame2.UpdateFrame(kTimestamp, samples, kSamplesPerChannel,
-                     kSampleRateHz, AudioFrame::kPLC, AudioFrame::kVadActive,
-                     kNumChannels);
+  frame2.UpdateFrame(kTimestamp, samples, kSamplesPerChannel, kSampleRateHz,
+                     AudioFrame::kPLC, AudioFrame::kVadActive, kNumChannels);
   frame1.CopyFrom(frame2);
 
   EXPECT_EQ(frame2.timestamp_, frame1.timestamp_);
diff --git a/api/audio_codecs/audio_encoder.h b/api/audio_codecs/audio_encoder.h
index 7ad9ba4..d277a19 100644
--- a/api/audio_codecs/audio_encoder.h
+++ b/api/audio_codecs/audio_encoder.h
@@ -220,9 +220,8 @@
 
   // Provides target audio bitrate and corresponding probing interval of
   // the bandwidth estimator to this encoder to allow it to adapt.
-  virtual void OnReceivedUplinkBandwidth(
-      int target_audio_bitrate_bps,
-      rtc::Optional<int64_t> bwe_period_ms);
+  virtual void OnReceivedUplinkBandwidth(int target_audio_bitrate_bps,
+                                         rtc::Optional<int64_t> bwe_period_ms);
 
   // Provides RTT to this encoder to allow it to adapt.
   virtual void OnReceivedRtt(int rtt_ms);
diff --git a/api/audio_options.h b/api/audio_options.h
index 5d69842..28f03b6 100644
--- a/api/audio_options.h
+++ b/api/audio_options.h
@@ -112,7 +112,7 @@
     ost << ToStringIfSet("residual_echo_detector", residual_echo_detector);
     ost << ToStringIfSet("tx_agc_target_dbov", tx_agc_target_dbov);
     ost << ToStringIfSet("tx_agc_digital_compression_gain",
-        tx_agc_digital_compression_gain);
+                         tx_agc_digital_compression_gain);
     ost << ToStringIfSet("tx_agc_limiter", tx_agc_limiter);
     ost << ToStringIfSet("combined_audio_video_bwe", combined_audio_video_bwe);
     ost << ToStringIfSet("audio_network_adaptor", audio_network_adaptor);
diff --git a/api/candidate.h b/api/candidate.h
index a1f45c2..6e0547b 100644
--- a/api/candidate.h
+++ b/api/candidate.h
@@ -46,14 +46,14 @@
   Candidate(const Candidate&);
   ~Candidate();
 
-  const std::string & id() const { return id_; }
-  void set_id(const std::string & id) { id_ = id; }
+  const std::string& id() const { return id_; }
+  void set_id(const std::string& id) { id_ = id; }
 
   int component() const { return component_; }
   void set_component(int component) { component_ = component; }
 
-  const std::string & protocol() const { return protocol_; }
-  void set_protocol(const std::string & protocol) { protocol_ = protocol; }
+  const std::string& protocol() const { return protocol_; }
+  void set_protocol(const std::string& protocol) { protocol_ = protocol; }
 
   // The protocol used to talk to relay.
   const std::string& relay_protocol() const { return relay_protocol_; }
@@ -61,10 +61,8 @@
     relay_protocol_ = protocol;
   }
 
-  const rtc::SocketAddress & address() const { return address_; }
-  void set_address(const rtc::SocketAddress & address) {
-    address_ = address;
-  }
+  const rtc::SocketAddress& address() const { return address_; }
+  void set_address(const rtc::SocketAddress& address) { address_ = address; }
 
   uint32_t priority() const { return priority_; }
   void set_priority(const uint32_t priority) { priority_ = priority; }
@@ -91,17 +89,17 @@
   }
 
   // TODO(honghaiz): Change to usernameFragment or ufrag.
-  const std::string & username() const { return username_; }
-  void set_username(const std::string & username) { username_ = username; }
+  const std::string& username() const { return username_; }
+  void set_username(const std::string& username) { username_ = username; }
 
-  const std::string & password() const { return password_; }
-  void set_password(const std::string & password) { password_ = password; }
+  const std::string& password() const { return password_; }
+  void set_password(const std::string& password) { password_ = password; }
 
-  const std::string & type() const { return type_; }
-  void set_type(const std::string & type) { type_ = type; }
+  const std::string& type() const { return type_; }
+  void set_type(const std::string& type) { type_ = type; }
 
-  const std::string & network_name() const { return network_name_; }
-  void set_network_name(const std::string & network_name) {
+  const std::string& network_name() const { return network_name_; }
+  void set_network_name(const std::string& network_name) {
     network_name_ = network_name;
   }
 
@@ -127,24 +125,17 @@
   uint16_t network_id() const { return network_id_; }
   void set_network_id(uint16_t network_id) { network_id_ = network_id; }
 
-  const std::string& foundation() const {
-    return foundation_;
-  }
+  const std::string& foundation() const { return foundation_; }
   void set_foundation(const std::string& foundation) {
     foundation_ = foundation;
   }
 
-  const rtc::SocketAddress & related_address() const {
-    return related_address_;
-  }
-  void set_related_address(
-      const rtc::SocketAddress & related_address) {
+  const rtc::SocketAddress& related_address() const { return related_address_; }
+  void set_related_address(const rtc::SocketAddress& related_address) {
     related_address_ = related_address;
   }
   const std::string& tcptype() const { return tcptype_; }
-  void set_tcptype(const std::string& tcptype) {
-    tcptype_ = tcptype;
-  }
+  void set_tcptype(const std::string& tcptype) { tcptype_ = tcptype; }
 
   // The name of the transport channel of this candidate.
   // TODO(phoglund): remove.
@@ -164,13 +155,9 @@
   // given one when looking for a matching candidate to remove.
   bool MatchesForRemoval(const Candidate& c) const;
 
-  std::string ToString() const {
-    return ToStringInternal(false);
-  }
+  std::string ToString() const { return ToStringInternal(false); }
 
-  std::string ToSensitiveString() const {
-    return ToStringInternal(true);
-  }
+  std::string ToSensitiveString() const { return ToStringInternal(true); }
 
   uint32_t GetPriority(uint32_t type_preference,
                        int network_adapter_preference,
diff --git a/api/datachannelinterface.h b/api/datachannelinterface.h
index afeb173..85e6fa6 100644
--- a/api/datachannelinterface.h
+++ b/api/datachannelinterface.h
@@ -61,14 +61,10 @@
 // as binary or text.
 struct DataBuffer {
   DataBuffer(const rtc::CopyOnWriteBuffer& data, bool binary)
-      : data(data),
-        binary(binary) {
-  }
+      : data(data), binary(binary) {}
   // For convenience for unit tests.
   explicit DataBuffer(const std::string& text)
-      : data(text.data(), text.length()),
-        binary(false) {
-  }
+      : data(text.data(), text.length()), binary(false) {}
   size_t size() const { return data.size(); }
 
   rtc::CopyOnWriteBuffer data;
diff --git a/api/dtmfsenderinterface.h b/api/dtmfsenderinterface.h
index 8f0ab71..e61b8ed 100644
--- a/api/dtmfsenderinterface.h
+++ b/api/dtmfsenderinterface.h
@@ -67,7 +67,8 @@
   // If InsertDtmf is called on the same object while an existing task for this
   // object to generate DTMF is still running, the previous task is canceled.
   // Returns true on success and false on failure.
-  virtual bool InsertDtmf(const std::string& tones, int duration,
+  virtual bool InsertDtmf(const std::string& tones,
+                          int duration,
                           int inter_tone_gap) = 0;
 
   // Returns the track given as argument to the constructor. Only exists for
diff --git a/api/fakemetricsobserver.cc b/api/fakemetricsobserver.cc
index beb30c2..cd8de39 100644
--- a/api/fakemetricsobserver.cc
+++ b/api/fakemetricsobserver.cc
@@ -36,7 +36,7 @@
 }
 
 void FakeMetricsObserver::AddHistogramSample(PeerConnectionMetricsName type,
-    int value) {
+                                             int value) {
   RTC_DCHECK(thread_checker_.CalledOnValidThread());
   RTC_DCHECK_EQ(histogram_samples_[type], 0);
   histogram_samples_[type] = value;
diff --git a/api/fakemetricsobserver.h b/api/fakemetricsobserver.h
index 3adc5a6..1f5b704 100644
--- a/api/fakemetricsobserver.h
+++ b/api/fakemetricsobserver.h
@@ -28,8 +28,7 @@
   void IncrementEnumCounter(PeerConnectionEnumCounterType,
                             int counter,
                             int counter_max) override;
-  void AddHistogramSample(PeerConnectionMetricsName type,
-                          int value) override;
+  void AddHistogramSample(PeerConnectionMetricsName type, int value) override;
 
   // Accessors to be used by the tests.
   int GetEnumCounter(PeerConnectionEnumCounterType type, int counter) const;
diff --git a/api/jsep.h b/api/jsep.h
index 8fd2dac..0118490 100644
--- a/api/jsep.h
+++ b/api/jsep.h
@@ -205,9 +205,7 @@
   // is deprecated; in order to let clients remove the old version, it has a
   // default implementation. If both versions are unimplemented, the
   // result will be a runtime error (stack overflow). This is intentional.
-  virtual void OnFailure(RTCError error) {
-    OnFailure(error.message());
-  }
+  virtual void OnFailure(RTCError error) { OnFailure(error.message()); }
   virtual void OnFailure(const std::string& error) {
     OnFailure(RTCError(RTCErrorType::INTERNAL_ERROR, std::string(error)));
   }
diff --git a/api/jsepicecandidate.h b/api/jsepicecandidate.h
index dae6121..4801a04 100644
--- a/api/jsepicecandidate.h
+++ b/api/jsepicecandidate.h
@@ -28,7 +28,8 @@
 class JsepIceCandidate : public IceCandidateInterface {
  public:
   JsepIceCandidate(const std::string& sdp_mid, int sdp_mline_index);
-  JsepIceCandidate(const std::string& sdp_mid, int sdp_mline_index,
+  JsepIceCandidate(const std::string& sdp_mid,
+                   int sdp_mline_index,
                    const cricket::Candidate& candidate);
   ~JsepIceCandidate();
   // |err| may be null.
@@ -39,9 +40,7 @@
 
   virtual std::string sdp_mid() const { return sdp_mid_; }
   virtual int sdp_mline_index() const { return sdp_mline_index_; }
-  virtual const cricket::Candidate& candidate() const {
-    return candidate_;
-  }
+  virtual const cricket::Candidate& candidate() const { return candidate_; }
 
   virtual std::string server_url() const { return candidate_.url(); }
 
@@ -64,9 +63,7 @@
   JsepCandidateCollection(JsepCandidateCollection&& o)
       : candidates_(std::move(o.candidates_)) {}
   ~JsepCandidateCollection();
-  virtual size_t count() const {
-    return candidates_.size();
-  }
+  virtual size_t count() const { return candidates_.size(); }
   virtual bool HasCandidate(const IceCandidateInterface* candidate) const;
   // Adds and takes ownership of the JsepIceCandidate.
   // TODO(deadbeef): Make this use an std::unique_ptr<>, so ownership logic is
diff --git a/api/jsepsessiondescription.h b/api/jsepsessiondescription.h
index 70bb277..d70829e 100644
--- a/api/jsepsessiondescription.h
+++ b/api/jsepsessiondescription.h
@@ -41,8 +41,8 @@
   // TODO(deadbeef): Make this use an std::unique_ptr<>, so ownership logic is
   // more clear.
   bool Initialize(cricket::SessionDescription* description,
-      const std::string& session_id,
-      const std::string& session_version);
+                  const std::string& session_id,
+                  const std::string& session_version);
 
   virtual cricket::SessionDescription* description() {
     return description_.get();
@@ -50,12 +50,8 @@
   virtual const cricket::SessionDescription* description() const {
     return description_.get();
   }
-  virtual std::string session_id() const {
-    return session_id_;
-  }
-  virtual std::string session_version() const {
-    return session_version_;
-  }
+  virtual std::string session_id() const { return session_id_; }
+  virtual std::string session_version() const { return session_version_; }
   virtual SdpType GetType() const { return type_; }
   virtual std::string type() const { return SdpTypeToString(type_); }
   // Allows changing the type. Used for testing.
diff --git a/api/mediaconstraintsinterface.cc b/api/mediaconstraintsinterface.cc
index 8358644..50a26de 100644
--- a/api/mediaconstraintsinterface.cc
+++ b/api/mediaconstraintsinterface.cc
@@ -89,8 +89,7 @@
 const char MediaConstraintsInterface::kMinFrameRate[] = "minFrameRate";
 
 // Audio constraints.
-const char MediaConstraintsInterface::kEchoCancellation[] =
-    "echoCancellation";
+const char MediaConstraintsInterface::kEchoCancellation[] = "echoCancellation";
 const char MediaConstraintsInterface::kGoogEchoCancellation[] =
     "googEchoCancellation";
 const char MediaConstraintsInterface::kExtendedFilterEchoCancellation[] =
@@ -107,8 +106,7 @@
     "googNoiseSuppression2";
 const char MediaConstraintsInterface::kIntelligibilityEnhancer[] =
     "intelligibilityEnhancer";
-const char MediaConstraintsInterface::kHighpassFilter[] =
-    "googHighpassFilter";
+const char MediaConstraintsInterface::kHighpassFilter[] = "googHighpassFilter";
 const char MediaConstraintsInterface::kTypingNoiseDetection[] =
     "googTypingNoiseDetection";
 const char MediaConstraintsInterface::kAudioMirroring[] = "googAudioMirroring";
@@ -125,11 +123,9 @@
     "OfferToReceiveVideo";
 const char MediaConstraintsInterface::kVoiceActivityDetection[] =
     "VoiceActivityDetection";
-const char MediaConstraintsInterface::kIceRestart[] =
-    "IceRestart";
+const char MediaConstraintsInterface::kIceRestart[] = "IceRestart";
 // Google specific constraint for BUNDLE enable/disable.
-const char MediaConstraintsInterface::kUseRtpMux[] =
-    "googUseRtpMUX";
+const char MediaConstraintsInterface::kUseRtpMux[] = "googUseRtpMUX";
 
 // Below constraints should be used during PeerConnection construction.
 const char MediaConstraintsInterface::kEnableDtlsSrtp[] =
@@ -150,11 +146,11 @@
     "googCpuOveruseDetection";
 const char MediaConstraintsInterface::kPayloadPadding[] = "googPayloadPadding";
 
-
 // Set |value| to the value associated with the first appearance of |key|, or
 // return false if |key| is not found.
 bool MediaConstraintsInterface::Constraints::FindFirst(
-    const std::string& key, std::string* value) const {
+    const std::string& key,
+    std::string* value) const {
   for (Constraints::const_iterator iter = begin(); iter != end(); ++iter) {
     if (iter->key == key) {
       *value = iter->value;
@@ -165,7 +161,8 @@
 }
 
 bool FindConstraint(const MediaConstraintsInterface* constraints,
-                    const std::string& key, bool* value,
+                    const std::string& key,
+                    bool* value,
                     size_t* mandatory_constraints) {
   return ::FindConstraint<bool>(constraints, key, value, mandatory_constraints);
 }
@@ -192,9 +189,9 @@
   }
   FindConstraint(constraints, MediaConstraintsInterface::kEnableDscp,
                  &configuration->media_config.enable_dscp, nullptr);
-  FindConstraint(
-      constraints, MediaConstraintsInterface::kCpuOveruseDetection,
-      &configuration->media_config.video.enable_cpu_adaptation, nullptr);
+  FindConstraint(constraints, MediaConstraintsInterface::kCpuOveruseDetection,
+                 &configuration->media_config.video.enable_cpu_adaptation,
+                 nullptr);
   FindConstraint(constraints, MediaConstraintsInterface::kEnableRtpDataChannels,
                  &configuration->enable_rtp_data_channel, nullptr);
   // Find Suspend Below Min Bitrate constraint.
diff --git a/api/mediaconstraintsinterface.h b/api/mediaconstraintsinterface.h
index 90661b8..91043d2 100644
--- a/api/mediaconstraintsinterface.h
+++ b/api/mediaconstraintsinterface.h
@@ -39,8 +39,7 @@
   struct Constraint {
     Constraint() {}
     Constraint(const std::string& key, const std::string value)
-        : key(key), value(value) {
-    }
+        : key(key), value(value) {}
     std::string key;
     std::string value;
   };
@@ -54,12 +53,12 @@
   // Specified by draft-alvestrand-constraints-resolution-00b
   static const char kMinAspectRatio[];  // minAspectRatio
   static const char kMaxAspectRatio[];  // maxAspectRatio
-  static const char kMaxWidth[];  // maxWidth
-  static const char kMinWidth[];  // minWidth
-  static const char kMaxHeight[];  // maxHeight
-  static const char kMinHeight[];  // minHeight
-  static const char kMaxFrameRate[];  // maxFrameRate
-  static const char kMinFrameRate[];  // minFrameRate
+  static const char kMaxWidth[];        // maxWidth
+  static const char kMinWidth[];        // minWidth
+  static const char kMaxHeight[];       // maxHeight
+  static const char kMinHeight[];       // minHeight
+  static const char kMaxFrameRate[];    // maxFrameRate
+  static const char kMinFrameRate[];    // minFrameRate
 
   // Constraint keys used by a local audio source.
   static const char kEchoCancellation[];  // echoCancellation
@@ -68,15 +67,15 @@
   static const char kGoogEchoCancellation[];  // googEchoCancellation
 
   static const char kExtendedFilterEchoCancellation[];  // googEchoCancellation2
-  static const char kDAEchoCancellation[];  // googDAEchoCancellation
-  static const char kAutoGainControl[];  // googAutoGainControl
-  static const char kExperimentalAutoGainControl[];  // googAutoGainControl2
-  static const char kNoiseSuppression[];  // googNoiseSuppression
+  static const char kDAEchoCancellation[];            // googDAEchoCancellation
+  static const char kAutoGainControl[];               // googAutoGainControl
+  static const char kExperimentalAutoGainControl[];   // googAutoGainControl2
+  static const char kNoiseSuppression[];              // googNoiseSuppression
   static const char kExperimentalNoiseSuppression[];  // googNoiseSuppression2
-  static const char kIntelligibilityEnhancer[];  // intelligibilityEnhancer
-  static const char kHighpassFilter[];  // googHighpassFilter
+  static const char kIntelligibilityEnhancer[];       // intelligibilityEnhancer
+  static const char kHighpassFilter[];                // googHighpassFilter
   static const char kTypingNoiseDetection[];  // googTypingNoiseDetection
-  static const char kAudioMirroring[];  // googAudioMirroring
+  static const char kAudioMirroring[];        // googAudioMirroring
   static const char
       kAudioNetworkAdaptorConfig[];  // goodAudioNetworkAdaptorConfig
 
@@ -85,15 +84,15 @@
 
   // Constraint keys for CreateOffer / CreateAnswer
   // Specified by the W3C PeerConnection spec
-  static const char kOfferToReceiveVideo[];  // OfferToReceiveVideo
-  static const char kOfferToReceiveAudio[];  // OfferToReceiveAudio
+  static const char kOfferToReceiveVideo[];     // OfferToReceiveVideo
+  static const char kOfferToReceiveAudio[];     // OfferToReceiveAudio
   static const char kVoiceActivityDetection[];  // VoiceActivityDetection
-  static const char kIceRestart[];  // IceRestart
+  static const char kIceRestart[];              // IceRestart
   // These keys are google specific.
   static const char kUseRtpMux[];  // googUseRtpMUX
 
   // Constraints values.
-  static const char kValueTrue[];  // true
+  static const char kValueTrue[];   // true
   static const char kValueFalse[];  // false
 
   // PeerConnection constraint keys.
@@ -108,12 +107,12 @@
   static const char kEnableIPv6[];  // googIPv6
   // Temporary constraint to enable suspend below min bitrate feature.
   static const char kEnableVideoSuspendBelowMinBitrate[];
-      // googSuspendBelowMinBitrate
+  // googSuspendBelowMinBitrate
   // Constraint to enable combined audio+video bandwidth estimation.
   static const char kCombinedAudioVideoBwe[];  // googCombinedAudioVideoBwe
-  static const char kScreencastMinBitrate[];  // googScreencastMinBitrate
-  static const char kCpuOveruseDetection[];  // googCpuOveruseDetection
-  static const char kPayloadPadding[];  // googPayloadPadding
+  static const char kScreencastMinBitrate[];   // googScreencastMinBitrate
+  static const char kCpuOveruseDetection[];    // googCpuOveruseDetection
+  static const char kPayloadPadding[];         // googPayloadPadding
 
   // The prefix of internal-only constraints whose JS set values should be
   // stripped by Chrome before passed down to Libjingle.
@@ -126,7 +125,8 @@
 };
 
 bool FindConstraint(const MediaConstraintsInterface* constraints,
-                    const std::string& key, bool* value,
+                    const std::string& key,
+                    bool* value,
                     size_t* mandatory_constraints);
 
 bool FindConstraint(const MediaConstraintsInterface* constraints,
diff --git a/api/mediastreaminterface.h b/api/mediastreaminterface.h
index 195ecc6..38ae3fc 100644
--- a/api/mediastreaminterface.h
+++ b/api/mediastreaminterface.h
@@ -60,12 +60,7 @@
 class MediaSourceInterface : public rtc::RefCountInterface,
                              public NotifierInterface {
  public:
-  enum SourceState {
-    kInitializing,
-    kLive,
-    kEnded,
-    kMuted
-  };
+  enum SourceState { kInitializing, kLive, kEnded, kMuted };
 
   virtual SourceState state() const = 0;
 
@@ -116,9 +111,8 @@
 // on the worker thread via a VideoTrack. A custom implementation of a source
 // can inherit AdaptedVideoTrackSource instead of directly implementing this
 // interface.
-class VideoTrackSourceInterface
-    : public MediaSourceInterface,
-      public rtc::VideoSourceInterface<VideoFrame> {
+class VideoTrackSourceInterface : public MediaSourceInterface,
+                                  public rtc::VideoSourceInterface<VideoFrame> {
  public:
   struct Stats {
     // Original size of captured frame, before video adaptation.
@@ -156,9 +150,8 @@
 // PeerConnectionFactory::CreateVideoTrack can be used for creating a VideoTrack
 // that ensures thread safety and that all methods are called on the right
 // thread.
-class VideoTrackInterface
-    : public MediaStreamTrackInterface,
-      public rtc::VideoSourceInterface<VideoFrame> {
+class VideoTrackInterface : public MediaStreamTrackInterface,
+                            public rtc::VideoSourceInterface<VideoFrame> {
  public:
   // Video track content hint, used to override the source is_screencast
   // property.
@@ -276,7 +269,7 @@
  public:
   // TODO(deadbeef): Figure out if the following interface should be const or
   // not.
-  virtual AudioSourceInterface* GetSource() const =  0;
+  virtual AudioSourceInterface* GetSource() const = 0;
 
   // Add/Remove a sink that will receive the audio data from the track.
   virtual void AddSink(AudioTrackSinkInterface* sink) = 0;
@@ -297,10 +290,8 @@
   ~AudioTrackInterface() override = default;
 };
 
-typedef std::vector<rtc::scoped_refptr<AudioTrackInterface> >
-    AudioTrackVector;
-typedef std::vector<rtc::scoped_refptr<VideoTrackInterface> >
-    VideoTrackVector;
+typedef std::vector<rtc::scoped_refptr<AudioTrackInterface> > AudioTrackVector;
+typedef std::vector<rtc::scoped_refptr<VideoTrackInterface> > VideoTrackVector;
 
 // C++ version of https://www.w3.org/TR/mediacapture-streams/#mediastream.
 //
@@ -317,10 +308,10 @@
 
   virtual AudioTrackVector GetAudioTracks() = 0;
   virtual VideoTrackVector GetVideoTracks() = 0;
-  virtual rtc::scoped_refptr<AudioTrackInterface>
-      FindAudioTrack(const std::string& track_id) = 0;
-  virtual rtc::scoped_refptr<VideoTrackInterface>
-      FindVideoTrack(const std::string& track_id) = 0;
+  virtual rtc::scoped_refptr<AudioTrackInterface> FindAudioTrack(
+      const std::string& track_id) = 0;
+  virtual rtc::scoped_refptr<VideoTrackInterface> FindVideoTrack(
+      const std::string& track_id) = 0;
 
   virtual bool AddTrack(AudioTrackInterface* track) = 0;
   virtual bool AddTrack(VideoTrackInterface* track) = 0;
diff --git a/api/mediastreamproxy.h b/api/mediastreamproxy.h
index 3f261db..4c54459 100644
--- a/api/mediastreamproxy.h
+++ b/api/mediastreamproxy.h
@@ -21,22 +21,22 @@
 // TODO(deadbeef): Move this to .cc file and out of api/. What threads methods
 // are called on is an implementation detail.
 BEGIN_SIGNALING_PROXY_MAP(MediaStream)
-  PROXY_SIGNALING_THREAD_DESTRUCTOR()
-  PROXY_CONSTMETHOD0(std::string, id)
-  PROXY_METHOD0(AudioTrackVector, GetAudioTracks)
-  PROXY_METHOD0(VideoTrackVector, GetVideoTracks)
-  PROXY_METHOD1(rtc::scoped_refptr<AudioTrackInterface>,
-                FindAudioTrack,
-                const std::string&)
-  PROXY_METHOD1(rtc::scoped_refptr<VideoTrackInterface>,
-                FindVideoTrack,
-                const std::string&)
-  PROXY_METHOD1(bool, AddTrack, AudioTrackInterface*)
-  PROXY_METHOD1(bool, AddTrack, VideoTrackInterface*)
-  PROXY_METHOD1(bool, RemoveTrack, AudioTrackInterface*)
-  PROXY_METHOD1(bool, RemoveTrack, VideoTrackInterface*)
-  PROXY_METHOD1(void, RegisterObserver, ObserverInterface*)
-  PROXY_METHOD1(void, UnregisterObserver, ObserverInterface*)
+PROXY_SIGNALING_THREAD_DESTRUCTOR()
+PROXY_CONSTMETHOD0(std::string, id)
+PROXY_METHOD0(AudioTrackVector, GetAudioTracks)
+PROXY_METHOD0(VideoTrackVector, GetVideoTracks)
+PROXY_METHOD1(rtc::scoped_refptr<AudioTrackInterface>,
+              FindAudioTrack,
+              const std::string&)
+PROXY_METHOD1(rtc::scoped_refptr<VideoTrackInterface>,
+              FindVideoTrack,
+              const std::string&)
+PROXY_METHOD1(bool, AddTrack, AudioTrackInterface*)
+PROXY_METHOD1(bool, AddTrack, VideoTrackInterface*)
+PROXY_METHOD1(bool, RemoveTrack, AudioTrackInterface*)
+PROXY_METHOD1(bool, RemoveTrack, VideoTrackInterface*)
+PROXY_METHOD1(void, RegisterObserver, ObserverInterface*)
+PROXY_METHOD1(void, UnregisterObserver, ObserverInterface*)
 END_PROXY_MAP()
 
 }  // namespace webrtc
diff --git a/api/mediastreamtrackproxy.h b/api/mediastreamtrackproxy.h
index 57a7695..77b7bad 100644
--- a/api/mediastreamtrackproxy.h
+++ b/api/mediastreamtrackproxy.h
@@ -25,39 +25,39 @@
 // are called on is an implementation detail.
 
 BEGIN_SIGNALING_PROXY_MAP(AudioTrack)
-  PROXY_SIGNALING_THREAD_DESTRUCTOR()
-  PROXY_CONSTMETHOD0(std::string, kind)
-  PROXY_CONSTMETHOD0(std::string, id)
-  PROXY_CONSTMETHOD0(TrackState, state)
-  PROXY_CONSTMETHOD0(bool, enabled)
-  PROXY_CONSTMETHOD0(AudioSourceInterface*, GetSource)
-  PROXY_METHOD1(void, AddSink, AudioTrackSinkInterface*)
-  PROXY_METHOD1(void, RemoveSink, AudioTrackSinkInterface*)
-  PROXY_METHOD1(bool, GetSignalLevel, int*)
-  PROXY_METHOD0(rtc::scoped_refptr<AudioProcessorInterface>, GetAudioProcessor)
-  PROXY_METHOD1(bool, set_enabled, bool)
-  PROXY_METHOD1(void, RegisterObserver, ObserverInterface*)
-  PROXY_METHOD1(void, UnregisterObserver, ObserverInterface*)
+PROXY_SIGNALING_THREAD_DESTRUCTOR()
+PROXY_CONSTMETHOD0(std::string, kind)
+PROXY_CONSTMETHOD0(std::string, id)
+PROXY_CONSTMETHOD0(TrackState, state)
+PROXY_CONSTMETHOD0(bool, enabled)
+PROXY_CONSTMETHOD0(AudioSourceInterface*, GetSource)
+PROXY_METHOD1(void, AddSink, AudioTrackSinkInterface*)
+PROXY_METHOD1(void, RemoveSink, AudioTrackSinkInterface*)
+PROXY_METHOD1(bool, GetSignalLevel, int*)
+PROXY_METHOD0(rtc::scoped_refptr<AudioProcessorInterface>, GetAudioProcessor)
+PROXY_METHOD1(bool, set_enabled, bool)
+PROXY_METHOD1(void, RegisterObserver, ObserverInterface*)
+PROXY_METHOD1(void, UnregisterObserver, ObserverInterface*)
 END_PROXY_MAP()
 
 BEGIN_PROXY_MAP(VideoTrack)
-  PROXY_SIGNALING_THREAD_DESTRUCTOR()
-  PROXY_CONSTMETHOD0(std::string, kind)
-  PROXY_CONSTMETHOD0(std::string, id)
-  PROXY_CONSTMETHOD0(TrackState, state)
-  PROXY_CONSTMETHOD0(bool, enabled)
-  PROXY_METHOD1(bool, set_enabled, bool)
-  PROXY_CONSTMETHOD0(ContentHint, content_hint)
-  PROXY_METHOD1(void, set_content_hint, ContentHint)
-  PROXY_WORKER_METHOD2(void,
-                       AddOrUpdateSink,
-                       rtc::VideoSinkInterface<VideoFrame>*,
-                       const rtc::VideoSinkWants&)
-  PROXY_WORKER_METHOD1(void, RemoveSink, rtc::VideoSinkInterface<VideoFrame>*)
-  PROXY_CONSTMETHOD0(VideoTrackSourceInterface*, GetSource)
+PROXY_SIGNALING_THREAD_DESTRUCTOR()
+PROXY_CONSTMETHOD0(std::string, kind)
+PROXY_CONSTMETHOD0(std::string, id)
+PROXY_CONSTMETHOD0(TrackState, state)
+PROXY_CONSTMETHOD0(bool, enabled)
+PROXY_METHOD1(bool, set_enabled, bool)
+PROXY_CONSTMETHOD0(ContentHint, content_hint)
+PROXY_METHOD1(void, set_content_hint, ContentHint)
+PROXY_WORKER_METHOD2(void,
+                     AddOrUpdateSink,
+                     rtc::VideoSinkInterface<VideoFrame>*,
+                     const rtc::VideoSinkWants&)
+PROXY_WORKER_METHOD1(void, RemoveSink, rtc::VideoSinkInterface<VideoFrame>*)
+PROXY_CONSTMETHOD0(VideoTrackSourceInterface*, GetSource)
 
-  PROXY_METHOD1(void, RegisterObserver, ObserverInterface*)
-  PROXY_METHOD1(void, UnregisterObserver, ObserverInterface*)
+PROXY_METHOD1(void, RegisterObserver, ObserverInterface*)
+PROXY_METHOD1(void, UnregisterObserver, ObserverInterface*)
 END_PROXY_MAP()
 
 }  // namespace webrtc
diff --git a/api/mediatypes.h b/api/mediatypes.h
index 93ce1a2..076fc04 100644
--- a/api/mediatypes.h
+++ b/api/mediatypes.h
@@ -15,11 +15,7 @@
 
 namespace cricket {
 
-enum MediaType {
-  MEDIA_TYPE_AUDIO,
-  MEDIA_TYPE_VIDEO,
-  MEDIA_TYPE_DATA
-};
+enum MediaType { MEDIA_TYPE_AUDIO, MEDIA_TYPE_VIDEO, MEDIA_TYPE_DATA };
 
 std::string MediaTypeToString(MediaType type);
 // Aborts on invalid string. Only expected to be used on strings that are
diff --git a/api/notifier.h b/api/notifier.h
index ceeda4d..e5c61c9 100644
--- a/api/notifier.h
+++ b/api/notifier.h
@@ -23,8 +23,7 @@
 template <class T>
 class Notifier : public T {
  public:
-  Notifier() {
-  }
+  Notifier() {}
 
   virtual void RegisterObserver(ObserverInterface* observer) {
     RTC_DCHECK(observer != nullptr);
diff --git a/api/ortc/sessiondescription_unittest.cc b/api/ortc/sessiondescription_unittest.cc
index fd6f43d..e4611c6 100644
--- a/api/ortc/sessiondescription_unittest.cc
+++ b/api/ortc/sessiondescription_unittest.cc
@@ -20,4 +20,4 @@
   EXPECT_EQ(-1, s.session_id());
   EXPECT_EQ("0", s.session_version());
 }
-}
+}  // namespace webrtc
diff --git a/api/ortc/srtptransportinterface.h b/api/ortc/srtptransportinterface.h
index 41c8ccc..4b757e4 100644
--- a/api/ortc/srtptransportinterface.h
+++ b/api/ortc/srtptransportinterface.h
@@ -11,9 +11,9 @@
 #ifndef API_ORTC_SRTPTRANSPORTINTERFACE_H_
 #define API_ORTC_SRTPTRANSPORTINTERFACE_H_
 
+#include "api/cryptoparams.h"
 #include "api/ortc/rtptransportinterface.h"
 #include "api/rtcerror.h"
-#include "api/cryptoparams.h"
 
 namespace webrtc {
 
diff --git a/api/peerconnectionfactoryproxy.h b/api/peerconnectionfactoryproxy.h
index 13f8a99..eea5b55 100644
--- a/api/peerconnectionfactoryproxy.h
+++ b/api/peerconnectionfactoryproxy.h
@@ -24,50 +24,53 @@
 // TODO(deadbeef): Move this to .cc file and out of api/. What threads methods
 // are called on is an implementation detail.
 BEGIN_SIGNALING_PROXY_MAP(PeerConnectionFactory)
-  PROXY_SIGNALING_THREAD_DESTRUCTOR()
-  // Use the overloads of CreateVideoSource that take raw VideoCapturer
-  // pointers from PeerConnectionFactoryInterface.
-  // TODO(deadbeef): Remove this using statement once those overloads are
-  // removed.
-  using PeerConnectionFactoryInterface::CreateVideoSource;
-  PROXY_METHOD1(void, SetOptions, const Options&)
-  PROXY_METHOD5(rtc::scoped_refptr<PeerConnectionInterface>,
-                CreatePeerConnection,
-                const PeerConnectionInterface::RTCConfiguration&,
-                const MediaConstraintsInterface*,
-                std::unique_ptr<cricket::PortAllocator>,
-                std::unique_ptr<rtc::RTCCertificateGeneratorInterface>,
-                PeerConnectionObserver*);
-  PROXY_METHOD4(rtc::scoped_refptr<PeerConnectionInterface>,
-                CreatePeerConnection,
-                const PeerConnectionInterface::RTCConfiguration&,
-                std::unique_ptr<cricket::PortAllocator>,
-                std::unique_ptr<rtc::RTCCertificateGeneratorInterface>,
-                PeerConnectionObserver*);
-  PROXY_METHOD2(rtc::scoped_refptr<PeerConnectionInterface>,
-                CreatePeerConnection,
-                const PeerConnectionInterface::RTCConfiguration&,
-                PeerConnectionDependencies);
-  PROXY_METHOD1(rtc::scoped_refptr<MediaStreamInterface>,
-                CreateLocalMediaStream, const std::string&)
-  PROXY_METHOD1(rtc::scoped_refptr<AudioSourceInterface>,
-                CreateAudioSource,
-                const cricket::AudioOptions&)
-  PROXY_METHOD2(rtc::scoped_refptr<VideoTrackSourceInterface>,
-                CreateVideoSource,
-                std::unique_ptr<cricket::VideoCapturer>,
-                const MediaConstraintsInterface*)
-  PROXY_METHOD1(rtc::scoped_refptr<VideoTrackSourceInterface>,
-                CreateVideoSource,
-                std::unique_ptr<cricket::VideoCapturer>)
-  PROXY_METHOD2(rtc::scoped_refptr<VideoTrackInterface>,
-                CreateVideoTrack,
-                const std::string&,
-                VideoTrackSourceInterface*)
-  PROXY_METHOD2(rtc::scoped_refptr<AudioTrackInterface>,
-                CreateAudioTrack, const std::string&,  AudioSourceInterface*)
-  PROXY_METHOD2(bool, StartAecDump, rtc::PlatformFile, int64_t)
-  PROXY_METHOD0(void, StopAecDump)
+PROXY_SIGNALING_THREAD_DESTRUCTOR()
+// Use the overloads of CreateVideoSource that take raw VideoCapturer
+// pointers from PeerConnectionFactoryInterface.
+// TODO(deadbeef): Remove this using statement once those overloads are
+// removed.
+using PeerConnectionFactoryInterface::CreateVideoSource;
+PROXY_METHOD1(void, SetOptions, const Options&)
+PROXY_METHOD5(rtc::scoped_refptr<PeerConnectionInterface>,
+              CreatePeerConnection,
+              const PeerConnectionInterface::RTCConfiguration&,
+              const MediaConstraintsInterface*,
+              std::unique_ptr<cricket::PortAllocator>,
+              std::unique_ptr<rtc::RTCCertificateGeneratorInterface>,
+              PeerConnectionObserver*);
+PROXY_METHOD4(rtc::scoped_refptr<PeerConnectionInterface>,
+              CreatePeerConnection,
+              const PeerConnectionInterface::RTCConfiguration&,
+              std::unique_ptr<cricket::PortAllocator>,
+              std::unique_ptr<rtc::RTCCertificateGeneratorInterface>,
+              PeerConnectionObserver*);
+PROXY_METHOD2(rtc::scoped_refptr<PeerConnectionInterface>,
+              CreatePeerConnection,
+              const PeerConnectionInterface::RTCConfiguration&,
+              PeerConnectionDependencies);
+PROXY_METHOD1(rtc::scoped_refptr<MediaStreamInterface>,
+              CreateLocalMediaStream,
+              const std::string&)
+PROXY_METHOD1(rtc::scoped_refptr<AudioSourceInterface>,
+              CreateAudioSource,
+              const cricket::AudioOptions&)
+PROXY_METHOD2(rtc::scoped_refptr<VideoTrackSourceInterface>,
+              CreateVideoSource,
+              std::unique_ptr<cricket::VideoCapturer>,
+              const MediaConstraintsInterface*)
+PROXY_METHOD1(rtc::scoped_refptr<VideoTrackSourceInterface>,
+              CreateVideoSource,
+              std::unique_ptr<cricket::VideoCapturer>)
+PROXY_METHOD2(rtc::scoped_refptr<VideoTrackInterface>,
+              CreateVideoTrack,
+              const std::string&,
+              VideoTrackSourceInterface*)
+PROXY_METHOD2(rtc::scoped_refptr<AudioTrackInterface>,
+              CreateAudioTrack,
+              const std::string&,
+              AudioSourceInterface*)
+PROXY_METHOD2(bool, StartAecDump, rtc::PlatformFile, int64_t)
+PROXY_METHOD0(void, StopAecDump)
 END_PROXY_MAP()
 
 }  // namespace webrtc
diff --git a/api/peerconnectioninterface.h b/api/peerconnectioninterface.h
index 567c026..c1ef6f6 100644
--- a/api/peerconnectioninterface.h
+++ b/api/peerconnectioninterface.h
@@ -116,13 +116,13 @@
 namespace rtc {
 class SSLIdentity;
 class Thread;
-}
+}  // namespace rtc
 
 namespace cricket {
 class MediaEngineInterface;
 class WebRtcVideoDecoderFactory;
 class WebRtcVideoEncoderFactory;
-}
+}  // namespace cricket
 
 namespace webrtc {
 class AudioDeviceModule;
@@ -139,10 +139,8 @@
   virtual size_t count() = 0;
   virtual MediaStreamInterface* at(size_t index) = 0;
   virtual MediaStreamInterface* find(const std::string& label) = 0;
-  virtual MediaStreamTrackInterface* FindAudioTrack(
-      const std::string& id) = 0;
-  virtual MediaStreamTrackInterface* FindVideoTrack(
-      const std::string& id) = 0;
+  virtual MediaStreamTrackInterface* FindAudioTrack(const std::string& id) = 0;
+  virtual MediaStreamTrackInterface* FindVideoTrack(const std::string& id) = 0;
 
  protected:
   // Dtor protected as objects shouldn't be deleted via this interface.
@@ -262,10 +260,7 @@
     kCandidateNetworkPolicyLowCost
   };
 
-  enum ContinualGatheringPolicy {
-    GATHER_ONCE,
-    GATHER_CONTINUALLY
-  };
+  enum ContinualGatheringPolicy { GATHER_ONCE, GATHER_CONTINUALLY };
 
   enum class RTCConfigurationType {
     // A configuration that is safer to use, despite not having the best
@@ -634,14 +629,12 @@
   // Accessor methods to active local streams.
   // This method is not supported with kUnifiedPlan semantics. Please use
   // GetSenders() instead.
-  virtual rtc::scoped_refptr<StreamCollectionInterface>
-      local_streams() = 0;
+  virtual rtc::scoped_refptr<StreamCollectionInterface> local_streams() = 0;
 
   // Accessor methods to remote streams.
   // This method is not supported with kUnifiedPlan semantics. Please use
   // GetReceivers() instead.
-  virtual rtc::scoped_refptr<StreamCollectionInterface>
-      remote_streams() = 0;
+  virtual rtc::scoped_refptr<StreamCollectionInterface> remote_streams() = 0;
 
   // Add a new MediaStream to be sent on this PeerConnection.
   // Note that a SessionDescription negotiation is needed before the
@@ -1374,9 +1367,9 @@
       VideoTrackSourceInterface* source) = 0;
 
   // Creates an new AudioTrack. At the moment |source| can be null.
-  virtual rtc::scoped_refptr<AudioTrackInterface>
-      CreateAudioTrack(const std::string& label,
-                       AudioSourceInterface* source) = 0;
+  virtual rtc::scoped_refptr<AudioTrackInterface> CreateAudioTrack(
+      const std::string& label,
+      AudioSourceInterface* source) = 0;
 
   // Starts AEC dump using existing file. Takes ownership of |file| and passes
   // it on to VoiceEngine (via other objects) immediately, which will take
@@ -1394,7 +1387,7 @@
   // Dtor and ctor protected as objects shouldn't be created or deleted via
   // this interface.
   PeerConnectionFactoryInterface() {}
-  ~PeerConnectionFactoryInterface() {} // NOLINT
+  ~PeerConnectionFactoryInterface() {}  // NOLINT
 };
 
 // Create a new instance of PeerConnectionFactoryInterface.
diff --git a/api/peerconnectionproxy.h b/api/peerconnectionproxy.h
index 3abcf96..1e16ecf 100644
--- a/api/peerconnectionproxy.h
+++ b/api/peerconnectionproxy.h
@@ -23,132 +23,132 @@
 // TODO(deadbeef): Move this to .cc file and out of api/. What threads methods
 // are called on is an implementation detail.
 BEGIN_SIGNALING_PROXY_MAP(PeerConnection)
-  PROXY_SIGNALING_THREAD_DESTRUCTOR()
-  PROXY_METHOD0(rtc::scoped_refptr<StreamCollectionInterface>, local_streams)
-  PROXY_METHOD0(rtc::scoped_refptr<StreamCollectionInterface>, remote_streams)
-  PROXY_METHOD1(bool, AddStream, MediaStreamInterface*)
-  PROXY_METHOD1(void, RemoveStream, MediaStreamInterface*)
-  PROXY_METHOD2(RTCErrorOr<rtc::scoped_refptr<RtpSenderInterface>>,
-                AddTrack,
-                rtc::scoped_refptr<MediaStreamTrackInterface>,
-                const std::vector<std::string>&);
-  PROXY_METHOD2(rtc::scoped_refptr<RtpSenderInterface>,
-                AddTrack,
-                MediaStreamTrackInterface*,
-                std::vector<MediaStreamInterface*>)
-  PROXY_METHOD1(bool, RemoveTrack, RtpSenderInterface*)
-  PROXY_METHOD1(RTCErrorOr<rtc::scoped_refptr<RtpTransceiverInterface>>,
-                AddTransceiver,
-                rtc::scoped_refptr<MediaStreamTrackInterface>)
-  PROXY_METHOD2(RTCErrorOr<rtc::scoped_refptr<RtpTransceiverInterface>>,
-                AddTransceiver,
-                rtc::scoped_refptr<MediaStreamTrackInterface>,
-                const RtpTransceiverInit&)
-  PROXY_METHOD1(RTCErrorOr<rtc::scoped_refptr<RtpTransceiverInterface>>,
-                AddTransceiver,
-                cricket::MediaType)
-  PROXY_METHOD2(RTCErrorOr<rtc::scoped_refptr<RtpTransceiverInterface>>,
-                AddTransceiver,
-                cricket::MediaType,
-                const RtpTransceiverInit&)
-  PROXY_METHOD1(rtc::scoped_refptr<DtmfSenderInterface>,
-                CreateDtmfSender,
-                AudioTrackInterface*)
-  PROXY_METHOD2(rtc::scoped_refptr<RtpSenderInterface>,
-                CreateSender,
-                const std::string&,
-                const std::string&)
-  PROXY_CONSTMETHOD0(std::vector<rtc::scoped_refptr<RtpSenderInterface>>,
-                     GetSenders)
-  PROXY_CONSTMETHOD0(std::vector<rtc::scoped_refptr<RtpReceiverInterface>>,
-                     GetReceivers)
-  PROXY_CONSTMETHOD0(std::vector<rtc::scoped_refptr<RtpTransceiverInterface>>,
-                     GetTransceivers)
-  PROXY_METHOD3(bool,
-                GetStats,
-                StatsObserver*,
-                MediaStreamTrackInterface*,
-                StatsOutputLevel)
-  PROXY_METHOD1(void, GetStats, RTCStatsCollectorCallback*)
-  PROXY_METHOD2(void,
-                GetStats,
-                rtc::scoped_refptr<RtpSenderInterface>,
-                rtc::scoped_refptr<RTCStatsCollectorCallback>);
-  PROXY_METHOD2(void,
-                GetStats,
-                rtc::scoped_refptr<RtpReceiverInterface>,
-                rtc::scoped_refptr<RTCStatsCollectorCallback>);
-  PROXY_METHOD2(rtc::scoped_refptr<DataChannelInterface>,
-                CreateDataChannel,
-                const std::string&,
-                const DataChannelInit*)
-  PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, local_description)
-  PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, remote_description)
-  PROXY_CONSTMETHOD0(const SessionDescriptionInterface*,
-                     pending_local_description)
-  PROXY_CONSTMETHOD0(const SessionDescriptionInterface*,
-                     pending_remote_description)
-  PROXY_CONSTMETHOD0(const SessionDescriptionInterface*,
-                     current_local_description)
-  PROXY_CONSTMETHOD0(const SessionDescriptionInterface*,
-                     current_remote_description)
-  PROXY_METHOD2(void,
-                CreateOffer,
-                CreateSessionDescriptionObserver*,
-                const MediaConstraintsInterface*)
-  PROXY_METHOD2(void,
-                CreateAnswer,
-                CreateSessionDescriptionObserver*,
-                const MediaConstraintsInterface*)
-  PROXY_METHOD2(void,
-                CreateOffer,
-                CreateSessionDescriptionObserver*,
-                const RTCOfferAnswerOptions&)
-  PROXY_METHOD2(void,
-                CreateAnswer,
-                CreateSessionDescriptionObserver*,
-                const RTCOfferAnswerOptions&)
-  PROXY_METHOD2(void,
-                SetLocalDescription,
-                SetSessionDescriptionObserver*,
-                SessionDescriptionInterface*)
-  PROXY_METHOD2(void,
-                SetRemoteDescription,
-                SetSessionDescriptionObserver*,
-                SessionDescriptionInterface*)
-  PROXY_METHOD2(void,
-                SetRemoteDescription,
-                std::unique_ptr<SessionDescriptionInterface>,
-                rtc::scoped_refptr<SetRemoteDescriptionObserverInterface>);
-  PROXY_METHOD0(PeerConnectionInterface::RTCConfiguration, GetConfiguration);
-  PROXY_METHOD2(bool,
-                SetConfiguration,
-                const PeerConnectionInterface::RTCConfiguration&,
-                RTCError*);
-  PROXY_METHOD1(bool,
-                SetConfiguration,
-                const PeerConnectionInterface::RTCConfiguration&);
-  PROXY_METHOD1(bool, AddIceCandidate, const IceCandidateInterface*)
-  PROXY_METHOD1(bool,
-                RemoveIceCandidates,
-                const std::vector<cricket::Candidate>&);
-  PROXY_METHOD1(void, SetAudioPlayout, bool)
-  PROXY_METHOD1(void, SetAudioRecording, bool)
-  PROXY_METHOD1(void, RegisterUMAObserver, UMAObserver*)
-  PROXY_METHOD1(RTCError, SetBitrate, const BitrateSettings&);
-  PROXY_METHOD1(void,
-                SetBitrateAllocationStrategy,
-                std::unique_ptr<rtc::BitrateAllocationStrategy>);
-  PROXY_METHOD0(SignalingState, signaling_state)
-  PROXY_METHOD0(IceConnectionState, ice_connection_state)
-  PROXY_METHOD0(IceGatheringState, ice_gathering_state)
-  PROXY_METHOD2(bool, StartRtcEventLog, rtc::PlatformFile, int64_t)
-  PROXY_METHOD2(bool,
-                StartRtcEventLog,
-                std::unique_ptr<RtcEventLogOutput>,
-                int64_t);
-  PROXY_METHOD0(void, StopRtcEventLog)
-  PROXY_METHOD0(void, Close)
+PROXY_SIGNALING_THREAD_DESTRUCTOR()
+PROXY_METHOD0(rtc::scoped_refptr<StreamCollectionInterface>, local_streams)
+PROXY_METHOD0(rtc::scoped_refptr<StreamCollectionInterface>, remote_streams)
+PROXY_METHOD1(bool, AddStream, MediaStreamInterface*)
+PROXY_METHOD1(void, RemoveStream, MediaStreamInterface*)
+PROXY_METHOD2(RTCErrorOr<rtc::scoped_refptr<RtpSenderInterface>>,
+              AddTrack,
+              rtc::scoped_refptr<MediaStreamTrackInterface>,
+              const std::vector<std::string>&);
+PROXY_METHOD2(rtc::scoped_refptr<RtpSenderInterface>,
+              AddTrack,
+              MediaStreamTrackInterface*,
+              std::vector<MediaStreamInterface*>)
+PROXY_METHOD1(bool, RemoveTrack, RtpSenderInterface*)
+PROXY_METHOD1(RTCErrorOr<rtc::scoped_refptr<RtpTransceiverInterface>>,
+              AddTransceiver,
+              rtc::scoped_refptr<MediaStreamTrackInterface>)
+PROXY_METHOD2(RTCErrorOr<rtc::scoped_refptr<RtpTransceiverInterface>>,
+              AddTransceiver,
+              rtc::scoped_refptr<MediaStreamTrackInterface>,
+              const RtpTransceiverInit&)
+PROXY_METHOD1(RTCErrorOr<rtc::scoped_refptr<RtpTransceiverInterface>>,
+              AddTransceiver,
+              cricket::MediaType)
+PROXY_METHOD2(RTCErrorOr<rtc::scoped_refptr<RtpTransceiverInterface>>,
+              AddTransceiver,
+              cricket::MediaType,
+              const RtpTransceiverInit&)
+PROXY_METHOD1(rtc::scoped_refptr<DtmfSenderInterface>,
+              CreateDtmfSender,
+              AudioTrackInterface*)
+PROXY_METHOD2(rtc::scoped_refptr<RtpSenderInterface>,
+              CreateSender,
+              const std::string&,
+              const std::string&)
+PROXY_CONSTMETHOD0(std::vector<rtc::scoped_refptr<RtpSenderInterface>>,
+                   GetSenders)
+PROXY_CONSTMETHOD0(std::vector<rtc::scoped_refptr<RtpReceiverInterface>>,
+                   GetReceivers)
+PROXY_CONSTMETHOD0(std::vector<rtc::scoped_refptr<RtpTransceiverInterface>>,
+                   GetTransceivers)
+PROXY_METHOD3(bool,
+              GetStats,
+              StatsObserver*,
+              MediaStreamTrackInterface*,
+              StatsOutputLevel)
+PROXY_METHOD1(void, GetStats, RTCStatsCollectorCallback*)
+PROXY_METHOD2(void,
+              GetStats,
+              rtc::scoped_refptr<RtpSenderInterface>,
+              rtc::scoped_refptr<RTCStatsCollectorCallback>);
+PROXY_METHOD2(void,
+              GetStats,
+              rtc::scoped_refptr<RtpReceiverInterface>,
+              rtc::scoped_refptr<RTCStatsCollectorCallback>);
+PROXY_METHOD2(rtc::scoped_refptr<DataChannelInterface>,
+              CreateDataChannel,
+              const std::string&,
+              const DataChannelInit*)
+PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, local_description)
+PROXY_CONSTMETHOD0(const SessionDescriptionInterface*, remote_description)
+PROXY_CONSTMETHOD0(const SessionDescriptionInterface*,
+                   pending_local_description)
+PROXY_CONSTMETHOD0(const SessionDescriptionInterface*,
+                   pending_remote_description)
+PROXY_CONSTMETHOD0(const SessionDescriptionInterface*,
+                   current_local_description)
+PROXY_CONSTMETHOD0(const SessionDescriptionInterface*,
+                   current_remote_description)
+PROXY_METHOD2(void,
+              CreateOffer,
+              CreateSessionDescriptionObserver*,
+              const MediaConstraintsInterface*)
+PROXY_METHOD2(void,
+              CreateAnswer,
+              CreateSessionDescriptionObserver*,
+              const MediaConstraintsInterface*)
+PROXY_METHOD2(void,
+              CreateOffer,
+              CreateSessionDescriptionObserver*,
+              const RTCOfferAnswerOptions&)
+PROXY_METHOD2(void,
+              CreateAnswer,
+              CreateSessionDescriptionObserver*,
+              const RTCOfferAnswerOptions&)
+PROXY_METHOD2(void,
+              SetLocalDescription,
+              SetSessionDescriptionObserver*,
+              SessionDescriptionInterface*)
+PROXY_METHOD2(void,
+              SetRemoteDescription,
+              SetSessionDescriptionObserver*,
+              SessionDescriptionInterface*)
+PROXY_METHOD2(void,
+              SetRemoteDescription,
+              std::unique_ptr<SessionDescriptionInterface>,
+              rtc::scoped_refptr<SetRemoteDescriptionObserverInterface>);
+PROXY_METHOD0(PeerConnectionInterface::RTCConfiguration, GetConfiguration);
+PROXY_METHOD2(bool,
+              SetConfiguration,
+              const PeerConnectionInterface::RTCConfiguration&,
+              RTCError*);
+PROXY_METHOD1(bool,
+              SetConfiguration,
+              const PeerConnectionInterface::RTCConfiguration&);
+PROXY_METHOD1(bool, AddIceCandidate, const IceCandidateInterface*)
+PROXY_METHOD1(bool,
+              RemoveIceCandidates,
+              const std::vector<cricket::Candidate>&);
+PROXY_METHOD1(void, SetAudioPlayout, bool)
+PROXY_METHOD1(void, SetAudioRecording, bool)
+PROXY_METHOD1(void, RegisterUMAObserver, UMAObserver*)
+PROXY_METHOD1(RTCError, SetBitrate, const BitrateSettings&);
+PROXY_METHOD1(void,
+              SetBitrateAllocationStrategy,
+              std::unique_ptr<rtc::BitrateAllocationStrategy>);
+PROXY_METHOD0(SignalingState, signaling_state)
+PROXY_METHOD0(IceConnectionState, ice_connection_state)
+PROXY_METHOD0(IceGatheringState, ice_gathering_state)
+PROXY_METHOD2(bool, StartRtcEventLog, rtc::PlatformFile, int64_t)
+PROXY_METHOD2(bool,
+              StartRtcEventLog,
+              std::unique_ptr<RtcEventLogOutput>,
+              int64_t);
+PROXY_METHOD0(void, StopRtcEventLog)
+PROXY_METHOD0(void, Close)
 END_PROXY_MAP()
 
 }  // namespace webrtc
diff --git a/api/proxy.h b/api/proxy.h
index dd7182e..c8962ef 100644
--- a/api/proxy.h
+++ b/api/proxy.h
@@ -64,8 +64,10 @@
 template <typename R>
 class ReturnType {
  public:
-  template<typename C, typename M>
-  void Invoke(C* c, M m) { r_ = (c->*m)(); }
+  template <typename C, typename M>
+  void Invoke(C* c, M m) {
+    r_ = (c->*m)();
+  }
   template <typename C, typename M, typename T1>
   void Invoke(C* c, M m, T1 a1) {
     r_ = (c->*m)(std::move(a1));
@@ -78,13 +80,22 @@
   void Invoke(C* c, M m, T1 a1, T2 a2, T3 a3) {
     r_ = (c->*m)(std::move(a1), std::move(a2), std::move(a3));
   }
-  template<typename C, typename M, typename T1, typename T2, typename T3,
-      typename T4>
+  template <typename C,
+            typename M,
+            typename T1,
+            typename T2,
+            typename T3,
+            typename T4>
   void Invoke(C* c, M m, T1 a1, T2 a2, T3 a3, T4 a4) {
     r_ = (c->*m)(std::move(a1), std::move(a2), std::move(a3), std::move(a4));
   }
-  template<typename C, typename M, typename T1, typename T2, typename T3,
-     typename T4, typename T5>
+  template <typename C,
+            typename M,
+            typename T1,
+            typename T2,
+            typename T3,
+            typename T4,
+            typename T5>
   void Invoke(C* c, M m, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) {
     r_ = (c->*m)(std::move(a1), std::move(a2), std::move(a3), std::move(a4),
                  std::move(a5));
@@ -99,8 +110,10 @@
 template <>
 class ReturnType<void> {
  public:
-  template<typename C, typename M>
-  void Invoke(C* c, M m) { (c->*m)(); }
+  template <typename C, typename M>
+  void Invoke(C* c, M m) {
+    (c->*m)();
+  }
   template <typename C, typename M, typename T1>
   void Invoke(C* c, M m, T1 a1) {
     (c->*m)(std::move(a1));
@@ -119,9 +132,8 @@
 
 namespace internal {
 
-class SynchronousMethodCall
-    : public rtc::MessageData,
-      public rtc::MessageHandler {
+class SynchronousMethodCall : public rtc::MessageData,
+                              public rtc::MessageHandler {
  public:
   explicit SynchronousMethodCall(rtc::MessageHandler* proxy);
   ~SynchronousMethodCall() override;
@@ -138,8 +150,7 @@
 }  // namespace internal
 
 template <typename C, typename R>
-class MethodCall0 : public rtc::Message,
-                    public rtc::MessageHandler {
+class MethodCall0 : public rtc::Message, public rtc::MessageHandler {
  public:
   typedef R (C::*Method)();
   MethodCall0(C* c, Method m) : c_(c), m_(m) {}
@@ -150,7 +161,7 @@
   }
 
  private:
-  void OnMessage(rtc::Message*) {  r_.Invoke(c_, m_); }
+  void OnMessage(rtc::Message*) { r_.Invoke(c_, m_); }
 
   C* c_;
   Method m_;
@@ -158,8 +169,7 @@
 };
 
 template <typename C, typename R>
-class ConstMethodCall0 : public rtc::Message,
-                         public rtc::MessageHandler {
+class ConstMethodCall0 : public rtc::Message, public rtc::MessageHandler {
  public:
   typedef R (C::*Method)() const;
   ConstMethodCall0(C* c, Method m) : c_(c), m_(m) {}
@@ -177,9 +187,8 @@
   ReturnType<R> r_;
 };
 
-template <typename C, typename R,  typename T1>
-class MethodCall1 : public rtc::Message,
-                    public rtc::MessageHandler {
+template <typename C, typename R, typename T1>
+class MethodCall1 : public rtc::Message, public rtc::MessageHandler {
  public:
   typedef R (C::*Method)(T1 a1);
   MethodCall1(C* c, Method m, T1 a1) : c_(c), m_(m), a1_(std::move(a1)) {}
@@ -198,9 +207,8 @@
   T1 a1_;
 };
 
-template <typename C, typename R,  typename T1>
-class ConstMethodCall1 : public rtc::Message,
-                         public rtc::MessageHandler {
+template <typename C, typename R, typename T1>
+class ConstMethodCall1 : public rtc::Message, public rtc::MessageHandler {
  public:
   typedef R (C::*Method)(T1 a1) const;
   ConstMethodCall1(C* c, Method m, T1 a1) : c_(c), m_(m), a1_(std::move(a1)) {}
@@ -220,8 +228,7 @@
 };
 
 template <typename C, typename R, typename T1, typename T2>
-class MethodCall2 : public rtc::Message,
-                    public rtc::MessageHandler {
+class MethodCall2 : public rtc::Message, public rtc::MessageHandler {
  public:
   typedef R (C::*Method)(T1 a1, T2 a2);
   MethodCall2(C* c, Method m, T1 a1, T2 a2)
@@ -245,8 +252,7 @@
 };
 
 template <typename C, typename R, typename T1, typename T2, typename T3>
-class MethodCall3 : public rtc::Message,
-                    public rtc::MessageHandler {
+class MethodCall3 : public rtc::Message, public rtc::MessageHandler {
  public:
   typedef R (C::*Method)(T1 a1, T2 a2, T3 a3);
   MethodCall3(C* c, Method m, T1 a1, T2 a2, T3 a3)
@@ -274,10 +280,13 @@
   T3 a3_;
 };
 
-template <typename C, typename R, typename T1, typename T2, typename T3,
-    typename T4>
-class MethodCall4 : public rtc::Message,
-                    public rtc::MessageHandler {
+template <typename C,
+          typename R,
+          typename T1,
+          typename T2,
+          typename T3,
+          typename T4>
+class MethodCall4 : public rtc::Message, public rtc::MessageHandler {
  public:
   typedef R (C::*Method)(T1 a1, T2 a2, T3 a3, T4 a4);
   MethodCall4(C* c, Method m, T1 a1, T2 a2, T3 a3, T4 a4)
@@ -308,10 +317,14 @@
   T4 a4_;
 };
 
-template <typename C, typename R, typename T1, typename T2, typename T3,
-    typename T4, typename T5>
-class MethodCall5 : public rtc::Message,
-                    public rtc::MessageHandler {
+template <typename C,
+          typename R,
+          typename T1,
+          typename T2,
+          typename T3,
+          typename T4,
+          typename T5>
+class MethodCall5 : public rtc::Message, public rtc::MessageHandler {
  public:
   typedef R (C::*Method)(T1 a1, T2 a2, T3 a3, T4 a4, T5 a5);
   MethodCall5(C* c, Method m, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
@@ -344,7 +357,6 @@
   T5 a5_;
 };
 
-
 // Helper macros to reduce code duplication.
 #define PROXY_MAP_BOILERPLATE(c)                          \
   template <class INTERNAL_CLASS>                         \
@@ -359,8 +371,12 @@
     const INTERNAL_CLASS* internal() const { return c_; } \
     INTERNAL_CLASS* internal() { return c_; }
 
+// clang-format off
+// clang-format would put the semicolon alone,
+// leading to a presubmit error (cpplint.py)
 #define END_PROXY_MAP() \
   };
+// clang-format on
 
 #define SIGNALING_PROXY_MAP_BOILERPLATE(c)                               \
  protected:                                                              \
diff --git a/api/rtp_headers.h b/api/rtp_headers.h
index e82d121..3318e60 100644
--- a/api/rtp_headers.h
+++ b/api/rtp_headers.h
@@ -22,9 +22,9 @@
 #include "api/video/video_rotation.h"
 #include "api/video/video_timing.h"
 
+#include "common_types.h"  // NOLINT(build/include)
 #include "rtc_base/checks.h"
 #include "rtc_base/deprecation.h"
-#include "common_types.h"  // NOLINT(build/include)
 #include "typedefs.h"  // NOLINT(build/include)
 
 namespace webrtc {
diff --git a/api/rtpreceiverinterface.h b/api/rtpreceiverinterface.h
index 0e32eae..30eb667 100644
--- a/api/rtpreceiverinterface.h
+++ b/api/rtpreceiverinterface.h
@@ -128,17 +128,17 @@
 // TODO(deadbeef): Move this to .cc file and out of api/. What threads methods
 // are called on is an implementation detail.
 BEGIN_SIGNALING_PROXY_MAP(RtpReceiver)
-  PROXY_SIGNALING_THREAD_DESTRUCTOR()
-  PROXY_CONSTMETHOD0(rtc::scoped_refptr<MediaStreamTrackInterface>, track)
-  PROXY_CONSTMETHOD0(std::vector<rtc::scoped_refptr<MediaStreamInterface>>,
-                     streams)
-  PROXY_CONSTMETHOD0(cricket::MediaType, media_type)
-  PROXY_CONSTMETHOD0(std::string, id)
-  PROXY_CONSTMETHOD0(RtpParameters, GetParameters);
-  PROXY_METHOD1(bool, SetParameters, const RtpParameters&)
-  PROXY_METHOD1(void, SetObserver, RtpReceiverObserverInterface*);
-  PROXY_CONSTMETHOD0(std::vector<RtpSource>, GetSources);
-  END_PROXY_MAP()
+PROXY_SIGNALING_THREAD_DESTRUCTOR()
+PROXY_CONSTMETHOD0(rtc::scoped_refptr<MediaStreamTrackInterface>, track)
+PROXY_CONSTMETHOD0(std::vector<rtc::scoped_refptr<MediaStreamInterface>>,
+                   streams)
+PROXY_CONSTMETHOD0(cricket::MediaType, media_type)
+PROXY_CONSTMETHOD0(std::string, id)
+PROXY_CONSTMETHOD0(RtpParameters, GetParameters);
+PROXY_METHOD1(bool, SetParameters, const RtpParameters&)
+PROXY_METHOD1(void, SetObserver, RtpReceiverObserverInterface*);
+PROXY_CONSTMETHOD0(std::vector<RtpSource>, GetSources);
+END_PROXY_MAP()
 
 }  // namespace webrtc
 
diff --git a/api/rtpsenderinterface.h b/api/rtpsenderinterface.h
index 0f235bd..e933614 100644
--- a/api/rtpsenderinterface.h
+++ b/api/rtpsenderinterface.h
@@ -70,17 +70,17 @@
 // TODO(deadbeef): Move this to .cc file and out of api/. What threads methods
 // are called on is an implementation detail.
 BEGIN_SIGNALING_PROXY_MAP(RtpSender)
-  PROXY_SIGNALING_THREAD_DESTRUCTOR()
-  PROXY_METHOD1(bool, SetTrack, MediaStreamTrackInterface*)
-  PROXY_CONSTMETHOD0(rtc::scoped_refptr<MediaStreamTrackInterface>, track)
-  PROXY_CONSTMETHOD0(uint32_t, ssrc)
-  PROXY_CONSTMETHOD0(cricket::MediaType, media_type)
-  PROXY_CONSTMETHOD0(std::string, id)
-  PROXY_CONSTMETHOD0(std::vector<std::string>, stream_ids)
-  PROXY_METHOD0(RtpParameters, GetParameters);
-  PROXY_METHOD1(RTCError, SetParameters, const RtpParameters&)
-  PROXY_CONSTMETHOD0(rtc::scoped_refptr<DtmfSenderInterface>, GetDtmfSender);
-  END_PROXY_MAP()
+PROXY_SIGNALING_THREAD_DESTRUCTOR()
+PROXY_METHOD1(bool, SetTrack, MediaStreamTrackInterface*)
+PROXY_CONSTMETHOD0(rtc::scoped_refptr<MediaStreamTrackInterface>, track)
+PROXY_CONSTMETHOD0(uint32_t, ssrc)
+PROXY_CONSTMETHOD0(cricket::MediaType, media_type)
+PROXY_CONSTMETHOD0(std::string, id)
+PROXY_CONSTMETHOD0(std::vector<std::string>, stream_ids)
+PROXY_METHOD0(RtpParameters, GetParameters);
+PROXY_METHOD1(RTCError, SetParameters, const RtpParameters&)
+PROXY_CONSTMETHOD0(rtc::scoped_refptr<DtmfSenderInterface>, GetDtmfSender);
+END_PROXY_MAP()
 
 }  // namespace webrtc
 
diff --git a/api/stats/rtcstats.h b/api/stats/rtcstats.h
index 887d602..1ca7b2c 100644
--- a/api/stats/rtcstats.h
+++ b/api/stats/rtcstats.h
@@ -78,7 +78,7 @@
 
   // Downcasts the stats object to an |RTCStats| subclass |T|. DCHECKs that the
   // object is of type |T|.
-  template<typename T>
+  template <typename T>
   const T& cast_to() const {
     RTC_DCHECK_EQ(type(), T::kType);
     return static_cast<const T&>(*this);
@@ -90,8 +90,7 @@
   // shall be reserved in the vector (so that subclasses can allocate a vector
   // with room for both parent and child members without it having to resize).
   virtual std::vector<const RTCStatsMemberInterface*>
-  MembersOfThisObjectAndAncestors(
-      size_t additional_capacity) const;
+  MembersOfThisObjectAndAncestors(size_t additional_capacity) const;
 
   std::string const id_;
   int64_t timestamp_us_;
@@ -138,18 +137,18 @@
 //         bar("bar") {
 //   }
 //
-#define WEBRTC_RTCSTATS_DECL()                                                 \
- public:                                                                       \
-  static const char kType[];                                                   \
-                                                                               \
-  std::unique_ptr<webrtc::RTCStats> copy() const override;                     \
-  const char* type() const override;                                           \
-                                                                               \
- protected:                                                                    \
-  std::vector<const webrtc::RTCStatsMemberInterface*>                          \
-  MembersOfThisObjectAndAncestors(                                             \
-      size_t local_var_additional_capacity) const override;                    \
-                                                                               \
+#define WEBRTC_RTCSTATS_DECL()                                          \
+ public:                                                                \
+  static const char kType[];                                            \
+                                                                        \
+  std::unique_ptr<webrtc::RTCStats> copy() const override;              \
+  const char* type() const override;                                    \
+                                                                        \
+ protected:                                                             \
+  std::vector<const webrtc::RTCStatsMemberInterface*>                   \
+  MembersOfThisObjectAndAncestors(size_t local_var_additional_capacity) \
+      const override;                                                   \
+                                                                        \
  public:
 
 #define WEBRTC_RTCSTATS_IMPL(this_class, parent_class, type_str, ...)          \
@@ -159,20 +158,17 @@
     return std::unique_ptr<webrtc::RTCStats>(new this_class(*this));           \
   }                                                                            \
                                                                                \
-  const char* this_class::type() const {                                       \
-    return this_class::kType;                                                  \
-  }                                                                            \
+  const char* this_class::type() const { return this_class::kType; }           \
                                                                                \
   std::vector<const webrtc::RTCStatsMemberInterface*>                          \
   this_class::MembersOfThisObjectAndAncestors(                                 \
       size_t local_var_additional_capacity) const {                            \
     const webrtc::RTCStatsMemberInterface* local_var_members[] = {             \
-      __VA_ARGS__                                                              \
-    };                                                                         \
+        __VA_ARGS__};                                                          \
     size_t local_var_members_count =                                           \
         sizeof(local_var_members) / sizeof(local_var_members[0]);              \
-    std::vector<const webrtc::RTCStatsMemberInterface*> local_var_members_vec =\
-        parent_class::MembersOfThisObjectAndAncestors(                         \
+    std::vector<const webrtc::RTCStatsMemberInterface*>                        \
+        local_var_members_vec = parent_class::MembersOfThisObjectAndAncestors( \
             local_var_members_count + local_var_additional_capacity);          \
     RTC_DCHECK_GE(                                                             \
         local_var_members_vec.capacity() - local_var_members_vec.size(),       \
@@ -191,21 +187,21 @@
  public:
   // Member value types.
   enum Type {
-    kBool,                  // bool
-    kInt32,                 // int32_t
-    kUint32,                // uint32_t
-    kInt64,                 // int64_t
-    kUint64,                // uint64_t
-    kDouble,                // double
-    kString,                // std::string
+    kBool,    // bool
+    kInt32,   // int32_t
+    kUint32,  // uint32_t
+    kInt64,   // int64_t
+    kUint64,  // uint64_t
+    kDouble,  // double
+    kString,  // std::string
 
-    kSequenceBool,          // std::vector<bool>
-    kSequenceInt32,         // std::vector<int32_t>
-    kSequenceUint32,        // std::vector<uint32_t>
-    kSequenceInt64,         // std::vector<int64_t>
-    kSequenceUint64,        // std::vector<uint64_t>
-    kSequenceDouble,        // std::vector<double>
-    kSequenceString,        // std::vector<std::string>
+    kSequenceBool,    // std::vector<bool>
+    kSequenceInt32,   // std::vector<int32_t>
+    kSequenceUint32,  // std::vector<uint32_t>
+    kSequenceInt64,   // std::vector<int64_t>
+    kSequenceUint64,  // std::vector<uint64_t>
+    kSequenceDouble,  // std::vector<double>
+    kSequenceString,  // std::vector<std::string>
   };
 
   virtual ~RTCStatsMemberInterface() {}
@@ -229,7 +225,7 @@
   // instead.
   virtual std::string ValueToJson() const = 0;
 
-  template<typename T>
+  template <typename T>
   const T& cast_to() const {
     RTC_DCHECK_EQ(type(), T::kType);
     return static_cast<const T&>(*this);
@@ -247,20 +243,17 @@
 // specialized in rtcstats.cc, using a different |T| results in a linker error
 // (undefined reference to |kType|). The supported types are the ones described
 // by |RTCStatsMemberInterface::Type|.
-template<typename T>
+template <typename T>
 class RTCStatsMember : public RTCStatsMemberInterface {
  public:
   static const Type kType;
 
   explicit RTCStatsMember(const char* name)
-      : RTCStatsMemberInterface(name, false),
-        value_() {}
+      : RTCStatsMemberInterface(name, false), value_() {}
   RTCStatsMember(const char* name, const T& value)
-      : RTCStatsMemberInterface(name, true),
-        value_(value) {}
+      : RTCStatsMemberInterface(name, true), value_(value) {}
   RTCStatsMember(const char* name, T&& value)
-      : RTCStatsMemberInterface(name, true),
-        value_(std::move(value)) {}
+      : RTCStatsMemberInterface(name, true), value_(std::move(value)) {}
   explicit RTCStatsMember(const RTCStatsMember<T>& other)
       : RTCStatsMemberInterface(other.name_, other.is_defined_),
         value_(other.value_) {}
diff --git a/api/stats/rtcstats_objects.h b/api/stats/rtcstats_objects.h
index 842fca8..7e6bcd3 100644
--- a/api/stats/rtcstats_objects.h
+++ b/api/stats/rtcstats_objects.h
@@ -209,8 +209,9 @@
   RTCStatsMember<bool> deleted;  // = false
 
  protected:
-  RTCIceCandidateStats(
-      const std::string& id, int64_t timestamp_us, bool is_remote);
+  RTCIceCandidateStats(const std::string& id,
+                       int64_t timestamp_us,
+                       bool is_remote);
   RTCIceCandidateStats(std::string&& id, int64_t timestamp_us, bool is_remote);
 };
 
@@ -258,9 +259,11 @@
  public:
   WEBRTC_RTCSTATS_DECL();
 
-  RTCMediaStreamTrackStats(const std::string& id, int64_t timestamp_us,
+  RTCMediaStreamTrackStats(const std::string& id,
+                           int64_t timestamp_us,
                            const char* kind);
-  RTCMediaStreamTrackStats(std::string&& id, int64_t timestamp_us,
+  RTCMediaStreamTrackStats(std::string&& id,
+                           int64_t timestamp_us,
                            const char* kind);
   RTCMediaStreamTrackStats(const RTCMediaStreamTrackStats& other);
   ~RTCMediaStreamTrackStats() override;
diff --git a/api/stats/rtcstatsreport.h b/api/stats/rtcstatsreport.h
index 8485a08..f7410b3 100644
--- a/api/stats/rtcstatsreport.h
+++ b/api/stats/rtcstatsreport.h
@@ -76,7 +76,7 @@
 
   // Gets the subset of stats that are of type |T|, where |T| is any class
   // descending from |RTCStats|.
-  template<typename T>
+  template <typename T>
   std::vector<const T*> GetStatsOfType() const {
     std::vector<const T*> stats_of_type;
     for (const RTCStats& stats : *this) {
diff --git a/api/statstypes.cc b/api/statstypes.cc
index 49a00bb..ceba28d 100644
--- a/api/statstypes.cc
+++ b/api/statstypes.cc
@@ -98,8 +98,7 @@
   }
 
   std::string ToString() const override {
-    return std::string(InternalTypeToString(type_)) +
-           kSeparator +
+    return std::string(InternalTypeToString(type_)) + kSeparator +
            rtc::ToString<int>(id_);
   }
 
@@ -109,7 +108,8 @@
 
 class IdWithDirection : public TypedId {
  public:
-  IdWithDirection(StatsReport::StatsType type, const std::string& id,
+  IdWithDirection(StatsReport::StatsType type,
+                  const std::string& id,
                   StatsReport::Direction direction)
       : TypedId(type, id), direction_(direction) {}
 
@@ -132,39 +132,34 @@
 class CandidateId : public TypedId {
  public:
   CandidateId(bool local, const std::string& id)
-      : TypedId(local ?
-                    StatsReport::kStatsReportTypeIceLocalCandidate :
-                    StatsReport::kStatsReportTypeIceRemoteCandidate,
-                id) {
-  }
+      : TypedId(local ? StatsReport::kStatsReportTypeIceLocalCandidate
+                      : StatsReport::kStatsReportTypeIceRemoteCandidate,
+                id) {}
 
-  std::string ToString() const override {
-    return "Cand-" + id_;
-  }
+  std::string ToString() const override { return "Cand-" + id_; }
 };
 
 class ComponentId : public StatsReport::IdBase {
  public:
   ComponentId(const std::string& content_name, int component)
-      : ComponentId(StatsReport::kStatsReportTypeComponent, content_name,
-            component) {}
+      : ComponentId(StatsReport::kStatsReportTypeComponent,
+                    content_name,
+                    component) {}
 
   bool Equals(const IdBase& other) const override {
     return IdBase::Equals(other) &&
-        static_cast<const ComponentId&>(other).component_ == component_ &&
-        static_cast<const ComponentId&>(other).content_name_ == content_name_;
+           static_cast<const ComponentId&>(other).component_ == component_ &&
+           static_cast<const ComponentId&>(other).content_name_ ==
+               content_name_;
   }
 
-  std::string ToString() const override {
-    return ToString("Channel-");
-  }
+  std::string ToString() const override { return ToString("Channel-"); }
 
  protected:
-  ComponentId(StatsReport::StatsType type, const std::string& content_name,
+  ComponentId(StatsReport::StatsType type,
+              const std::string& content_name,
               int component)
-      : IdBase(type),
-        content_name_(content_name),
-        component_(component) {}
+      : IdBase(type), content_name_(content_name), component_(component) {}
 
   std::string ToString(const char* prefix) const {
     std::string ret(prefix);
@@ -182,13 +177,14 @@
 class CandidatePairId : public ComponentId {
  public:
   CandidatePairId(const std::string& content_name, int component, int index)
-      : ComponentId(StatsReport::kStatsReportTypeCandidatePair, content_name,
-            component),
+      : ComponentId(StatsReport::kStatsReportTypeCandidatePair,
+                    content_name,
+                    component),
         index_(index) {}
 
   bool Equals(const IdBase& other) const override {
     return ComponentId::Equals(other) &&
-        static_cast<const CandidatePairId&>(other).index_ == index_;
+           static_cast<const CandidatePairId&>(other).index_ == index_;
   }
 
   std::string ToString() const override {
@@ -207,7 +203,9 @@
 StatsReport::IdBase::IdBase(StatsType type) : type_(type) {}
 StatsReport::IdBase::~IdBase() {}
 
-StatsReport::StatsType StatsReport::IdBase::type() const { return type_; }
+StatsReport::StatsType StatsReport::IdBase::type() const {
+  return type_;
+}
 
 bool StatsReport::IdBase::Equals(const IdBase& other) const {
   return other.type_ == type_;
@@ -316,8 +314,8 @@
 }
 
 bool StatsReport::Value::operator==(int64_t value) const {
-  return type_ == kInt ? value_.int_ == static_cast<int>(value) :
-      (type_ == kInt64 ? value_.int64_ == value : false);
+  return type_ == kInt ? value_.int_ == static_cast<int>(value)
+                       : (type_ == kInt64 ? value_.int64_ == value : false);
 }
 
 bool StatsReport::Value::operator==(bool value) const {
@@ -699,7 +697,9 @@
 
 // static
 StatsReport::Id StatsReport::NewIdWithDirection(
-    StatsType type, const std::string& id, StatsReport::Direction direction) {
+    StatsType type,
+    const std::string& id,
+    StatsReport::Direction direction) {
   return Id(new RefCountedObject<IdWithDirection>(type, id, direction));
 }
 
@@ -709,16 +709,17 @@
 }
 
 // static
-StatsReport::Id StatsReport::NewComponentId(
-    const std::string& content_name, int component) {
+StatsReport::Id StatsReport::NewComponentId(const std::string& content_name,
+                                            int component) {
   return Id(new RefCountedObject<ComponentId>(content_name, component));
 }
 
 // static
-StatsReport::Id StatsReport::NewCandidatePairId(
-    const std::string& content_name, int component, int index) {
-  return Id(new RefCountedObject<CandidatePairId>(
-      content_name, component, index));
+StatsReport::Id StatsReport::NewCandidatePairId(const std::string& content_name,
+                                                int component,
+                                                int index) {
+  return Id(
+      new RefCountedObject<CandidatePairId>(content_name, component, index));
 }
 
 const char* StatsReport::TypeToString() const {
@@ -763,8 +764,7 @@
     values_[name] = ValuePtr(new Value(name, value));
 }
 
-void StatsReport::AddId(StatsReport::StatsValueName name,
-                        const Id& value) {
+void StatsReport::AddId(StatsReport::StatsValueName name, const Id& value) {
   const Value* found = FindValue(name);
   if (!found || !(*found == value))
     values_[name] = ValuePtr(new Value(name, value));
@@ -775,8 +775,7 @@
   return it == values_.end() ? nullptr : it->second.get();
 }
 
-StatsCollection::StatsCollection() {
-}
+StatsCollection::StatsCollection() {}
 
 StatsCollection::~StatsCollection() {
   RTC_DCHECK(thread_checker_.CalledOnValidThread());
@@ -816,8 +815,9 @@
 StatsReport* StatsCollection::ReplaceOrAddNew(const StatsReport::Id& id) {
   RTC_DCHECK(thread_checker_.CalledOnValidThread());
   RTC_DCHECK(id.get());
-  Container::iterator it = std::find_if(list_.begin(), list_.end(),
-      [&id](const StatsReport* r)->bool { return r->id()->Equals(id); });
+  Container::iterator it = std::find_if(
+      list_.begin(), list_.end(),
+      [&id](const StatsReport* r) -> bool { return r->id()->Equals(id); });
   if (it != end()) {
     StatsReport* report = new StatsReport((*it)->id());
     delete *it;
@@ -831,8 +831,9 @@
 // will be returned.
 StatsReport* StatsCollection::Find(const StatsReport::Id& id) {
   RTC_DCHECK(thread_checker_.CalledOnValidThread());
-  Container::iterator it = std::find_if(list_.begin(), list_.end(),
-      [&id](const StatsReport* r)->bool { return r->id()->Equals(id); });
+  Container::iterator it = std::find_if(
+      list_.begin(), list_.end(),
+      [&id](const StatsReport* r) -> bool { return r->id()->Equals(id); });
   return it == list_.end() ? nullptr : *it;
 }
 
diff --git a/api/statstypes.h b/api/statstypes.h
index 4eac02d..857b1af 100644
--- a/api/statstypes.h
+++ b/api/statstypes.h
@@ -369,13 +369,14 @@
   static Id NewBandwidthEstimationId();
   static Id NewTypedId(StatsType type, const std::string& id);
   static Id NewTypedIntId(StatsType type, int id);
-  static Id NewIdWithDirection(
-      StatsType type, const std::string& id, Direction direction);
+  static Id NewIdWithDirection(StatsType type,
+                               const std::string& id,
+                               Direction direction);
   static Id NewCandidateId(bool local, const std::string& id);
-  static Id NewComponentId(
-      const std::string& content_name, int component);
-  static Id NewCandidatePairId(
-      const std::string& content_name, int component, int index);
+  static Id NewComponentId(const std::string& content_name, int component);
+  static Id NewCandidatePairId(const std::string& content_name,
+                               int component,
+                               int index);
 
   const Id& id() const { return id_; }
   StatsType type() const { return id_->type(); }
diff --git a/api/test/create_videocodec_test_fixture.cc b/api/test/create_videocodec_test_fixture.cc
index 007d91b..94b3dff 100644
--- a/api/test/create_videocodec_test_fixture.cc
+++ b/api/test/create_videocodec_test_fixture.cc
@@ -22,13 +22,12 @@
 
 using Config = VideoCodecTestFixture::Config;
 
-std::unique_ptr<VideoCodecTestFixture>
-CreateVideoCodecTestFixture(const Config& config) {
+std::unique_ptr<VideoCodecTestFixture> CreateVideoCodecTestFixture(
+    const Config& config) {
   return rtc::MakeUnique<VideoCodecTestFixtureImpl>(config);
 }
 
-std::unique_ptr<VideoCodecTestFixture>
-CreateVideoCodecTestFixture(
+std::unique_ptr<VideoCodecTestFixture> CreateVideoCodecTestFixture(
     const Config& config,
     std::unique_ptr<VideoDecoderFactory> decoder_factory,
     std::unique_ptr<VideoEncoderFactory> encoder_factory) {
diff --git a/api/test/fakeconstraints.h b/api/test/fakeconstraints.h
index 2010400..429826c 100644
--- a/api/test/fakeconstraints.h
+++ b/api/test/fakeconstraints.h
@@ -21,16 +21,12 @@
 
 class FakeConstraints : public webrtc::MediaConstraintsInterface {
  public:
-  FakeConstraints() { }
-  virtual ~FakeConstraints() { }
+  FakeConstraints() {}
+  virtual ~FakeConstraints() {}
 
-  virtual const Constraints& GetMandatory() const {
-    return mandatory_;
-  }
+  virtual const Constraints& GetMandatory() const { return mandatory_; }
 
-  virtual const Constraints& GetOptional() const {
-    return optional_;
-  }
+  virtual const Constraints& GetOptional() const { return optional_; }
 
   template <class T>
   void AddMandatory(const std::string& key, const T& value) {
diff --git a/api/turncustomizer.h b/api/turncustomizer.h
index 517abcc..85c4e77 100644
--- a/api/turncustomizer.h
+++ b/api/turncustomizer.h
@@ -18,7 +18,6 @@
 class StunMessage;
 }  // namespace cricket
 
-
 namespace webrtc {
 
 class TurnCustomizer {
diff --git a/api/video/encoded_frame.cc b/api/video/encoded_frame.cc
index a0ec1d6..ec8877c 100644
--- a/api/video/encoded_frame.cc
+++ b/api/video/encoded_frame.cc
@@ -13,9 +13,13 @@
 namespace webrtc {
 namespace video_coding {
 
-bool EncodedFrame::delayed_by_retransmission() const { return 0; }
+bool EncodedFrame::delayed_by_retransmission() const {
+  return 0;
+}
 
-uint32_t EncodedFrame::Timestamp() const { return timestamp; }
+uint32_t EncodedFrame::Timestamp() const {
+  return timestamp;
+}
 
 }  // namespace video_coding
 }  // namespace webrtc
diff --git a/api/video/i420_buffer.cc b/api/video/i420_buffer.cc
index 66071e1..8d239f3 100644
--- a/api/video/i420_buffer.cc
+++ b/api/video/i420_buffer.cc
@@ -34,8 +34,7 @@
 }  // namespace
 
 I420Buffer::I420Buffer(int width, int height)
-    : I420Buffer(width, height, width, (width + 1) / 2, (width + 1) / 2) {
-}
+    : I420Buffer(width, height, width, (width + 1) / 2, (width + 1) / 2) {}
 
 I420Buffer::I420Buffer(int width,
                        int height,
@@ -47,9 +46,9 @@
       stride_y_(stride_y),
       stride_u_(stride_u),
       stride_v_(stride_v),
-      data_(static_cast<uint8_t*>(AlignedMalloc(
-          I420DataSize(height, stride_y, stride_u, stride_v),
-          kBufferAlignment))) {
+      data_(static_cast<uint8_t*>(
+          AlignedMalloc(I420DataSize(height, stride_y, stride_u, stride_v),
+                        kBufferAlignment))) {
   RTC_DCHECK_GT(width, 0);
   RTC_DCHECK_GT(height, 0);
   RTC_DCHECK_GE(stride_y, width);
@@ -57,8 +56,7 @@
   RTC_DCHECK_GE(stride_v, (width + 1) / 2);
 }
 
-I420Buffer::~I420Buffer() {
-}
+I420Buffer::~I420Buffer() {}
 
 // static
 rtc::scoped_refptr<I420Buffer> I420Buffer::Create(int width, int height) {
@@ -71,34 +69,34 @@
                                                   int stride_y,
                                                   int stride_u,
                                                   int stride_v) {
-  return new rtc::RefCountedObject<I420Buffer>(
-      width, height, stride_y, stride_u, stride_v);
+  return new rtc::RefCountedObject<I420Buffer>(width, height, stride_y,
+                                               stride_u, stride_v);
 }
 
 // static
 rtc::scoped_refptr<I420Buffer> I420Buffer::Copy(
     const I420BufferInterface& source) {
-  return Copy(source.width(), source.height(),
-              source.DataY(), source.StrideY(),
-              source.DataU(), source.StrideU(),
-              source.DataV(), source.StrideV());
+  return Copy(source.width(), source.height(), source.DataY(), source.StrideY(),
+              source.DataU(), source.StrideU(), source.DataV(),
+              source.StrideV());
 }
 
 // static
-rtc::scoped_refptr<I420Buffer> I420Buffer::Copy(
-      int width, int height,
-      const uint8_t* data_y, int stride_y,
-      const uint8_t* data_u, int stride_u,
-      const uint8_t* data_v, int stride_v) {
+rtc::scoped_refptr<I420Buffer> I420Buffer::Copy(int width,
+                                                int height,
+                                                const uint8_t* data_y,
+                                                int stride_y,
+                                                const uint8_t* data_u,
+                                                int stride_u,
+                                                const uint8_t* data_v,
+                                                int stride_v) {
   // Note: May use different strides than the input data.
   rtc::scoped_refptr<I420Buffer> buffer = Create(width, height);
-  RTC_CHECK_EQ(0, libyuv::I420Copy(data_y, stride_y,
-                                   data_u, stride_u,
-                                   data_v, stride_v,
-                                   buffer->MutableDataY(), buffer->StrideY(),
-                                   buffer->MutableDataU(), buffer->StrideU(),
-                                   buffer->MutableDataV(), buffer->StrideV(),
-                                   width, height));
+  RTC_CHECK_EQ(0, libyuv::I420Copy(data_y, stride_y, data_u, stride_u, data_v,
+                                   stride_v, buffer->MutableDataY(),
+                                   buffer->StrideY(), buffer->MutableDataU(),
+                                   buffer->StrideU(), buffer->MutableDataV(),
+                                   buffer->StrideV(), width, height));
   return buffer;
 }
 
@@ -120,14 +118,13 @@
   rtc::scoped_refptr<webrtc::I420Buffer> buffer =
       I420Buffer::Create(rotated_width, rotated_height);
 
-  RTC_CHECK_EQ(0, libyuv::I420Rotate(
-      src.DataY(), src.StrideY(),
-      src.DataU(), src.StrideU(),
-      src.DataV(), src.StrideV(),
-      buffer->MutableDataY(), buffer->StrideY(), buffer->MutableDataU(),
-      buffer->StrideU(), buffer->MutableDataV(), buffer->StrideV(),
-      src.width(), src.height(),
-      static_cast<libyuv::RotationMode>(rotation)));
+  RTC_CHECK_EQ(0,
+               libyuv::I420Rotate(
+                   src.DataY(), src.StrideY(), src.DataU(), src.StrideU(),
+                   src.DataV(), src.StrideV(), buffer->MutableDataY(),
+                   buffer->StrideY(), buffer->MutableDataU(), buffer->StrideU(),
+                   buffer->MutableDataV(), buffer->StrideV(), src.width(),
+                   src.height(), static_cast<libyuv::RotationMode>(rotation)));
 
   return buffer;
 }
@@ -179,9 +176,9 @@
 void I420Buffer::SetBlack(I420Buffer* buffer) {
   RTC_CHECK(libyuv::I420Rect(buffer->MutableDataY(), buffer->StrideY(),
                              buffer->MutableDataU(), buffer->StrideU(),
-                             buffer->MutableDataV(), buffer->StrideV(),
-                             0, 0, buffer->width(), buffer->height(),
-                             0, 128, 128) == 0);
+                             buffer->MutableDataV(), buffer->StrideV(), 0, 0,
+                             buffer->width(), buffer->height(), 0, 128,
+                             128) == 0);
 }
 
 void I420Buffer::CropAndScaleFrom(const I420BufferInterface& src,
@@ -202,20 +199,16 @@
   offset_x = uv_offset_x * 2;
   offset_y = uv_offset_y * 2;
 
-  const uint8_t* y_plane =
-      src.DataY() + src.StrideY() * offset_y + offset_x;
+  const uint8_t* y_plane = src.DataY() + src.StrideY() * offset_y + offset_x;
   const uint8_t* u_plane =
       src.DataU() + src.StrideU() * uv_offset_y + uv_offset_x;
   const uint8_t* v_plane =
       src.DataV() + src.StrideV() * uv_offset_y + uv_offset_x;
-  int res = libyuv::I420Scale(y_plane, src.StrideY(),
-                              u_plane, src.StrideU(),
-                              v_plane, src.StrideV(),
-                              crop_width, crop_height,
-                              MutableDataY(), StrideY(),
-                              MutableDataU(), StrideU(),
-                              MutableDataV(), StrideV(),
-                              width(), height(), libyuv::kFilterBox);
+  int res =
+      libyuv::I420Scale(y_plane, src.StrideY(), u_plane, src.StrideU(), v_plane,
+                        src.StrideV(), crop_width, crop_height, MutableDataY(),
+                        StrideY(), MutableDataU(), StrideU(), MutableDataV(),
+                        StrideV(), width(), height(), libyuv::kFilterBox);
 
   RTC_DCHECK_EQ(res, 0);
 }
@@ -226,10 +219,8 @@
   const int crop_height =
       std::min(src.height(), height() * src.width() / width());
 
-  CropAndScaleFrom(
-      src,
-      (src.width() - crop_width) / 2, (src.height() - crop_height) / 2,
-      crop_width, crop_height);
+  CropAndScaleFrom(src, (src.width() - crop_width) / 2,
+                   (src.height() - crop_height) / 2, crop_width, crop_height);
 }
 
 void I420Buffer::ScaleFrom(const I420BufferInterface& src) {
diff --git a/api/video/i420_buffer.h b/api/video/i420_buffer.h
index 2bd37bd..282b242 100644
--- a/api/video/i420_buffer.h
+++ b/api/video/i420_buffer.h
@@ -36,11 +36,14 @@
     return Copy(*buffer.GetI420());
   }
 
-  static rtc::scoped_refptr<I420Buffer> Copy(
-      int width, int height,
-      const uint8_t* data_y, int stride_y,
-      const uint8_t* data_u, int stride_u,
-      const uint8_t* data_v, int stride_v);
+  static rtc::scoped_refptr<I420Buffer> Copy(int width,
+                                             int height,
+                                             const uint8_t* data_y,
+                                             int stride_y,
+                                             const uint8_t* data_u,
+                                             int stride_u,
+                                             const uint8_t* data_v,
+                                             int stride_v);
 
   // Returns a rotated copy of |src|.
   static rtc::scoped_refptr<I420Buffer> Rotate(const I420BufferInterface& src,
diff --git a/api/video/video_content_type.cc b/api/video/video_content_type.cc
index 149b4f9..9ba3ece 100644
--- a/api/video/video_content_type.cc
+++ b/api/video/video_content_type.cc
@@ -68,19 +68,16 @@
   return true;
 }
 
-uint8_t GetExperimentId(
-    const VideoContentType& content_type) {
+uint8_t GetExperimentId(const VideoContentType& content_type) {
   return (static_cast<uint8_t>(content_type) & kExperimentBitsMask) >>
          kExperimentShift;
 }
-uint8_t GetSimulcastId(
-    const VideoContentType& content_type) {
+uint8_t GetSimulcastId(const VideoContentType& content_type) {
   return (static_cast<uint8_t>(content_type) & kSimulcastBitsMask) >>
          kSimulcastShift;
 }
 
-bool IsScreenshare(
-    const VideoContentType& content_type) {
+bool IsScreenshare(const VideoContentType& content_type) {
   return (static_cast<uint8_t>(content_type) & kScreenshareBitsMask) > 0;
 }
 
diff --git a/api/video/video_frame.h b/api/video/video_frame.h
index bd54820..bd08346 100644
--- a/api/video/video_frame.h
+++ b/api/video/video_frame.h
@@ -13,8 +13,8 @@
 
 #include <stdint.h>
 
-#include "api/video/video_rotation.h"
 #include "api/video/video_frame_buffer.h"
+#include "api/video/video_rotation.h"
 
 namespace webrtc {
 
diff --git a/api/video_codecs/video_codec.cc b/api/video_codecs/video_codec.cc
index c5d9ea9..6eccb00 100644
--- a/api/video_codecs/video_codec.cc
+++ b/api/video_codecs/video_codec.cc
@@ -46,21 +46,18 @@
 bool VideoCodecH264::operator==(const VideoCodecH264& other) const {
   return (frameDroppingOn == other.frameDroppingOn &&
           keyFrameInterval == other.keyFrameInterval &&
-          spsLen == other.spsLen &&
-          ppsLen == other.ppsLen &&
+          spsLen == other.spsLen && ppsLen == other.ppsLen &&
           profile == other.profile &&
           (spsLen == 0 || memcmp(spsData, other.spsData, spsLen) == 0) &&
           (ppsLen == 0 || memcmp(ppsData, other.ppsData, ppsLen) == 0));
 }
 
 bool SpatialLayer::operator==(const SpatialLayer& other) const {
-  return (width == other.width &&
-          height == other.height &&
+  return (width == other.width && height == other.height &&
           numberOfTemporalLayers == other.numberOfTemporalLayers &&
           maxBitrate == other.maxBitrate &&
           targetBitrate == other.targetBitrate &&
-          minBitrate == other.minBitrate &&
-          qpMax == other.qpMax &&
+          minBitrate == other.minBitrate && qpMax == other.qpMax &&
           active == other.active);
 }
 
diff --git a/api/videosourceproxy.h b/api/videosourceproxy.h
index f2d8be0..0bb6d48 100644
--- a/api/videosourceproxy.h
+++ b/api/videosourceproxy.h
@@ -11,8 +11,8 @@
 #ifndef API_VIDEOSOURCEPROXY_H_
 #define API_VIDEOSOURCEPROXY_H_
 
-#include "api/proxy.h"
 #include "api/mediastreaminterface.h"
+#include "api/proxy.h"
 
 namespace webrtc {
 
@@ -21,19 +21,19 @@
 // TODO(deadbeef): Move this to .cc file and out of api/. What threads methods
 // are called on is an implementation detail.
 BEGIN_PROXY_MAP(VideoTrackSource)
-  PROXY_SIGNALING_THREAD_DESTRUCTOR()
-  PROXY_CONSTMETHOD0(SourceState, state)
-  PROXY_CONSTMETHOD0(bool, remote)
-  PROXY_CONSTMETHOD0(bool, is_screencast)
-  PROXY_CONSTMETHOD0(rtc::Optional<bool>, needs_denoising)
-  PROXY_METHOD1(bool, GetStats, Stats*)
-  PROXY_WORKER_METHOD2(void,
-                       AddOrUpdateSink,
-                       rtc::VideoSinkInterface<VideoFrame>*,
-                       const rtc::VideoSinkWants&)
-  PROXY_WORKER_METHOD1(void, RemoveSink, rtc::VideoSinkInterface<VideoFrame>*)
-  PROXY_METHOD1(void, RegisterObserver, ObserverInterface*)
-  PROXY_METHOD1(void, UnregisterObserver, ObserverInterface*)
+PROXY_SIGNALING_THREAD_DESTRUCTOR()
+PROXY_CONSTMETHOD0(SourceState, state)
+PROXY_CONSTMETHOD0(bool, remote)
+PROXY_CONSTMETHOD0(bool, is_screencast)
+PROXY_CONSTMETHOD0(rtc::Optional<bool>, needs_denoising)
+PROXY_METHOD1(bool, GetStats, Stats*)
+PROXY_WORKER_METHOD2(void,
+                     AddOrUpdateSink,
+                     rtc::VideoSinkInterface<VideoFrame>*,
+                     const rtc::VideoSinkWants&)
+PROXY_WORKER_METHOD1(void, RemoveSink, rtc::VideoSinkInterface<VideoFrame>*)
+PROXY_METHOD1(void, RegisterObserver, ObserverInterface*)
+PROXY_METHOD1(void, UnregisterObserver, ObserverInterface*)
 END_PROXY_MAP()
 
 }  // namespace webrtc