Delete deprecated PlatformThread looping

Bug: webrtc:10594, webrtc:7187
Change-Id: Icba3a5cf6dbe817ead427c27645b3ad7bc8819be
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134642
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27833}
diff --git a/rtc_base/platform_thread.h b/rtc_base/platform_thread.h
index 99c5f90..d7f9a49 100644
--- a/rtc_base/platform_thread.h
+++ b/rtc_base/platform_thread.h
@@ -24,9 +24,6 @@
 namespace rtc {
 
 // Callback function that the spawned thread will enter once spawned.
-// A return value of false is interpreted as that the function has no
-// more work to do and that the thread can be released.
-typedef bool (*ThreadRunFunctionDeprecated)(void*);
 typedef void (*ThreadRunFunction)(void*);
 
 enum ThreadPriority {
@@ -50,9 +47,6 @@
 // called from the same thread, including instantiation.
 class PlatformThread {
  public:
-  PlatformThread(ThreadRunFunctionDeprecated func,
-                 void* obj,
-                 absl::string_view thread_name);
   PlatformThread(ThreadRunFunction func,
                  void* obj,
                  absl::string_view thread_name,
@@ -74,10 +68,6 @@
   // Stops (joins) the spawned thread.
   void Stop();
 
-  // Set the priority of the thread. Must be called when thread is running.
-  // TODO(tommi): Make private and only allow public support via ctor.
-  bool SetPriority(ThreadPriority priority);
-
  protected:
 #if defined(WEBRTC_WIN)
   // Exposed to derived classes to allow for special cases specific to Windows.
@@ -86,8 +76,8 @@
 
  private:
   void Run();
+  bool SetPriority(ThreadPriority priority);
 
-  ThreadRunFunctionDeprecated const run_function_deprecated_ = nullptr;
   ThreadRunFunction const run_function_ = nullptr;
   const ThreadPriority priority_ = kNormalPriority;
   void* const obj_;
@@ -105,9 +95,6 @@
 #else
   static void* StartThread(void* param);
 
-  // An atomic flag that we use to stop the thread. Only modified on the
-  // controlling thread and checked on the worker thread.
-  volatile int stop_flag_ = 0;
   pthread_t thread_ = 0;
 #endif  // defined(WEBRTC_WIN)
   RTC_DISALLOW_COPY_AND_ASSIGN(PlatformThread);