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

Unified Diff: webrtc/api/peerconnectioninterface.h

Issue 2584553002: New method StatsObserver::OnCompleteReports, passing ownership. (Closed)
Patch Set: Drop unneeded ".get()". Created 4 years 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
« no previous file with comments | « webrtc/api/peerconnection.cc ('k') | webrtc/api/test/mockpeerconnectionobservers.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/peerconnectioninterface.h
diff --git a/webrtc/api/peerconnectioninterface.h b/webrtc/api/peerconnectioninterface.h
index d4daf2435e3ac7de78092579413fbc4aa41bd7dc..9c2301ca19d7c855433277740c1de49710f2cf56 100644
--- a/webrtc/api/peerconnectioninterface.h
+++ b/webrtc/api/peerconnectioninterface.h
@@ -109,7 +109,14 @@ class StreamCollectionInterface : public rtc::RefCountInterface {
class StatsObserver : public rtc::RefCountInterface {
public:
- virtual void OnComplete(const StatsReports& reports) = 0;
+ // TODO(nisse, hbos): Old version, not passing ownership. Should
+ // perhaps be deprecated, but since all of this is a legacy
+ // interface anyway, probably best to leave as is until this class
+ // can be deleted.
+ virtual void OnComplete(const StatsReports& reports) {}
+ virtual void OnCompleteReports(std::unique_ptr<StatsReports> reports) {
+ OnComplete(*reports);
+ }
protected:
virtual ~StatsObserver() {}
« no previous file with comments | « webrtc/api/peerconnection.cc ('k') | webrtc/api/test/mockpeerconnectionobservers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698