Delete method StreamInterface::ReserveSize

Bug: webrtc:6424
Change-Id: I33d62599423b6c88c8e7117c347b7e0133d39943
Reviewed-on: https://webrtc-review.googlesource.com/c/116963
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26220}
diff --git a/rtc_base/logging_unittest.cc b/rtc_base/logging_unittest.cc
index f804823..a7945f2 100644
--- a/rtc_base/logging_unittest.cc
+++ b/rtc_base/logging_unittest.cc
@@ -42,7 +42,6 @@
   void Close() override;
   bool SetPosition(size_t position) override;
   bool GetPosition(size_t* position) const override;
-  bool ReserveSize(size_t size) override;
 
  private:
   std::string& str_;
@@ -106,13 +105,6 @@
   return true;
 }
 
-bool StringStream::ReserveSize(size_t size) {
-  if (read_only_)
-    return false;
-  str_.reserve(size);
-  return true;
-}
-
 }  // namespace
 
 template <typename Base>
diff --git a/rtc_base/memory_stream.h b/rtc_base/memory_stream.h
index 0f5deb5..51f81d6 100644
--- a/rtc_base/memory_stream.h
+++ b/rtc_base/memory_stream.h
@@ -39,7 +39,7 @@
   bool SetPosition(size_t position) override;
   bool GetPosition(size_t* position) const override;
   bool GetSize(size_t* size) const;
-  bool ReserveSize(size_t size) override;
+  bool ReserveSize(size_t size);
 
   char* GetBuffer() { return buffer_; }
   const char* GetBuffer() const { return buffer_; }
diff --git a/rtc_base/stream.cc b/rtc_base/stream.cc
index 98dc1d8..0541bf6 100644
--- a/rtc_base/stream.cc
+++ b/rtc_base/stream.cc
@@ -89,10 +89,6 @@
   return false;
 }
 
-bool StreamInterface::ReserveSize(size_t size) {
-  return true;
-}
-
 StreamInterface::StreamInterface() {}
 
 void StreamInterface::OnMessage(Message* msg) {
@@ -141,10 +137,6 @@
   return stream_->GetPosition(position);
 }
 
-bool StreamAdapterInterface::ReserveSize(size_t size) {
-  return stream_->ReserveSize(size);
-}
-
 bool StreamAdapterInterface::Flush() {
   return stream_->Flush();
 }
@@ -308,11 +300,6 @@
   return true;
 }
 
-bool FileStream::ReserveSize(size_t size) {
-  // TODO: extend the file to the proper length
-  return true;
-}
-
 bool FileStream::Flush() {
   if (file_) {
     return (0 == fflush(file_));
diff --git a/rtc_base/stream.h b/rtc_base/stream.h
index c74433b..f643114 100644
--- a/rtc_base/stream.h
+++ b/rtc_base/stream.h
@@ -119,13 +119,6 @@
   // Return true if flush is successful.
   virtual bool Flush();
 
-  // Communicates the amount of data which will be written to the stream.  The
-  // stream may choose to preallocate memory to accomodate this data.  The
-  // stream may return false to indicate that there is not enough room (ie,
-  // Write will return SR_EOS/SR_ERROR at some point).  Note that calling this
-  // function should not affect the existing state of data in the stream.
-  virtual bool ReserveSize(size_t size);
-
   //
   // CONVENIENCE METHODS
   //
@@ -189,7 +182,6 @@
 
   bool SetPosition(size_t position) override;
   bool GetPosition(size_t* position) const override;
-  bool ReserveSize(size_t size) override;
   bool Flush() override;
 
   void Attach(StreamInterface* stream, bool owned = true);
@@ -242,7 +234,6 @@
   void Close() override;
   bool SetPosition(size_t position) override;
   bool GetPosition(size_t* position) const override;
-  bool ReserveSize(size_t size) override;
 
   bool Flush() override;