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

Unified Diff: talk/app/webrtc/statscollector.cc

Issue 1246913005: TransportController refactoring (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | talk/app/webrtc/statscollector_unittest.cc » ('j') | talk/app/webrtc/webrtcsession.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/statscollector.cc
diff --git a/talk/app/webrtc/statscollector.cc b/talk/app/webrtc/statscollector.cc
index eb32356400509078353c306a2a47e37f88051a09..f747355c2eb2219dd9bebb59a82f44fec64b6ab2 100644
--- a/talk/app/webrtc/statscollector.cc
+++ b/talk/app/webrtc/statscollector.cc
@@ -692,24 +692,18 @@ void StatsCollector::ExtractSessionInfo() {
// expose them in stats reports. All channels in a transport share the
// same local and remote certificates.
//
- // Note that Transport::GetCertificate and Transport::GetRemoteCertificate
- // invoke method calls on the worker thread and block this thread, but
- // messages are still processed on this thread, which may blow way the
- // existing transports. So we cannot reuse |transport| after these calls.
StatsReport::Id local_cert_report_id, remote_cert_report_id;
-
- cricket::Transport* transport =
- session_->GetTransport(transport_iter.second.content_name);
rtc::scoped_refptr<rtc::RTCCertificate> certificate;
- if (transport && transport->GetCertificate(&certificate)) {
+ if (session_->GetCertificate(transport_iter.second.content_name,
+ &certificate)) {
StatsReport* r = AddCertificateReports(&(certificate->ssl_certificate()));
if (r)
local_cert_report_id = r->id();
}
- transport = session_->GetTransport(transport_iter.second.content_name);
rtc::scoped_ptr<rtc::SSLCertificate> cert;
- if (transport && transport->GetRemoteCertificate(cert.accept())) {
+ if (session_->GetRemoteCertificate(transport_iter.second.content_name,
+ cert.accept())) {
StatsReport* r = AddCertificateReports(cert.get());
if (r)
remote_cert_report_id = r->id();
@@ -934,7 +928,6 @@ void StatsCollector::UpdateTrackReports() {
StatsReport* report = entry.second;
report->set_timestamp(stats_gathering_started_);
}
-
}
void StatsCollector::ClearUpdateStatsCacheForTest() {
« no previous file with comments | « no previous file | talk/app/webrtc/statscollector_unittest.cc » ('j') | talk/app/webrtc/webrtcsession.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698