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

Unified Diff: talk/session/media/channel.cc

Issue 1416673006: Convert internal representation of Srtp cryptos from string to int. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Add back an old function name to prevent build break in chromium. Created 5 years, 2 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
Index: talk/session/media/channel.cc
diff --git a/talk/session/media/channel.cc b/talk/session/media/channel.cc
index 91a6d8cb5abbd9c1ed462fe34ae45140f191ab61..071b7dcae635009ef7d3ce6fffb00f83a9c8caea 100644
--- a/talk/session/media/channel.cc
+++ b/talk/session/media/channel.cc
@@ -218,11 +218,11 @@ bool BaseChannel::Init() {
return false;
}
- if (!SetDtlsSrtpCiphers(transport_channel(), false)) {
+ if (!SetDtlsSrtpCryptoSuites(transport_channel(), false)) {
return false;
}
if (rtcp_transport_enabled() &&
- !SetDtlsSrtpCiphers(rtcp_transport_channel(), true)) {
+ !SetDtlsSrtpCryptoSuites(rtcp_transport_channel(), true)) {
return false;
}
@@ -806,16 +806,16 @@ void BaseChannel::SignalDtlsSetupFailure_s(bool rtcp) {
SignalDtlsSetupFailure(this, rtcp);
}
-bool BaseChannel::SetDtlsSrtpCiphers(TransportChannel *tc, bool rtcp) {
- std::vector<std::string> ciphers;
+bool BaseChannel::SetDtlsSrtpCryptoSuites(TransportChannel* tc, bool rtcp) {
+ std::vector<int> ciphers;
pthatcher1 2015/11/11 19:59:40 Similarly here, with crypto_suites?
guoweis_webrtc 2015/11/17 01:21:15 Done.
// We always use the default SRTP ciphers for RTCP, but we may use different
// ciphers for RTP depending on the media type.
if (!rtcp) {
- GetSrtpCryptoSuiteNames(&ciphers);
+ GetSrtpCryptoSuites(&ciphers);
} else {
- GetDefaultSrtpCryptoSuiteNames(&ciphers);
+ GetDefaultSrtpCryptoSuites(&ciphers);
}
- return tc->SetSrtpCiphers(ciphers);
+ return tc->SetSrtpCryptoSuites(ciphers);
}
bool BaseChannel::ShouldSetupDtlsSrtp() const {
@@ -834,7 +834,7 @@ bool BaseChannel::SetupDtlsSrtp(bool rtcp_channel) {
if (!channel->IsDtlsActive())
return true;
- std::string selected_cipher;
+ int selected_cipher;
pthatcher1 2015/11/11 19:59:40 And here with selected_crypto_suite?
guoweis_webrtc 2015/11/17 01:21:15 Done.
if (!channel->GetSrtpCryptoSuite(&selected_cipher)) {
LOG(LS_ERROR) << "No DTLS-SRTP selected cipher";
@@ -1581,8 +1581,7 @@ void VoiceChannel::OnAudioMonitorUpdate(AudioMonitor* monitor,
SignalAudioMonitor(this, info);
}
-void VoiceChannel::GetSrtpCryptoSuiteNames(
- std::vector<std::string>* ciphers) const {
+void VoiceChannel::GetSrtpCryptoSuites(std::vector<int>* ciphers) const {
GetSupportedAudioCryptoSuites(ciphers);
}
@@ -1971,8 +1970,7 @@ bool VideoChannel::GetLocalSsrc(const VideoCapturer* capturer, uint32_t* ssrc) {
return false;
}
-void VideoChannel::GetSrtpCryptoSuiteNames(
- std::vector<std::string>* ciphers) const {
+void VideoChannel::GetSrtpCryptoSuites(std::vector<int>* ciphers) const {
GetSupportedVideoCryptoSuites(ciphers);
}
@@ -2279,8 +2277,7 @@ void DataChannel::OnDataChannelReadyToSend(bool writable) {
new DataChannelReadyToSendMessageData(writable));
}
-void DataChannel::GetSrtpCryptoSuiteNames(
- std::vector<std::string>* ciphers) const {
+void DataChannel::GetSrtpCryptoSuites(std::vector<int>* ciphers) const {
GetSupportedDataCryptoSuites(ciphers);
}

Powered by Google App Engine
This is Rietveld 408576698