From e8dd02d4f879c8a99c31c345d0c154709f546c79 Mon Sep 17 00:00:00 2001 From: JW Wang Date: Wed, 23 Aug 2017 15:52:33 +0800 Subject: [PATCH] Bug 1393345 - remove MediaResource::IsSuspended() which has no callers. r=gerald MozReview-Commit-ID: Jn6TIXpFflR --HG-- extra : rebase_source : 0efc64660523f1e846feb247075ab69e54f5f24a --- dom/media/BufferMediaResource.h | 1 - dom/media/MediaResource.cpp | 1 - dom/media/MediaResource.h | 5 ++--- dom/media/gtest/MockMediaResource.h | 1 - dom/media/hls/HLSResource.h | 1 - dom/media/mediasource/MediaSourceResource.h | 1 - dom/media/mediasource/SourceBufferResource.h | 5 ----- 7 files changed, 2 insertions(+), 13 deletions(-) diff --git a/dom/media/BufferMediaResource.h b/dom/media/BufferMediaResource.h index 8b44b4c6d48a..35e19caca453 100644 --- a/dom/media/BufferMediaResource.h +++ b/dom/media/BufferMediaResource.h @@ -68,7 +68,6 @@ private: return std::max(aOffset, int64_t(mLength)); } bool IsDataCachedToEndOfResource(int64_t aOffset) override { return true; } - bool IsSuspended() override { return false; } nsresult ReadFromCache(char* aBuffer, int64_t aOffset, uint32_t aCount) override diff --git a/dom/media/MediaResource.cpp b/dom/media/MediaResource.cpp index 86a8f8668cb9..fff55180a4b6 100644 --- a/dom/media/MediaResource.cpp +++ b/dom/media/MediaResource.cpp @@ -1163,7 +1163,6 @@ public: return std::max(aOffset, mSize); } bool IsDataCachedToEndOfResource(int64_t aOffset) override { return true; } - bool IsSuspended() override { return true; } bool IsTransportSeekable() override { return true; } nsresult GetCachedRanges(MediaByteRangeSet& aRanges) override; diff --git a/dom/media/MediaResource.h b/dom/media/MediaResource.h index fff89bb5ff3f..bf6fc42e6db2 100644 --- a/dom/media/MediaResource.h +++ b/dom/media/MediaResource.h @@ -202,8 +202,6 @@ public: // Returns true if all the data from aOffset to the end of the stream // is in cache. If the end of the stream is not known, we return false. virtual bool IsDataCachedToEndOfResource(int64_t aOffset) = 0; - // Returns true if this stream has been suspended. - virtual bool IsSuspended() = 0; // Reads only data which is cached in the media cache. If you try to read // any data which overlaps uncached data, or if aCount bytes otherwise can't // be read, this function will return failure. This function be called from @@ -459,6 +457,8 @@ public: // Resume the current load since data is wanted again nsresult CacheClientResume(); + bool IsSuspended(); + void ThrottleReadahead(bool bThrottle) override; // Main thread @@ -491,7 +491,6 @@ public: int64_t GetNextCachedData(int64_t aOffset) override; int64_t GetCachedDataEnd(int64_t aOffset) override; bool IsDataCachedToEndOfResource(int64_t aOffset) override; - bool IsSuspended() override; bool IsTransportSeekable() override; size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override { diff --git a/dom/media/gtest/MockMediaResource.h b/dom/media/gtest/MockMediaResource.h index 7279e74a2ec2..6d1147d52c0d 100644 --- a/dom/media/gtest/MockMediaResource.h +++ b/dom/media/gtest/MockMediaResource.h @@ -34,7 +34,6 @@ public: { return false; } - bool IsSuspended() override { return false; } nsresult ReadFromCache(char* aBuffer, int64_t aOffset, uint32_t aCount) override { diff --git a/dom/media/hls/HLSResource.h b/dom/media/hls/HLSResource.h index c47a62016871..a7eed02eaea5 100644 --- a/dom/media/hls/HLSResource.h +++ b/dom/media/hls/HLSResource.h @@ -57,7 +57,6 @@ public: int64_t GetNextCachedData(int64_t aOffset) override { UNIMPLEMENTED(); return -1; } int64_t GetCachedDataEnd(int64_t aOffset) override { UNIMPLEMENTED(); return -1; } bool IsDataCachedToEndOfResource(int64_t aOffset) override { UNIMPLEMENTED(); return false; } - bool IsSuspended() override { UNIMPLEMENTED(); return false; } nsresult ReadFromCache(char* aBuffer, int64_t aOffset, uint32_t aCount) override { UNIMPLEMENTED(); return NS_ERROR_FAILURE; } already_AddRefed GetCurrentPrincipal() override diff --git a/dom/media/mediasource/MediaSourceResource.h b/dom/media/mediasource/MediaSourceResource.h index 8a8358d4313d..b1fb54873ba0 100644 --- a/dom/media/mediasource/MediaSourceResource.h +++ b/dom/media/mediasource/MediaSourceResource.h @@ -41,7 +41,6 @@ public: int64_t GetNextCachedData(int64_t aOffset) override { UNIMPLEMENTED(); return -1; } int64_t GetCachedDataEnd(int64_t aOffset) override { UNIMPLEMENTED(); return -1; } bool IsDataCachedToEndOfResource(int64_t aOffset) override { UNIMPLEMENTED(); return false; } - bool IsSuspended() override { UNIMPLEMENTED(); return false; } nsresult ReadFromCache(char* aBuffer, int64_t aOffset, uint32_t aCount) override { UNIMPLEMENTED(); return NS_ERROR_FAILURE; } already_AddRefed GetCurrentPrincipal() override diff --git a/dom/media/mediasource/SourceBufferResource.h b/dom/media/mediasource/SourceBufferResource.h index 73e4d52a672f..46847d1c5243 100644 --- a/dom/media/mediasource/SourceBufferResource.h +++ b/dom/media/mediasource/SourceBufferResource.h @@ -69,11 +69,6 @@ public: return GetLength(); } bool IsDataCachedToEndOfResource(int64_t aOffset) override { return false; } - bool IsSuspended() override - { - UNIMPLEMENTED(); - return false; - } nsresult ReadFromCache(char* aBuffer, int64_t aOffset, uint32_t aCount) override;