diff --git a/rtc_base/platform_thread.cc b/rtc_base/platform_thread.cc index 5f4e3e61bc..9495ef43a3 100644 --- a/rtc_base/platform_thread.cc +++ b/rtc_base/platform_thread.cc @@ -297,8 +297,8 @@ bool PlatformThread::SetPriority(ThreadPriority priority) { #if defined(WEBRTC_WIN) return SetThreadPriority(thread_, priority) != FALSE; -#elif defined(__native_client__) - // Setting thread priorities is not supported in NaCl. +#elif defined(__native_client__) || defined(WEBRTC_FUCHSIA) + // Setting thread priorities is not supported in NaCl or Fuchsia. return true; #elif defined(WEBRTC_CHROMIUM_BUILD) && defined(WEBRTC_LINUX) // TODO(tommi): Switch to the same mechanism as Chromium uses for changing diff --git a/rtc_base/stream.cc b/rtc_base/stream.cc index b75490bf80..d9373535a5 100644 --- a/rtc_base/stream.cc +++ b/rtc_base/stream.cc @@ -481,30 +481,6 @@ bool FileStream::Flush() { return false; } -#if defined(WEBRTC_POSIX) && !defined(__native_client__) - -bool FileStream::TryLock() { - if (file_ == nullptr) { - // Stream not open. - RTC_NOTREACHED(); - return false; - } - - return flock(fileno(file_), LOCK_EX|LOCK_NB) == 0; -} - -bool FileStream::Unlock() { - if (file_ == nullptr) { - // Stream not open. - RTC_NOTREACHED(); - return false; - } - - return flock(fileno(file_), LOCK_UN) == 0; -} - -#endif - void FileStream::DoClose() { fclose(file_); } diff --git a/rtc_base/stream.h b/rtc_base/stream.h index 9dba0ce47d..77e4bd8a4b 100644 --- a/rtc_base/stream.h +++ b/rtc_base/stream.h @@ -400,13 +400,6 @@ class FileStream : public StreamInterface { bool Flush() override; -#if defined(WEBRTC_POSIX) && !defined(__native_client__) - // Tries to aquire an exclusive lock on the file. - // Use OpenShare(...) on win32 to get similar functionality. - bool TryLock(); - bool Unlock(); -#endif - protected: virtual void DoClose();