Chromium Code Reviews| Index: talk/app/webrtc/dtlscertificate.cc |
| diff --git a/talk/app/webrtc/audiotrackrenderer.cc b/talk/app/webrtc/dtlscertificate.cc |
| similarity index 66% |
| copy from talk/app/webrtc/audiotrackrenderer.cc |
| copy to talk/app/webrtc/dtlscertificate.cc |
| index 264a3cb73485201c933e4082c036c9a0dce6c4f4..e48ce3e3f68dcf57cac12b919a24c3602ee45fd6 100644 |
| --- a/talk/app/webrtc/audiotrackrenderer.cc |
| +++ b/talk/app/webrtc/dtlscertificate.cc |
| @@ -1,6 +1,6 @@ |
| /* |
| * libjingle |
| - * Copyright 2013 Google Inc. |
| + * Copyright 2015 Google Inc. |
| * |
| * Redistribution and use in source and binary forms, with or without |
| * modification, are permitted provided that the following conditions are met: |
| @@ -25,25 +25,33 @@ |
| * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| */ |
| -#include "talk/app/webrtc/audiotrackrenderer.h" |
| -#include "webrtc/base/common.h" |
| +#include "talk/app/webrtc/dtlscertificate.h" |
| + |
| +#include "webrtc/base/checks.h" |
| namespace webrtc { |
| -AudioTrackRenderer::AudioTrackRenderer() : channel_id_(-1) { |
| +rtc::scoped_refptr<DtlsCertificate> DtlsCertificate::Create( |
| + rtc::scoped_ptr<rtc::SSLIdentity> identity) { |
| + // TODO(hbos): |expires| should be specified (what is the right type for |
| + // date?), and maybe tied to the identity generation? |
|
Henrik Grunell WebRTC
2015/08/12 14:46:29
Do you plan on fixing the todo before landing? Not
hbos
2015/08/14 14:09:38
That hints for an integer type, but I think blink
|
| + return new rtc::RefCountedObject<DtlsCertificate>(identity.release(), 0.0); |
|
Henrik Grunell WebRTC
2015/08/12 14:46:29
identity.Pass()
hbos
2015/08/14 14:09:38
The DtlsCertificate constructor takes SSLIdentity*
|
| +} |
| + |
| +DtlsCertificate::DtlsCertificate(rtc::SSLIdentity* identity, double expires) |
| + : identity_(identity), expires_(expires) { |
| + DCHECK(identity_); |
| } |
| -AudioTrackRenderer::~AudioTrackRenderer() { |
| +DtlsCertificate::~DtlsCertificate() { |
| } |
| -void AudioTrackRenderer::AddChannel(int channel_id) { |
| - ASSERT(channel_id_ == -1 || channel_id_ == channel_id); |
| - channel_id_ = channel_id; |
| +rtc::SSLIdentity* DtlsCertificate::identity() const { |
| + return identity_.get(); |
| } |
| -void AudioTrackRenderer::RemoveChannel(int channel_id) { |
| - ASSERT(channel_id_ == -1 || channel_id_ == channel_id); |
| - channel_id_ = -1; |
| +double DtlsCertificate::expires() const { |
| + return expires_; |
| } |
| } // namespace webrtc |