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

Side by Side Diff: talk/app/webrtc/statscollector.cc

Issue 1269843005: Added DtlsCertificate, a ref counted object owning an SSLIdentity (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Merge with master 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 // same local and remote certificates. 693 // same local and remote certificates.
694 // 694 //
695 // Note that Transport::GetIdentity and Transport::GetRemoteCertificate 695 // Note that Transport::GetIdentity and Transport::GetRemoteCertificate
696 // invoke method calls on the worker thread and block this thread, but 696 // invoke method calls on the worker thread and block this thread, but
697 // messages are still processed on this thread, which may blow way the 697 // messages are still processed on this thread, which may blow way the
698 // existing transports. So we cannot reuse |transport| after these calls. 698 // existing transports. So we cannot reuse |transport| after these calls.
699 StatsReport::Id local_cert_report_id, remote_cert_report_id; 699 StatsReport::Id local_cert_report_id, remote_cert_report_id;
700 700
701 cricket::Transport* transport = 701 cricket::Transport* transport =
702 session_->GetTransport(transport_iter.second.content_name); 702 session_->GetTransport(transport_iter.second.content_name);
703 rtc::scoped_ptr<rtc::SSLIdentity> identity; 703 rtc::scoped_refptr<webrtc::DtlsCertificate> dtlscert;
tommi (sloooow) - chröme 2015/08/18 14:49:35 nit: dtls_cert
704 if (transport && transport->GetIdentity(identity.accept())) { 704 if (transport && transport->GetCertificate(&dtlscert)) {
705 StatsReport* r = AddCertificateReports(&(identity->certificate())); 705 StatsReport* r = AddCertificateReports(
706 &(dtlscert->identity()->certificate()));
706 if (r) 707 if (r)
707 local_cert_report_id = r->id(); 708 local_cert_report_id = r->id();
708 } 709 }
709 710
710 transport = session_->GetTransport(transport_iter.second.content_name); 711 transport = session_->GetTransport(transport_iter.second.content_name);
711 rtc::scoped_ptr<rtc::SSLCertificate> cert; 712 rtc::scoped_ptr<rtc::SSLCertificate> cert;
712 if (transport && transport->GetRemoteCertificate(cert.accept())) { 713 if (transport && transport->GetRemoteCertificate(cert.accept())) {
713 StatsReport* r = AddCertificateReports(cert.get()); 714 StatsReport* r = AddCertificateReports(cert.get());
714 if (r) 715 if (r)
715 remote_cert_report_id = r->id(); 716 remote_cert_report_id = r->id();
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 report->set_timestamp(stats_gathering_started_); 936 report->set_timestamp(stats_gathering_started_);
936 } 937 }
937 938
938 } 939 }
939 940
940 void StatsCollector::ClearUpdateStatsCacheForTest() { 941 void StatsCollector::ClearUpdateStatsCacheForTest() {
941 stats_gathering_started_ = 0; 942 stats_gathering_started_ = 0;
942 } 943 }
943 944
944 } // namespace webrtc 945 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698