Revert 6747 "Refactor StatsCollector and associated types."

Breakes FYI bots.

BUG=N/A
TBR=ajm@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/18889004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6770 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
henrike@webrtc.org
2014-07-23 21:38:58 +00:00
parent 8721f989bf
commit 8c7e3291a9
7 changed files with 144 additions and 242 deletions

View File

@@ -113,18 +113,7 @@ class StreamCollectionInterface : public talk_base::RefCountInterface {
class StatsObserver : public talk_base::RefCountInterface {
public:
// TODO(tommi): Remove.
virtual void OnComplete(const std::vector<StatsReport>& reports) {}
// TODO(tommi): Make pure virtual and remove implementation.
virtual void OnComplete(const StatsReports& reports) {
std::vector<StatsReportCopyable> report_copies;
for (size_t i = 0; i < reports.size(); ++i)
report_copies.push_back(StatsReportCopyable(*reports[i]));
std::vector<StatsReport>* r =
reinterpret_cast<std::vector<StatsReport>*>(&report_copies);
OnComplete(*r);
}
virtual void OnComplete(const std::vector<StatsReport>& reports) = 0;
protected:
virtual ~StatsObserver() {}