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

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

Issue 1528843005: Add support for GCM cipher suites from RFC 7714. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Updates after feedback from Peter Created 5 years 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/channelmanager.cc
diff --git a/talk/session/media/channelmanager.cc b/talk/session/media/channelmanager.cc
index e7a4b8bddb99e56c561a51b218d8fc74e311d200..ba24a242558be91756fe9d82c8c401956832984b 100644
--- a/talk/session/media/channelmanager.cc
+++ b/talk/session/media/channelmanager.cc
@@ -106,6 +106,7 @@ void ChannelManager::Construct(MediaEngineInterface* me,
local_renderer_ = NULL;
capturing_ = false;
enable_rtx_ = false;
+ enable_gcm_crypto_suites_ = false;
capture_manager_->SignalCapturerStateChange.connect(
this, &ChannelManager::OnVideoCaptureStateChange);
@@ -142,6 +143,11 @@ bool ChannelManager::SetVideoRtxEnabled(bool enable) {
}
}
+bool ChannelManager::SetEnableGcmCryptoSuites(bool enable) {
+ enable_gcm_crypto_suites_ = enable;
+ return true;
+}
+
void ChannelManager::GetSupportedAudioCodecs(
std::vector<AudioCodec>* codecs) const {
codecs->clear();
@@ -275,6 +281,7 @@ VoiceChannel* ChannelManager::CreateVoiceChannel_w(
VoiceChannel* voice_channel =
new VoiceChannel(worker_thread_, media_engine_.get(), media_channel,
transport_controller, content_name, rtcp);
+ voice_channel->SetEnableGcmCryptoSuites(enable_gcm_crypto_suites_);
if (!voice_channel->Init()) {
delete voice_channel;
return nullptr;
@@ -333,6 +340,7 @@ VideoChannel* ChannelManager::CreateVideoChannel_w(
VideoChannel* video_channel = new VideoChannel(
worker_thread_, media_channel, transport_controller, content_name, rtcp);
+ video_channel->SetEnableGcmCryptoSuites(enable_gcm_crypto_suites_);
if (!video_channel->Init()) {
delete video_channel;
return NULL;
@@ -391,6 +399,7 @@ DataChannel* ChannelManager::CreateDataChannel_w(
DataChannel* data_channel = new DataChannel(
worker_thread_, media_channel, transport_controller, content_name, rtcp);
+ data_channel->SetEnableGcmCryptoSuites(enable_gcm_crypto_suites_);
if (!data_channel->Init()) {
LOG(LS_WARNING) << "Failed to init data channel.";
delete data_channel;

Powered by Google App Engine
This is Rietveld 408576698