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

Side by Side Diff: content/renderer/media/rtc_peer_connection_handler.cc

Issue 37253002: Add command line flag --disable-webrtc-encryption for dev and canary channels (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't allow flag for unknown channel + rebase. Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/rtc_peer_connection_handler.h" 5 #include "content/renderer/media/rtc_peer_connection_handler.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 GetNativeIceServers(server_configuration, &servers); 350 GetNativeIceServers(server_configuration, &servers);
351 351
352 RTCMediaConstraints constraints(options); 352 RTCMediaConstraints constraints(options);
353 353
354 if (!CommandLine::ForCurrentProcess()->HasSwitch( 354 if (!CommandLine::ForCurrentProcess()->HasSwitch(
355 switches::kDisableSCTPDataChannels)) { 355 switches::kDisableSCTPDataChannels)) {
356 constraints.AddOptional( 356 constraints.AddOptional(
357 webrtc::MediaConstraintsInterface::kEnableSctpDataChannels, "true"); 357 webrtc::MediaConstraintsInterface::kEnableSctpDataChannels, "true");
358 } 358 }
359 359
360 if (CommandLine::ForCurrentProcess()->HasSwitch(
361 switches::kDisableWebRtcEncryption)) {
362 constraints.AddOptional(
363 webrtc::MediaConstraintsInterface::kInternalDisableEncryption, "true");
364 }
365
360 native_peer_connection_ = 366 native_peer_connection_ =
361 dependency_factory_->CreatePeerConnection( 367 dependency_factory_->CreatePeerConnection(
362 servers, &constraints, frame_, this); 368 servers, &constraints, frame_, this);
363 if (!native_peer_connection_.get()) { 369 if (!native_peer_connection_.get()) {
364 LOG(ERROR) << "Failed to initialize native PeerConnection."; 370 LOG(ERROR) << "Failed to initialize native PeerConnection.";
365 return false; 371 return false;
366 } 372 }
367 if (peer_connection_tracker_) 373 if (peer_connection_tracker_)
368 peer_connection_tracker_->RegisterPeerConnection( 374 peer_connection_tracker_->RegisterPeerConnection(
369 this, servers, constraints, frame_); 375 this, servers, constraints, frame_);
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 webrtc::SessionDescriptionInterface* native_desc = 786 webrtc::SessionDescriptionInterface* native_desc =
781 dependency_factory_->CreateSessionDescription(type, sdp, error); 787 dependency_factory_->CreateSessionDescription(type, sdp, error);
782 788
783 LOG_IF(ERROR, !native_desc) << "Failed to create native session description." 789 LOG_IF(ERROR, !native_desc) << "Failed to create native session description."
784 << " Type: " << type << " SDP: " << sdp; 790 << " Type: " << type << " SDP: " << sdp;
785 791
786 return native_desc; 792 return native_desc;
787 } 793 }
788 794
789 } // namespace content 795 } // namespace content
OLDNEW
« content/public/common/content_switches.cc ('K') | « content/public/common/content_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698