Remove mutable from rtc::CriticalSection members.

rtc::CriticalSection is now lockable from const methods and no longer
need to remain mutable.

BUG=
R=tommi@webrtc.org

Review URL: https://codereview.webrtc.org/1613643004

Cr-Commit-Position: refs/heads/master@{#11367}
diff --git a/webrtc/audio/audio_state.h b/webrtc/audio/audio_state.h
index 2cb83e4..6bee3c6 100644
--- a/webrtc/audio/audio_state.h
+++ b/webrtc/audio/audio_state.h
@@ -47,7 +47,7 @@
 
   // The critical section isn't strictly needed in this case, but xSAN bots may
   // trigger on unprotected cross-thread access.
-  mutable rtc::CriticalSection crit_sect_;
+  rtc::CriticalSection crit_sect_;
   bool typing_noise_detected_ GUARDED_BY(crit_sect_) = false;
 
   // Reference count; implementation copied from rtc::RefCountedObject.
diff --git a/webrtc/base/bufferqueue.h b/webrtc/base/bufferqueue.h
index 458f018..89ffdf0 100644
--- a/webrtc/base/bufferqueue.h
+++ b/webrtc/base/bufferqueue.h
@@ -45,7 +45,7 @@
  private:
   size_t capacity_;
   size_t default_size_;
-  mutable CriticalSection crit_;
+  CriticalSection crit_;
   std::deque<Buffer*> queue_ GUARDED_BY(crit_);
   std::vector<Buffer*> free_list_ GUARDED_BY(crit_);
 
diff --git a/webrtc/base/messagequeue.h b/webrtc/base/messagequeue.h
index c3ab3b6..856a6eb 100644
--- a/webrtc/base/messagequeue.h
+++ b/webrtc/base/messagequeue.h
@@ -251,7 +251,7 @@
   MessageList msgq_;
   PriorityQueue dmsgq_;
   uint32_t dmsgq_next_num_;
-  mutable CriticalSection crit_;
+  CriticalSection crit_;
 
  private:
   RTC_DISALLOW_COPY_AND_ASSIGN(MessageQueue);
diff --git a/webrtc/base/physicalsocketserver.h b/webrtc/base/physicalsocketserver.h
index ae1f10f..cbe6580 100644
--- a/webrtc/base/physicalsocketserver.h
+++ b/webrtc/base/physicalsocketserver.h
@@ -172,7 +172,7 @@
   SOCKET s_;
   uint8_t enabled_events_;
   bool udp_;
-  mutable CriticalSection crit_;
+  CriticalSection crit_;
   int error_ GUARDED_BY(crit_);
   ConnState state_;
   AsyncResolver* resolver_;
diff --git a/webrtc/base/stream.h b/webrtc/base/stream.h
index c57daae..98123b8 100644
--- a/webrtc/base/stream.h
+++ b/webrtc/base/stream.h
@@ -555,7 +555,7 @@
   size_t data_length_;  // amount of readable data in the buffer
   size_t read_position_;  // offset to the readable data
   Thread* owner_;  // stream callbacks are dispatched on this thread
-  mutable CriticalSection crit_;  // object lock
+  CriticalSection crit_;  // object lock
   RTC_DISALLOW_COPY_AND_ASSIGN(FifoBuffer);
 };
 
diff --git a/webrtc/base/thread_checker_impl.h b/webrtc/base/thread_checker_impl.h
index 0455835..b9867c3 100644
--- a/webrtc/base/thread_checker_impl.h
+++ b/webrtc/base/thread_checker_impl.h
@@ -37,7 +37,7 @@
   void DetachFromThread();
 
  private:
-  mutable CriticalSection lock_;
+  CriticalSection lock_;
   // This is mutable so that CalledOnValidThread can set it.
   // It's guarded by |lock_|.
   mutable PlatformThreadRef valid_thread_;
diff --git a/webrtc/base/thread_unittest.cc b/webrtc/base/thread_unittest.cc
index 7ed4326..240ffc4 100644
--- a/webrtc/base/thread_unittest.cc
+++ b/webrtc/base/thread_unittest.cc
@@ -164,7 +164,7 @@
   }
 
  private:
-  mutable CriticalSection cs_;
+  CriticalSection cs_;
   bool flag_;
 };
 
diff --git a/webrtc/call/bitrate_allocator.h b/webrtc/call/bitrate_allocator.h
index 88a9960..5028e12 100644
--- a/webrtc/call/bitrate_allocator.h
+++ b/webrtc/call/bitrate_allocator.h
@@ -89,7 +89,7 @@
   ObserverBitrateMap LowRateAllocation(uint32_t bitrate)
       EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
 
-  mutable rtc::CriticalSection crit_sect_;
+  rtc::CriticalSection crit_sect_;
   // Stored in a list to keep track of the insertion order.
   BitrateObserverConfList bitrate_observers_ GUARDED_BY(crit_sect_);
   bool bitrate_observers_modified_ GUARDED_BY(crit_sect_);
diff --git a/webrtc/call/call_perf_tests.cc b/webrtc/call/call_perf_tests.cc
index fa81953..3ee49d9 100644
--- a/webrtc/call/call_perf_tests.cc
+++ b/webrtc/call/call_perf_tests.cc
@@ -113,7 +113,7 @@
     ntp_rtp_pairs_.push_front(ntp_rtp_pair);
   }
 
-  mutable rtc::CriticalSection crit_;
+  rtc::CriticalSection crit_;
   RtcpList ntp_rtp_pairs_ GUARDED_BY(crit_);
 };
 
diff --git a/webrtc/call/congestion_controller.h b/webrtc/call/congestion_controller.h
index b77c46f..5f5e590 100644
--- a/webrtc/call/congestion_controller.h
+++ b/webrtc/call/congestion_controller.h
@@ -74,7 +74,7 @@
   rtc::scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_;
   rtc::scoped_ptr<RemoteEstimatorProxy> remote_estimator_proxy_;
 
-  mutable rtc::CriticalSection encoder_crit_;
+  rtc::CriticalSection encoder_crit_;
   std::vector<ViEEncoder*> encoders_ GUARDED_BY(encoder_crit_);
 
   // Registered at construct time and assumed to outlive this class.
diff --git a/webrtc/common_video/include/incoming_video_stream.h b/webrtc/common_video/include/incoming_video_stream.h
index e24b2c6..ecc4d5e 100644
--- a/webrtc/common_video/include/incoming_video_stream.h
+++ b/webrtc/common_video/include/incoming_video_stream.h
@@ -77,9 +77,9 @@
   uint32_t const stream_id_;
   const bool disable_prerenderer_smoothing_;
   // Critsects in allowed to enter order.
-  mutable rtc::CriticalSection stream_critsect_;
-  mutable rtc::CriticalSection thread_critsect_;
-  mutable rtc::CriticalSection buffer_critsect_;
+  rtc::CriticalSection stream_critsect_;
+  rtc::CriticalSection thread_critsect_;
+  rtc::CriticalSection buffer_critsect_;
   // TODO(pbos): Make plain member and stop resetting this thread, just
   // start/stoping it is enough.
   rtc::scoped_ptr<rtc::PlatformThread> incoming_render_thread_
diff --git a/webrtc/modules/audio_coding/acm2/acm_receiver.h b/webrtc/modules/audio_coding/acm2/acm_receiver.h
index 826cb45..d1ca504 100644
--- a/webrtc/modules/audio_coding/acm2/acm_receiver.h
+++ b/webrtc/modules/audio_coding/acm2/acm_receiver.h
@@ -281,7 +281,7 @@
 
   uint32_t NowInTimestamp(int decoder_sampling_rate) const;
 
-  mutable rtc::CriticalSection crit_sect_;
+  rtc::CriticalSection crit_sect_;
   int id_;  // TODO(henrik.lundin) Make const.
   const Decoder* last_audio_decoder_ GUARDED_BY(crit_sect_);
   AudioFrame::VADActivity previous_audio_activity_ GUARDED_BY(crit_sect_);
diff --git a/webrtc/modules/audio_coding/acm2/audio_coding_module_impl.h b/webrtc/modules/audio_coding/acm2/audio_coding_module_impl.h
index 2a3bc61..6750a91 100644
--- a/webrtc/modules/audio_coding/acm2/audio_coding_module_impl.h
+++ b/webrtc/modules/audio_coding/acm2/audio_coding_module_impl.h
@@ -240,7 +240,7 @@
   // to |index|.
   int UpdateUponReceivingCodec(int index);
 
-  mutable rtc::CriticalSection acm_crit_sect_;
+  rtc::CriticalSection acm_crit_sect_;
   rtc::Buffer encode_buffer_ GUARDED_BY(acm_crit_sect_);
   int id_;  // TODO(henrik.lundin) Make const.
   uint32_t expected_codec_ts_ GUARDED_BY(acm_crit_sect_);
@@ -274,7 +274,7 @@
   uint32_t last_timestamp_ GUARDED_BY(acm_crit_sect_);
   uint32_t last_rtp_timestamp_ GUARDED_BY(acm_crit_sect_);
 
-  mutable rtc::CriticalSection callback_crit_sect_;
+  rtc::CriticalSection callback_crit_sect_;
   AudioPacketizationCallback* packetization_callback_
       GUARDED_BY(callback_crit_sect_);
   ACMVADCallback* vad_callback_ GUARDED_BY(callback_crit_sect_);
diff --git a/webrtc/modules/audio_coding/acm2/audio_coding_module_unittest_oldapi.cc b/webrtc/modules/audio_coding/acm2/audio_coding_module_unittest_oldapi.cc
index c738d0f..384db86 100644
--- a/webrtc/modules/audio_coding/acm2/audio_coding_module_unittest_oldapi.cc
+++ b/webrtc/modules/audio_coding/acm2/audio_coding_module_unittest_oldapi.cc
@@ -147,7 +147,7 @@
   int last_payload_type_ GUARDED_BY(crit_sect_);
   uint32_t last_timestamp_ GUARDED_BY(crit_sect_);
   std::vector<uint8_t> last_payload_vec_ GUARDED_BY(crit_sect_);
-  mutable rtc::CriticalSection crit_sect_;
+  rtc::CriticalSection crit_sect_;
 };
 
 class AudioCodingModuleTestOldApi : public ::testing::Test {
@@ -579,7 +579,7 @@
   int send_count_;
   int insert_packet_count_;
   int pull_audio_count_ GUARDED_BY(crit_sect_);
-  mutable rtc::CriticalSection crit_sect_;
+  rtc::CriticalSection crit_sect_;
   int64_t next_insert_packet_time_ms_ GUARDED_BY(crit_sect_);
   rtc::scoped_ptr<SimulatedClock> fake_clock_;
 };
@@ -842,7 +842,7 @@
   rtc::PlatformThread receive_thread_;
   rtc::PlatformThread codec_registration_thread_;
   const rtc::scoped_ptr<EventWrapper> test_complete_;
-  mutable rtc::CriticalSection crit_sect_;
+  rtc::CriticalSection crit_sect_;
   bool codec_registered_ GUARDED_BY(crit_sect_);
   int receive_packet_count_ GUARDED_BY(crit_sect_);
   int64_t next_insert_packet_time_ms_ GUARDED_BY(crit_sect_);
diff --git a/webrtc/modules/audio_coding/codecs/isac/locked_bandwidth_info.h b/webrtc/modules/audio_coding/codecs/isac/locked_bandwidth_info.h
index 9996cbd..002af8c 100644
--- a/webrtc/modules/audio_coding/codecs/isac/locked_bandwidth_info.h
+++ b/webrtc/modules/audio_coding/codecs/isac/locked_bandwidth_info.h
@@ -36,7 +36,7 @@
   }
 
  private:
-  mutable rtc::CriticalSection lock_;
+  rtc::CriticalSection lock_;
   IsacBandwidthInfo bwinfo_ GUARDED_BY(lock_);
 };
 
diff --git a/webrtc/modules/audio_coding/neteq/neteq_impl.h b/webrtc/modules/audio_coding/neteq/neteq_impl.h
index 817b697..02adcd3 100644
--- a/webrtc/modules/audio_coding/neteq/neteq_impl.h
+++ b/webrtc/modules/audio_coding/neteq/neteq_impl.h
@@ -338,7 +338,7 @@
   // Creates DecisionLogic object with the mode given by |playout_mode_|.
   virtual void CreateDecisionLogic() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
 
-  mutable rtc::CriticalSection crit_sect_;
+  rtc::CriticalSection crit_sect_;
   const rtc::scoped_ptr<BufferLevelFilter> buffer_level_filter_
       GUARDED_BY(crit_sect_);
   const rtc::scoped_ptr<DecoderDatabase> decoder_database_
diff --git a/webrtc/modules/audio_coding/test/Channel.h b/webrtc/modules/audio_coding/test/Channel.h
index 3dcd499..5910fad 100644
--- a/webrtc/modules/audio_coding/test/Channel.h
+++ b/webrtc/modules/audio_coding/test/Channel.h
@@ -100,7 +100,7 @@
   // 60msec * 32 sample(max)/msec * 2 description (maybe) * 2 bytes/sample
   uint8_t _payloadData[60 * 32 * 2 * 2];
 
-  mutable rtc::CriticalSection _channelCritSect;
+  rtc::CriticalSection _channelCritSect;
   FILE* _bitStreamFile;
   bool _saveBitStream;
   int16_t _lastPayloadType;
diff --git a/webrtc/modules/audio_processing/audio_processing_impl.h b/webrtc/modules/audio_processing/audio_processing_impl.h
index fbb9b6e..5da3996 100644
--- a/webrtc/modules/audio_processing/audio_processing_impl.h
+++ b/webrtc/modules/audio_processing/audio_processing_impl.h
@@ -239,15 +239,15 @@
       EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
 
   // Critical section.
-  mutable rtc::CriticalSection crit_debug_;
+  rtc::CriticalSection crit_debug_;
 
   // Debug dump state.
   ApmDebugDumpState debug_dump_;
 #endif
 
   // Critical sections.
-  mutable rtc::CriticalSection crit_render_ ACQUIRED_BEFORE(crit_capture_);
-  mutable rtc::CriticalSection crit_capture_;
+  rtc::CriticalSection crit_render_ ACQUIRED_BEFORE(crit_capture_);
+  rtc::CriticalSection crit_capture_;
 
   // Structs containing the pointers to the submodules.
   rtc::scoped_ptr<ApmPublicSubmodules> public_submodules_;
diff --git a/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc b/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc
index e1e6a31..3d2c71f 100644
--- a/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc
+++ b/webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.cc
@@ -298,7 +298,7 @@
   }
 
  private:
-  mutable rtc::CriticalSection crit_;
+  rtc::CriticalSection crit_;
   int render_count GUARDED_BY(crit_) = 0;
   int capture_count GUARDED_BY(crit_) = 0;
 };
diff --git a/webrtc/modules/audio_processing/audio_processing_performance_unittest.cc b/webrtc/modules/audio_processing/audio_processing_performance_unittest.cc
index 0c8c060..285f600 100644
--- a/webrtc/modules/audio_processing/audio_processing_performance_unittest.cc
+++ b/webrtc/modules/audio_processing/audio_processing_performance_unittest.cc
@@ -202,7 +202,7 @@
   }
 
  private:
-  mutable rtc::CriticalSection crit_;
+  rtc::CriticalSection crit_;
   int render_count_ GUARDED_BY(crit_) = 0;
   int capture_count_ GUARDED_BY(crit_) = 0;
 };
@@ -221,7 +221,7 @@
   }
 
  private:
-  mutable rtc::CriticalSection crit_;
+  rtc::CriticalSection crit_;
   bool flag_ GUARDED_BY(crit_) = false;
 };
 
diff --git a/webrtc/modules/bitrate_controller/bitrate_controller_impl.h b/webrtc/modules/bitrate_controller/bitrate_controller_impl.h
index d7888cc..74f3c14 100644
--- a/webrtc/modules/bitrate_controller/bitrate_controller_impl.h
+++ b/webrtc/modules/bitrate_controller/bitrate_controller_impl.h
@@ -74,7 +74,7 @@
   BitrateObserver* observer_;
   int64_t last_bitrate_update_ms_;
 
-  mutable rtc::CriticalSection critsect_;
+  rtc::CriticalSection critsect_;
   SendSideBandwidthEstimation bandwidth_estimation_ GUARDED_BY(critsect_);
   uint32_t reserved_bitrate_bps_ GUARDED_BY(critsect_);
 
diff --git a/webrtc/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.h b/webrtc/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.h
index 97ed41a..8551689 100644
--- a/webrtc/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.h
+++ b/webrtc/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.h
@@ -9,8 +9,8 @@
  *
  */
 
-#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_FRAME_BUFFER_POOL_H_
-#define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_FRAME_BUFFER_POOL_H_
+#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_VP9_FRAME_BUFFER_POOL_H_
+#define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_VP9_FRAME_BUFFER_POOL_H_
 
 #include <vector>
 
@@ -103,7 +103,7 @@
 
  private:
   // Protects |allocated_buffers_|.
-  mutable rtc::CriticalSection buffers_lock_;
+  rtc::CriticalSection buffers_lock_;
   // All buffers, in use or ready to be recycled.
   std::vector<rtc::scoped_refptr<Vp9FrameBuffer>> allocated_buffers_
       GUARDED_BY(buffers_lock_);
@@ -114,4 +114,4 @@
 
 }  // namespace webrtc
 
-#endif  // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_FRAME_BUFFER_POOL_H_
+#endif  // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_VP9_FRAME_BUFFER_POOL_H_
diff --git a/webrtc/modules/video_coding/generic_encoder.h b/webrtc/modules/video_coding/generic_encoder.h
index f739edb..da7297f 100644
--- a/webrtc/modules/video_coding/generic_encoder.h
+++ b/webrtc/modules/video_coding/generic_encoder.h
@@ -138,7 +138,7 @@
   VideoEncoderRateObserver* const rate_observer_;
   VCMEncodedFrameCallback* const vcm_encoded_frame_callback_;
   const bool internal_source_;
-  mutable rtc::CriticalSection params_lock_;
+  rtc::CriticalSection params_lock_;
   EncoderParameters encoder_params_ GUARDED_BY(params_lock_);
   VideoRotation rotation_;
   bool is_screenshare_;
diff --git a/webrtc/modules/video_coding/video_coding_impl.h b/webrtc/modules/video_coding/video_coding_impl.h
index 1ed96e1..7373325 100644
--- a/webrtc/modules/video_coding/video_coding_impl.h
+++ b/webrtc/modules/video_coding/video_coding_impl.h
@@ -104,7 +104,7 @@
   Clock* const clock_;
 
   rtc::scoped_ptr<CriticalSectionWrapper> process_crit_sect_;
-  mutable rtc::CriticalSection encoder_crit_;
+  rtc::CriticalSection encoder_crit_;
   VCMGenericEncoder* _encoder;
   VCMEncodedFrameCallback _encodedFrameCallback GUARDED_BY(encoder_crit_);
   media_optimization::MediaOptimization _mediaOpt;
diff --git a/webrtc/modules/video_processing/video_processing_impl.h b/webrtc/modules/video_processing/video_processing_impl.h
index edbaba1..1d9a377 100644
--- a/webrtc/modules/video_processing/video_processing_impl.h
+++ b/webrtc/modules/video_processing/video_processing_impl.h
@@ -44,7 +44,7 @@
   VideoContentMetrics* GetContentMetrics() const override;
 
  private:
-  mutable rtc::CriticalSection mutex_;
+  rtc::CriticalSection mutex_;
   VPMDeflickering deflickering_ GUARDED_BY(mutex_);
   VPMBrightnessDetection brightness_detection_;
   VPMFramePreprocessor frame_pre_processor_;
diff --git a/webrtc/system_wrappers/source/clock.cc b/webrtc/system_wrappers/source/clock.cc
index 95df256..926b95a 100644
--- a/webrtc/system_wrappers/source/clock.cc
+++ b/webrtc/system_wrappers/source/clock.cc
@@ -179,7 +179,7 @@
   }
 
   // mutable as time-accessing functions are const.
-  mutable rtc::CriticalSection crit_;
+  rtc::CriticalSection crit_;
   mutable DWORD last_time_ms_;
   mutable LONG num_timer_wraps_;
   const ReferencePoint ref_point_;
diff --git a/webrtc/test/fake_audio_device.h b/webrtc/test/fake_audio_device.h
index 7ca657b..ce480c1 100644
--- a/webrtc/test/fake_audio_device.h
+++ b/webrtc/test/fake_audio_device.h
@@ -58,7 +58,7 @@
 
   Clock* clock_;
   rtc::scoped_ptr<EventTimerWrapper> tick_;
-  mutable rtc::CriticalSection lock_;
+  rtc::CriticalSection lock_;
   rtc::PlatformThread thread_;
   rtc::scoped_ptr<ModuleFileUtility> file_utility_;
   rtc::scoped_ptr<FileWrapper> input_stream_;
diff --git a/webrtc/test/fake_network_pipe.h b/webrtc/test/fake_network_pipe.h
index 5d589d8..99c5c13 100644
--- a/webrtc/test/fake_network_pipe.h
+++ b/webrtc/test/fake_network_pipe.h
@@ -71,7 +71,7 @@
 
  private:
   Clock* const clock_;
-  mutable rtc::CriticalSection lock_;
+  rtc::CriticalSection lock_;
   PacketReceiver* packet_receiver_;
   std::queue<NetworkPacket*> capacity_link_;
   std::queue<NetworkPacket*> delay_link_;
diff --git a/webrtc/video/overuse_frame_detector.h b/webrtc/video/overuse_frame_detector.h
index d2606c1..0ef2e43 100644
--- a/webrtc/video/overuse_frame_detector.h
+++ b/webrtc/video/overuse_frame_detector.h
@@ -119,7 +119,7 @@
   // processing thread.
   // TODO(asapersson): See if we can reduce locking.  As is, video frame
   // processing contends with reading stats and the processing thread.
-  mutable rtc::CriticalSection crit_;
+  rtc::CriticalSection crit_;
 
   const CpuOveruseOptions options_;
 
diff --git a/webrtc/video/receive_statistics_proxy.h b/webrtc/video/receive_statistics_proxy.h
index 87cb950..0692297 100644
--- a/webrtc/video/receive_statistics_proxy.h
+++ b/webrtc/video/receive_statistics_proxy.h
@@ -95,7 +95,7 @@
 
   Clock* const clock_;
 
-  mutable rtc::CriticalSection crit_;
+  rtc::CriticalSection crit_;
   VideoReceiveStream::Stats stats_ GUARDED_BY(crit_);
   RateStatistics decode_fps_estimator_ GUARDED_BY(crit_);
   RateStatistics renders_fps_estimator_ GUARDED_BY(crit_);
diff --git a/webrtc/video/send_statistics_proxy.h b/webrtc/video/send_statistics_proxy.h
index 7f6df06..f4c3f5a 100644
--- a/webrtc/video/send_statistics_proxy.h
+++ b/webrtc/video/send_statistics_proxy.h
@@ -131,7 +131,7 @@
 
   Clock* const clock_;
   const VideoSendStream::Config config_;
-  mutable rtc::CriticalSection crit_;
+  rtc::CriticalSection crit_;
   VideoEncoderConfig::ContentType content_type_ GUARDED_BY(crit_);
   VideoSendStream::Stats stats_ GUARDED_BY(crit_);
   uint32_t last_sent_frame_timestamp_ GUARDED_BY(crit_);
diff --git a/webrtc/video/video_send_stream_tests.cc b/webrtc/video/video_send_stream_tests.cc
index 6014f05..00aa2a9 100644
--- a/webrtc/video/video_send_stream_tests.cc
+++ b/webrtc/video/video_send_stream_tests.cc
@@ -1079,7 +1079,7 @@
     }
 
    private:
-    mutable rtc::CriticalSection crit_;
+    rtc::CriticalSection crit_;
     int start_bitrate_kbps_ GUARDED_BY(crit_);
   };