Chromium Code Reviews| Index: webrtc/api/peerconnectioninterface.h |
| diff --git a/webrtc/api/peerconnectioninterface.h b/webrtc/api/peerconnectioninterface.h |
| index d4daf2435e3ac7de78092579413fbc4aa41bd7dc..48f07e25642cab154d7fa9016e1c9df627f327f5 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.get()); |
|
hbos
2016/12/15 13:39:40
nit: Just *reports works too
nisse-webrtc
2016/12/15 14:02:31
Done.
|
| + } |
| protected: |
| virtual ~StatsObserver() {} |