Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(409)

Unified Diff: content/renderer/media/mock_media_stream_dependency_factory.cc

Issue 10038009: Revert 131949 (multiple memory leaks) - Adding JSEP PeerConnection glue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/mock_media_stream_dependency_factory.cc
===================================================================
--- content/renderer/media/mock_media_stream_dependency_factory.cc (revision 131960)
+++ content/renderer/media/mock_media_stream_dependency_factory.cc (working copy)
@@ -123,65 +123,6 @@
NOTIMPLEMENTED();
}
-class MockSessionDescription : public SessionDescriptionInterface {
- public:
- MockSessionDescription(const std::string& sdp)
- : sdp_(sdp) {
- }
- virtual ~MockSessionDescription() {}
- virtual const cricket::SessionDescription* description() const OVERRIDE {
- NOTIMPLEMENTED();
- return NULL;
- }
- virtual bool AddCandidate(const IceCandidateInterface* candidate) OVERRIDE {
- NOTIMPLEMENTED();
- return false;
- }
- virtual size_t number_of_mediasections() const OVERRIDE {
- NOTIMPLEMENTED();
- return 0;
- }
- virtual const IceCandidateColletion* candidates(
- size_t mediasection_index) const OVERRIDE {
- NOTIMPLEMENTED();
- return NULL;
- }
- virtual bool ToString(std::string* out) const OVERRIDE {
- *out = sdp_;
- return true;
- }
-
- private:
- std::string sdp_;
-};
-
-class MockIceCandidate : public IceCandidateInterface {
- public:
- MockIceCandidate(const std::string& label, const std::string& sdp)
- : label_(label),
- sdp_(sdp) {
- }
- virtual ~MockIceCandidate() {}
- virtual std::string label() const OVERRIDE {
- return label_;
- }
- virtual const cricket::Candidate& candidate() const OVERRIDE {
- // This function should never be called. It will intentionally crash. The
- // base class forces us to return a reference.
- NOTREACHED();
- cricket::Candidate* candidate = NULL;
- return *candidate;
- }
- virtual bool ToString(std::string* out) const OVERRIDE {
- *out = sdp_;
- return true;
- }
-
- private:
- std::string label_;
- std::string sdp_;
-};
-
} // namespace webrtc
MockMediaStreamDependencyFactory::MockMediaStreamDependencyFactory()
@@ -213,7 +154,7 @@
const std::string& config,
webrtc::PeerConnectionObserver* observer) {
DCHECK(mock_pc_factory_created_);
- return new talk_base::RefCountedObject<webrtc::MockPeerConnectionImpl>(this);
+ return new talk_base::RefCountedObject<webrtc::MockPeerConnectionImpl>();
}
talk_base::scoped_refptr<webrtc::PeerConnectionInterface>
@@ -221,7 +162,7 @@
const std::string& config,
webrtc::PeerConnectionObserver* observer) {
DCHECK(mock_pc_factory_created_);
- return new talk_base::RefCountedObject<webrtc::MockPeerConnectionImpl>(this);
+ return new talk_base::RefCountedObject<webrtc::MockPeerConnectionImpl>();
}
talk_base::scoped_refptr<webrtc::LocalMediaStreamInterface>
@@ -248,16 +189,3 @@
NOTIMPLEMENTED();
return NULL;
}
-
-webrtc::SessionDescriptionInterface*
-MockMediaStreamDependencyFactory::CreateSessionDescription(
- const std::string& sdp) {
- return new webrtc::MockSessionDescription(sdp);
-}
-
-webrtc::IceCandidateInterface*
-MockMediaStreamDependencyFactory::CreateIceCandidate(
- const std::string& label,
- const std::string& sdp) {
- return new webrtc::MockIceCandidate(label, sdp);
-}
« no previous file with comments | « content/renderer/media/mock_media_stream_dependency_factory.h ('k') | content/renderer/media/mock_media_stream_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698