Bug 1237151 (part 1) - Remove ignored qualifiers in dom/media/gmp/. r=cpearce.
authorNicholas Nethercote <nnethercote@mozilla.com>
Thu, 07 Jan 2016 15:43:37 -0800
changeset 301316 9cb6c701de879e57ba4655d9e0bd48f9011da6f5
parent 301315 399dfde76376dd73e3d3f03e21afb80204bf796d
child 301317 729e181c80897c948337afaa7f49484b29f88ea8
push id8978
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 14:05:32 +0000
treeherdermozilla-aurora@b9a803752a2c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce
bugs1237151
milestone46.0a1
Bug 1237151 (part 1) - Remove ignored qualifiers in dom/media/gmp/. r=cpearce.
dom/media/gmp/GMPContentParent.h
dom/media/gmp/GMPDecryptorParent.h
dom/media/gmp/GMPDecryptorProxy.h
dom/media/gmp/GMPEncryptedBufferDataImpl.cpp
dom/media/gmp/GMPEncryptedBufferDataImpl.h
dom/media/gmp/GMPParent.cpp
dom/media/gmp/GMPParent.h
dom/media/gmp/GMPService.h
dom/media/gmp/GMPVideoDecoderParent.h
dom/media/gmp/GMPVideoDecoderProxy.h
dom/media/gmp/GMPVideoEncoderParent.h
dom/media/gmp/GMPVideoEncoderProxy.h
dom/media/gmp/gmp-api/gmp-decryption.h
--- a/dom/media/gmp/GMPContentParent.h
+++ b/dom/media/gmp/GMPContentParent.h
@@ -51,17 +51,17 @@ public:
   const nsCString& GetDisplayName()
   {
     return mDisplayName;
   }
   void SetPluginId(const uint32_t aPluginId)
   {
     mPluginId = aPluginId;
   }
-  const uint32_t GetPluginId()
+  uint32_t GetPluginId() const
   {
     return mPluginId;
   }
 
 private:
   ~GMPContentParent();
 
   virtual void ActorDestroy(ActorDestroyReason aWhy) override;
--- a/dom/media/gmp/GMPDecryptorParent.h
+++ b/dom/media/gmp/GMPDecryptorParent.h
@@ -24,17 +24,17 @@ class GMPDecryptorParent final : public 
 {
 public:
   NS_INLINE_DECL_REFCOUNTING(GMPDecryptorParent)
 
   explicit GMPDecryptorParent(GMPContentParent *aPlugin);
 
   // GMPDecryptorProxy
 
-  virtual const uint32_t GetPluginId() const override { return mPluginId; }
+  virtual uint32_t GetPluginId() const override { return mPluginId; }
 
   virtual nsresult Init(GMPDecryptorProxyCallback* aCallback) override;
 
   virtual void CreateSession(uint32_t aCreateSessionToken,
                              uint32_t aPromiseId,
                              const nsCString& aInitDataType,
                              const nsTArray<uint8_t>& aInitData,
                              GMPSessionType aSessionType) override;
--- a/dom/media/gmp/GMPDecryptorProxy.h
+++ b/dom/media/gmp/GMPDecryptorProxy.h
@@ -54,17 +54,17 @@ public:
                          GMPErr aResult,
                          const nsTArray<uint8_t>& aDecryptedData) = 0;
 };
 
 class GMPDecryptorProxy {
 public:
   ~GMPDecryptorProxy() {}
 
-  virtual const uint32_t GetPluginId() const = 0;
+  virtual uint32_t GetPluginId() const = 0;
 
   virtual nsresult Init(GMPDecryptorProxyCallback* aCallback) = 0;
 
   virtual void CreateSession(uint32_t aCreateSessionToken,
                              uint32_t aPromiseId,
                              const nsCString& aInitDataType,
                              const nsTArray<uint8_t>& aInitData,
                              GMPSessionType aSessionType) = 0;
--- a/dom/media/gmp/GMPEncryptedBufferDataImpl.cpp
+++ b/dom/media/gmp/GMPEncryptedBufferDataImpl.cpp
@@ -94,17 +94,17 @@ GMPEncryptedBufferDataImpl::NumSubsample
   return std::min<uint32_t>(mClearBytes.Length(), mCipherBytes.Length());
 }
 
 GMPStringListImpl::GMPStringListImpl(const nsTArray<nsCString>& aStrings)
   : mStrings(aStrings)
 {
 }
 
-const uint32_t
+uint32_t
 GMPStringListImpl::Size() const
 {
   return mStrings.Length();
 }
 
 void
 GMPStringListImpl::StringAt(uint32_t aIndex,
                             const char** aOutString,
--- a/dom/media/gmp/GMPEncryptedBufferDataImpl.h
+++ b/dom/media/gmp/GMPEncryptedBufferDataImpl.h
@@ -14,17 +14,17 @@ namespace mozilla {
 class CryptoSample;
 
 namespace gmp {
 
 class GMPStringListImpl : public GMPStringList
 {
 public:
   explicit GMPStringListImpl(const nsTArray<nsCString>& aStrings);
-  virtual const uint32_t Size() const override;
+  virtual uint32_t Size() const override;
   virtual void StringAt(uint32_t aIndex,
                         const char** aOutString, uint32_t *aOutLength) const override;
   virtual ~GMPStringListImpl() override;
   void RelinquishData(nsTArray<nsCString>& aStrings);
 
 private:
   nsTArray<nsCString> mStrings;
 };
--- a/dom/media/gmp/GMPParent.cpp
+++ b/dom/media/gmp/GMPParent.cpp
@@ -931,17 +931,17 @@ GMPParent::GetDisplayName() const
 }
 
 const nsCString&
 GMPParent::GetVersion() const
 {
   return mVersion;
 }
 
-const uint32_t
+uint32_t
 GMPParent::GetPluginId() const
 {
   return mPluginId;
 }
 
 bool
 GMPParent::RecvAsyncShutdownRequired()
 {
--- a/dom/media/gmp/GMPParent.h
+++ b/dom/media/gmp/GMPParent.h
@@ -117,17 +117,17 @@ public:
   // be shared across NodeIds.
 
   // Specifies that a GMP can only work with the specified NodeIds.
   void SetNodeId(const nsACString& aNodeId);
   const nsACString& GetNodeId() const { return mNodeId; }
 
   const nsCString& GetDisplayName() const;
   const nsCString& GetVersion() const;
-  const uint32_t GetPluginId() const;
+  uint32_t GetPluginId() const;
   nsString GetPluginBaseName() const;
 
   // Returns true if a plugin can be or is being used across multiple NodeIds.
   bool CanBeSharedCrossNodeIds() const;
 
   // A GMP can be used from a NodeId if it's already been set to work with
   // that NodeId, or if it's not been set to work with any NodeId and has
   // not yet been loaded (i.e. it's not shared across NodeIds).
--- a/dom/media/gmp/GMPService.h
+++ b/dom/media/gmp/GMPService.h
@@ -100,17 +100,17 @@ protected:
   public:
     NS_INLINE_DECL_REFCOUNTING(GMPCrashCallback)
 
     GMPCrashCallback(const uint32_t aPluginId,
                      nsPIDOMWindow* aParentWindow,
                      nsIDocument* aDocument);
     void Run(const nsACString& aPluginName);
     bool IsStillValid();
-    const uint32_t GetPluginId() const { return mPluginId; }
+    uint32_t GetPluginId() const { return mPluginId; }
   private:
     virtual ~GMPCrashCallback() { MOZ_ASSERT(NS_IsMainThread()); }
 
     bool GetParentWindowAndDocumentIfValid(nsCOMPtr<nsPIDOMWindow>& parentWindow,
                                            nsCOMPtr<nsIDocument>& document);
     const uint32_t mPluginId;
     nsWeakPtr mParentWindowWeakPtr;
     nsWeakPtr mDocumentWeakPtr;
--- a/dom/media/gmp/GMPVideoDecoderParent.h
+++ b/dom/media/gmp/GMPVideoDecoderParent.h
@@ -40,17 +40,17 @@ public:
                               GMPVideoDecoderCallbackProxy* aCallback,
                               int32_t aCoreCount) override;
   virtual nsresult Decode(GMPUniquePtr<GMPVideoEncodedFrame> aInputFrame,
                           bool aMissingFrames,
                           const nsTArray<uint8_t>& aCodecSpecificInfo,
                           int64_t aRenderTimeMs = -1) override;
   virtual nsresult Reset() override;
   virtual nsresult Drain() override;
-  virtual const uint32_t GetPluginId() const override { return mPluginId; }
+  virtual uint32_t GetPluginId() const override { return mPluginId; }
   virtual const nsCString& GetDisplayName() const override;
 
   // GMPSharedMemManager
   virtual bool Alloc(size_t aSize, Shmem::SharedMemory::SharedMemoryType aType, Shmem* aMem) override
   {
 #ifdef GMP_SAFE_SHMEM
     return AllocShmem(aSize, aType, aMem);
 #else
--- a/dom/media/gmp/GMPVideoDecoderProxy.h
+++ b/dom/media/gmp/GMPVideoDecoderProxy.h
@@ -39,17 +39,17 @@ public:
                               GMPVideoDecoderCallbackProxy* aCallback,
                               int32_t aCoreCount) = 0;
   virtual nsresult Decode(mozilla::GMPUniquePtr<GMPVideoEncodedFrame> aInputFrame,
                           bool aMissingFrames,
                           const nsTArray<uint8_t>& aCodecSpecificInfo,
                           int64_t aRenderTimeMs = -1) = 0;
   virtual nsresult Reset() = 0;
   virtual nsresult Drain() = 0;
-  virtual const uint32_t GetPluginId() const = 0;
+  virtual uint32_t GetPluginId() const = 0;
 
   // Call to tell GMP/plugin the consumer will no longer use this
   // interface/codec.
   virtual void Close() = 0;
 
   virtual const nsCString& GetDisplayName() const = 0;
 };
 
--- a/dom/media/gmp/GMPVideoEncoderParent.h
+++ b/dom/media/gmp/GMPVideoEncoderParent.h
@@ -40,17 +40,17 @@ public:
                             int32_t aNumberOfCores,
                             uint32_t aMaxPayloadSize) override;
   virtual GMPErr Encode(GMPUniquePtr<GMPVideoi420Frame> aInputFrame,
                         const nsTArray<uint8_t>& aCodecSpecificInfo,
                         const nsTArray<GMPVideoFrameType>& aFrameTypes) override;
   virtual GMPErr SetChannelParameters(uint32_t aPacketLoss, uint32_t aRTT) override;
   virtual GMPErr SetRates(uint32_t aNewBitRate, uint32_t aFrameRate) override;
   virtual GMPErr SetPeriodicKeyFrames(bool aEnable) override;
-  virtual const uint32_t GetPluginId() const override { return mPluginId; }
+  virtual uint32_t GetPluginId() const override { return mPluginId; }
 
   // GMPSharedMemManager
   virtual bool Alloc(size_t aSize, Shmem::SharedMemory::SharedMemoryType aType, Shmem* aMem) override
   {
 #ifdef GMP_SAFE_SHMEM
     return AllocShmem(aSize, aType, aMem);
 #else
     return AllocUnsafeShmem(aSize, aType, aMem);
--- a/dom/media/gmp/GMPVideoEncoderProxy.h
+++ b/dom/media/gmp/GMPVideoEncoderProxy.h
@@ -41,16 +41,16 @@ public:
                             int32_t aNumberOfCores,
                             uint32_t aMaxPayloadSize) = 0;
   virtual GMPErr Encode(mozilla::GMPUniquePtr<GMPVideoi420Frame> aInputFrame,
                         const nsTArray<uint8_t>& aCodecSpecificInfo,
                         const nsTArray<GMPVideoFrameType>& aFrameTypes) = 0;
   virtual GMPErr SetChannelParameters(uint32_t aPacketLoss, uint32_t aRTT) = 0;
   virtual GMPErr SetRates(uint32_t aNewBitRate, uint32_t aFrameRate) = 0;
   virtual GMPErr SetPeriodicKeyFrames(bool aEnable) = 0;
-  virtual const uint32_t GetPluginId() const = 0;
+  virtual uint32_t GetPluginId() const = 0;
 
   // Call to tell GMP/plugin the consumer will no longer use this
   // interface/codec.
   virtual void Close() = 0;
 };
 
 #endif // GMPVideoEncoderProxy_h_
--- a/dom/media/gmp/gmp-api/gmp-decryption.h
+++ b/dom/media/gmp/gmp-api/gmp-decryption.h
@@ -16,17 +16,17 @@
 
 #ifndef GMP_DECRYPTION_h_
 #define GMP_DECRYPTION_h_
 
 #include "gmp-platform.h"
 
 class GMPStringList {
 public:
-  virtual const uint32_t Size() const = 0;
+  virtual uint32_t Size() const = 0;
 
   virtual void StringAt(uint32_t aIndex,
                         const char** aOutString, uint32_t* aOutLength) const = 0;
 
   virtual ~GMPStringList() { }
 };
 
 class GMPEncryptedBufferMetadata {