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

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

Issue 1802013002: A bunch of interfaces: Return scoped_ptr<SSLCertificate> (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: less auto Created 4 years, 8 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 | « no previous file | webrtc/api/statscollector_unittest.cc » ('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 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 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 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 // 695 //
696 StatsReport::Id local_cert_report_id, remote_cert_report_id; 696 StatsReport::Id local_cert_report_id, remote_cert_report_id;
697 rtc::scoped_refptr<rtc::RTCCertificate> certificate; 697 rtc::scoped_refptr<rtc::RTCCertificate> certificate;
698 if (pc_->session()->GetLocalCertificate( 698 if (pc_->session()->GetLocalCertificate(
699 transport_iter.second.transport_name, &certificate)) { 699 transport_iter.second.transport_name, &certificate)) {
700 StatsReport* r = AddCertificateReports(&(certificate->ssl_certificate())); 700 StatsReport* r = AddCertificateReports(&(certificate->ssl_certificate()));
701 if (r) 701 if (r)
702 local_cert_report_id = r->id(); 702 local_cert_report_id = r->id();
703 } 703 }
704 704
705 rtc::scoped_ptr<rtc::SSLCertificate> cert; 705 rtc::scoped_ptr<rtc::SSLCertificate> cert =
706 if (pc_->session()->GetRemoteSSLCertificate( 706 pc_->session()->GetRemoteSSLCertificate(
707 transport_iter.second.transport_name, cert.accept())) { 707 transport_iter.second.transport_name);
708 if (cert) {
708 StatsReport* r = AddCertificateReports(cert.get()); 709 StatsReport* r = AddCertificateReports(cert.get());
709 if (r) 710 if (r)
710 remote_cert_report_id = r->id(); 711 remote_cert_report_id = r->id();
711 } 712 }
712 713
713 for (const auto& channel_iter : transport_iter.second.channel_stats) { 714 for (const auto& channel_iter : transport_iter.second.channel_stats) {
714 StatsReport::Id id(StatsReport::NewComponentId( 715 StatsReport::Id id(StatsReport::NewComponentId(
715 transport_iter.second.transport_name, channel_iter.component)); 716 transport_iter.second.transport_name, channel_iter.component));
716 StatsReport* channel_report = reports_.ReplaceOrAddNew(id); 717 StatsReport* channel_report = reports_.ReplaceOrAddNew(id);
717 channel_report->set_timestamp(stats_gathering_started_); 718 channel_report->set_timestamp(stats_gathering_started_);
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 StatsReport* report = entry.second; 971 StatsReport* report = entry.second;
971 report->set_timestamp(stats_gathering_started_); 972 report->set_timestamp(stats_gathering_started_);
972 } 973 }
973 } 974 }
974 975
975 void StatsCollector::ClearUpdateStatsCacheForTest() { 976 void StatsCollector::ClearUpdateStatsCacheForTest() {
976 stats_gathering_started_ = 0; 977 stats_gathering_started_ = 0;
977 } 978 }
978 979
979 } // namespace webrtc 980 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/api/statscollector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698