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

Side by Side Diff: content/renderer/media/webrtc/peer_connection_dependency_factory.cc

Issue 1335023002: Add UMA metrics and finch experiment for DTLS1.2 in WebRTC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/webrtc/peer_connection_dependency_factory.h" 5 #include "content/renderer/media/webrtc/peer_connection_dependency_factory.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 400
401 pc_factory_ = webrtc::CreatePeerConnectionFactory( 401 pc_factory_ = webrtc::CreatePeerConnectionFactory(
402 worker_thread_, signaling_thread_, audio_device_.get(), 402 worker_thread_, signaling_thread_, audio_device_.get(),
403 encoder_factory.release(), decoder_factory.release()); 403 encoder_factory.release(), decoder_factory.release());
404 CHECK(pc_factory_.get()); 404 CHECK(pc_factory_.get());
405 405
406 webrtc::PeerConnectionFactoryInterface::Options factory_options; 406 webrtc::PeerConnectionFactoryInterface::Options factory_options;
407 factory_options.disable_sctp_data_channels = false; 407 factory_options.disable_sctp_data_channels = false;
408 factory_options.disable_encryption = 408 factory_options.disable_encryption =
409 cmd_line->HasSwitch(switches::kDisableWebRtcEncryption); 409 cmd_line->HasSwitch(switches::kDisableWebRtcEncryption);
410 if (cmd_line->HasSwitch(switches::kEnableWebRtcDtls12)) 410
411 std::string group_name =
412 base::FieldTrialList::FindFullName("WebRTC-PeerConnectionDTLS1.2");
413 if (StartsWith(group_name, "Enabled", base::CompareCase::SENSITIVE) ||
414 cmd_line->HasSwitch(switches::kEnableWebRtcDtls12)) {
411 factory_options.ssl_max_version = rtc::SSL_PROTOCOL_DTLS_12; 415 factory_options.ssl_max_version = rtc::SSL_PROTOCOL_DTLS_12;
416 }
412 pc_factory_->SetOptions(factory_options); 417 pc_factory_->SetOptions(factory_options);
413 418
414 event->Signal(); 419 event->Signal();
415 } 420 }
416 421
417 bool PeerConnectionDependencyFactory::PeerConnectionFactoryCreated() { 422 bool PeerConnectionDependencyFactory::PeerConnectionFactoryCreated() {
418 return pc_factory_.get() != NULL; 423 return pc_factory_.get() != NULL;
419 } 424 }
420 425
421 scoped_refptr<webrtc::PeerConnectionInterface> 426 scoped_refptr<webrtc::PeerConnectionInterface>
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 } 754 }
750 755
751 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() { 756 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() {
752 if (audio_device_.get()) 757 if (audio_device_.get())
753 return; 758 return;
754 759
755 audio_device_ = new WebRtcAudioDeviceImpl(); 760 audio_device_ = new WebRtcAudioDeviceImpl();
756 } 761 }
757 762
758 } // namespace content 763 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/rtc_peer_connection_handler.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698