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

Side by Side Diff: content/renderer/media/rtc_peer_connection_handler.cc

Issue 293133002: Fix leak when a PeerConnection offer or answer is created. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/rtc_peer_connection_handler.h" 5 #include "content/renderer/media/rtc_peer_connection_handler.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 public: 179 public:
180 explicit CreateSessionDescriptionRequest( 180 explicit CreateSessionDescriptionRequest(
181 const blink::WebRTCSessionDescriptionRequest& request, 181 const blink::WebRTCSessionDescriptionRequest& request,
182 RTCPeerConnectionHandler* handler, 182 RTCPeerConnectionHandler* handler,
183 PeerConnectionTracker::Action action) 183 PeerConnectionTracker::Action action)
184 : webkit_request_(request), tracker_(handler, action) {} 184 : webkit_request_(request), tracker_(handler, action) {}
185 185
186 virtual void OnSuccess(webrtc::SessionDescriptionInterface* desc) OVERRIDE { 186 virtual void OnSuccess(webrtc::SessionDescriptionInterface* desc) OVERRIDE {
187 tracker_.TrackOnSuccess(desc); 187 tracker_.TrackOnSuccess(desc);
188 webkit_request_.requestSucceeded(CreateWebKitSessionDescription(desc)); 188 webkit_request_.requestSucceeded(CreateWebKitSessionDescription(desc));
189 delete desc;
189 } 190 }
190 virtual void OnFailure(const std::string& error) OVERRIDE { 191 virtual void OnFailure(const std::string& error) OVERRIDE {
191 tracker_.TrackOnFailure(error); 192 tracker_.TrackOnFailure(error);
192 webkit_request_.requestFailed(base::UTF8ToUTF16(error)); 193 webkit_request_.requestFailed(base::UTF8ToUTF16(error));
193 } 194 }
194 195
195 protected: 196 protected:
196 virtual ~CreateSessionDescriptionRequest() {} 197 virtual ~CreateSessionDescriptionRequest() {}
197 198
198 private: 199 private:
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 webrtc::SessionDescriptionInterface* native_desc = 862 webrtc::SessionDescriptionInterface* native_desc =
862 dependency_factory_->CreateSessionDescription(type, sdp, error); 863 dependency_factory_->CreateSessionDescription(type, sdp, error);
863 864
864 LOG_IF(ERROR, !native_desc) << "Failed to create native session description." 865 LOG_IF(ERROR, !native_desc) << "Failed to create native session description."
865 << " Type: " << type << " SDP: " << sdp; 866 << " Type: " << type << " SDP: " << sdp;
866 867
867 return native_desc; 868 return native_desc;
868 } 869 }
869 870
870 } // namespace content 871 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698