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

Side by Side Diff: webrtc/api/statstypes.cc

Issue 2514883002: Create //webrtc/api:libjingle_peerconnection_api + refactorings. (Closed)
Patch Set: Rebase Created 3 years, 11 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
« no previous file with comments | « webrtc/api/statstypes.h ('k') | webrtc/api/streamcollection.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2014 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 return (*value_.id_)->ToString(); 625 return (*value_.id_)->ToString();
626 } 626 }
627 RTC_NOTREACHED(); 627 RTC_NOTREACHED();
628 return std::string(); 628 return std::string();
629 } 629 }
630 630
631 StatsReport::StatsReport(const Id& id) : id_(id), timestamp_(0.0) { 631 StatsReport::StatsReport(const Id& id) : id_(id), timestamp_(0.0) {
632 RTC_DCHECK(id_.get()); 632 RTC_DCHECK(id_.get());
633 } 633 }
634 634
635 StatsReport::~StatsReport() = default;
636
635 // static 637 // static
636 StatsReport::Id StatsReport::NewBandwidthEstimationId() { 638 StatsReport::Id StatsReport::NewBandwidthEstimationId() {
637 return Id(new RefCountedObject<BandwidthEstimationId>()); 639 return Id(new RefCountedObject<BandwidthEstimationId>());
638 } 640 }
639 641
640 // static 642 // static
641 StatsReport::Id StatsReport::NewTypedId(StatsType type, const std::string& id) { 643 StatsReport::Id StatsReport::NewTypedId(StatsType type, const std::string& id) {
642 return Id(new RefCountedObject<TypedId>(type, id)); 644 return Id(new RefCountedObject<TypedId>(type, id));
643 } 645 }
644 646
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 // Looks for a report with the given |id|. If one is not found, NULL 782 // Looks for a report with the given |id|. If one is not found, NULL
781 // will be returned. 783 // will be returned.
782 StatsReport* StatsCollection::Find(const StatsReport::Id& id) { 784 StatsReport* StatsCollection::Find(const StatsReport::Id& id) {
783 RTC_DCHECK(thread_checker_.CalledOnValidThread()); 785 RTC_DCHECK(thread_checker_.CalledOnValidThread());
784 Container::iterator it = std::find_if(list_.begin(), list_.end(), 786 Container::iterator it = std::find_if(list_.begin(), list_.end(),
785 [&id](const StatsReport* r)->bool { return r->id()->Equals(id); }); 787 [&id](const StatsReport* r)->bool { return r->id()->Equals(id); });
786 return it == list_.end() ? nullptr : *it; 788 return it == list_.end() ? nullptr : *it;
787 } 789 }
788 790
789 } // namespace webrtc 791 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/api/statstypes.h ('k') | webrtc/api/streamcollection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698