Bug 1208371 - Remove PeerIdentity from DOMMediaStream. r?mt draft
authorAndreas Pehrson <pehrsons@gmail.com>
Tue, 05 Jan 2016 10:16:29 +0800
changeset 342143 d7fca177e825faf42e40af201a2982671ce1e478
parent 342142 6e3eb4a750be137c11f79f287621236788fb3b5c
child 342144 ddf2c4ddcae7d9589476421ba8bd680741a9cfc5
push id13352
push userpehrsons@gmail.com
push dateFri, 18 Mar 2016 13:49:47 +0000
reviewersmt
bugs1208371
milestone47.0a1
Bug 1208371 - Remove PeerIdentity from DOMMediaStream. r?mt MozReview-Commit-ID: 5e4TxCiWwGF
dom/media/DOMMediaStream.h
--- a/dom/media/DOMMediaStream.h
+++ b/dom/media/DOMMediaStream.h
@@ -8,17 +8,16 @@
 
 #include "ImageContainer.h"
 
 #include "nsCycleCollectionParticipant.h"
 #include "nsWrapperCache.h"
 #include "StreamBuffer.h"
 #include "nsIDOMWindow.h"
 #include "nsIPrincipal.h"
-#include "mozilla/PeerIdentity.h"
 #include "mozilla/DOMEventTargetHelper.h"
 #include "PrincipalChangeObserver.h"
 
 // GetCurrentTime is defined in winbase.h as zero argument macro forwarding to
 // GetTickCount() and conflicts with NS_DECL_NSIDOMMEDIASTREAM, containing
 // currentTime getter.
 #ifdef GetCurrentTime
 #undef GetCurrentTime
@@ -443,29 +442,16 @@ public:
   nsIPrincipal* GetPrincipal() { return mPrincipal; }
 
   /**
    * Returns a principal indicating who may access video data of this stream.
    * The video principal will be a combination of all live video tracks.
    */
   nsIPrincipal* GetVideoPrincipal() { return mVideoPrincipal; }
 
-  /**
-   * These are used in WebRTC.  A peerIdentity constrained MediaStream cannot be sent
-   * across the network to anything other than a peer with the provided identity.
-   * If this is set, then mPrincipal should be an instance of nsNullPrincipal.
-   */
-  PeerIdentity* GetPeerIdentity() const { return mPeerIdentity; }
-  void SetPeerIdentity(PeerIdentity* aPeerIdentity)
-  {
-    mPeerIdentity = aPeerIdentity;
-  }
-
-
-
   // From PrincipalChangeObserver<MediaStreamTrack>.
   void PrincipalChanged(MediaStreamTrack* aTrack) override;
 
   /**
    * Add a PrincipalChangeObserver to this stream.
    *
    * Returns true if it was successfully added.
    *
@@ -685,19 +671,16 @@ private:
   void NotifyPrincipalChanged();
   // Principal identifying who may access the collected contents of this stream.
   // If null, this stream can be used by anyone because it has no content yet.
   nsCOMPtr<nsIPrincipal> mPrincipal;
   // Video principal is used by video element as access is requested to its
   // image data.
   nsCOMPtr<nsIPrincipal> mVideoPrincipal;
   nsTArray<dom::PrincipalChangeObserver<DOMMediaStream>*> mPrincipalChangeObservers;
-  // this is used in gUM and WebRTC to identify peers that this stream
-  // is allowed to be sent to
-  RefPtr<PeerIdentity> mPeerIdentity;
   CORSMode mCORSMode;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(DOMMediaStream,
                               NS_DOMMEDIASTREAM_IID)
 
 #define NS_DOMLOCALMEDIASTREAM_IID \
 { 0xb1437260, 0xec61, 0x4dfa, \