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

Unified Diff: content/renderer/media/rtc_peer_connection_handler.cc

Issue 2011443002: ECDSA default certificate in WebRTC: Remove experiment flag kWebRtcEcdsaDefault. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « content/public/common/content_features.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/rtc_peer_connection_handler.cc
diff --git a/content/renderer/media/rtc_peer_connection_handler.cc b/content/renderer/media/rtc_peer_connection_handler.cc
index e273e5113a934164a3e4c0347cab7459b0369397..ab8e4f39e2871d76c91dd218b4b894e39c3f0d5a 100644
--- a/content/renderer/media/rtc_peer_connection_handler.cc
+++ b/content/renderer/media/rtc_peer_connection_handler.cc
@@ -722,19 +722,13 @@ void ConvertConstraintsToWebrtcOfferOptions(
base::LazyInstance<std::set<RTCPeerConnectionHandler*> >::Leaky
g_peer_connection_handlers = LAZY_INSTANCE_INITIALIZER;
-void OverrideDefaultCertificateBasedOnExperiment(
+void OverrideDefaultCertificate(
webrtc::PeerConnectionInterface::RTCConfiguration* config) {
- if (base::FeatureList::IsEnabled(features::kWebRtcEcdsaDefault)) {
- if (config->certificates.empty()) {
- rtc::scoped_refptr<rtc::RTCCertificate> certificate =
- PeerConnectionDependencyFactory::GenerateDefaultCertificate();
- config->certificates.push_back(certificate);
- }
+ if (rtc::KT_DEFAULT != rtc::KT_ECDSA && config->certificates.empty()) {
tommi (sloooow) - chröme 2016/05/24 20:58:11 do we still need this or do you plan on removing t
hbos_chromium 2016/05/25 07:58:34 Since this CL removes a static_assert about KT_DEF
+ rtc::scoped_refptr<rtc::RTCCertificate> certificate =
+ PeerConnectionDependencyFactory::GenerateDefaultCertificate();
+ config->certificates.push_back(certificate);
}
- // If the ECDSA experiment is not running we rely on the default being RSA for
- // the control group. See bug related to this: crbug.com/611698.
- static_assert(rtc::KT_DEFAULT == rtc::KT_RSA, "This code relies on "
- "KT_DEFAULT == KT_RSA for RSA certificate generation.");
}
} // namespace
@@ -967,7 +961,7 @@ bool RTCPeerConnectionHandler::initialize(
webrtc::PeerConnectionInterface::RTCConfiguration config;
GetNativeRtcConfiguration(server_configuration, &config);
- OverrideDefaultCertificateBasedOnExperiment(&config);
+ OverrideDefaultCertificate(&config);
// Choose between RTC smoothness algorithm and prerenderer smoothing.
// Prerenderer smoothing is turned on if RTC smoothness is turned off.
@@ -1004,7 +998,7 @@ bool RTCPeerConnectionHandler::InitializeForTest(
DCHECK(thread_checker_.CalledOnValidThread());
webrtc::PeerConnectionInterface::RTCConfiguration config;
GetNativeRtcConfiguration(server_configuration, &config);
- OverrideDefaultCertificateBasedOnExperiment(&config);
+ OverrideDefaultCertificate(&config);
peer_connection_observer_ = new Observer(weak_factory_.GetWeakPtr());
CopyConstraintsIntoRtcConfiguration(options, &config);
« no previous file with comments | « content/public/common/content_features.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698