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

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

Issue 1462443003: EnsureOpenSSLInit before calling into WebRTC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 28 matching lines...) Expand all
39 #include "content/renderer/media/webrtc_logging.h" 39 #include "content/renderer/media/webrtc_logging.h"
40 #include "content/renderer/media/webrtc_uma_histograms.h" 40 #include "content/renderer/media/webrtc_uma_histograms.h"
41 #include "content/renderer/p2p/empty_network_manager.h" 41 #include "content/renderer/p2p/empty_network_manager.h"
42 #include "content/renderer/p2p/filtering_network_manager.h" 42 #include "content/renderer/p2p/filtering_network_manager.h"
43 #include "content/renderer/p2p/ipc_network_manager.h" 43 #include "content/renderer/p2p/ipc_network_manager.h"
44 #include "content/renderer/p2p/ipc_socket_factory.h" 44 #include "content/renderer/p2p/ipc_socket_factory.h"
45 #include "content/renderer/p2p/port_allocator.h" 45 #include "content/renderer/p2p/port_allocator.h"
46 #include "content/renderer/render_frame_impl.h" 46 #include "content/renderer/render_frame_impl.h"
47 #include "content/renderer/render_thread_impl.h" 47 #include "content/renderer/render_thread_impl.h"
48 #include "content/renderer/render_view_impl.h" 48 #include "content/renderer/render_view_impl.h"
49 #include "crypto/openssl_util.h"
49 #include "jingle/glue/thread_wrapper.h" 50 #include "jingle/glue/thread_wrapper.h"
50 #include "media/base/media_permission.h" 51 #include "media/base/media_permission.h"
51 #include "media/renderers/gpu_video_accelerator_factories.h" 52 #include "media/renderers/gpu_video_accelerator_factories.h"
52 #include "third_party/WebKit/public/platform/WebMediaConstraints.h" 53 #include "third_party/WebKit/public/platform/WebMediaConstraints.h"
53 #include "third_party/WebKit/public/platform/WebMediaStream.h" 54 #include "third_party/WebKit/public/platform/WebMediaStream.h"
54 #include "third_party/WebKit/public/platform/WebMediaStreamSource.h" 55 #include "third_party/WebKit/public/platform/WebMediaStreamSource.h"
55 #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h" 56 #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h"
56 #include "third_party/WebKit/public/platform/WebURL.h" 57 #include "third_party/WebKit/public/platform/WebURL.h"
57 #include "third_party/WebKit/public/web/WebDocument.h" 58 #include "third_party/WebKit/public/web/WebDocument.h"
58 #include "third_party/WebKit/public/web/WebFrame.h" 59 #include "third_party/WebKit/public/web/WebFrame.h"
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 base::Bind(&PeerConnectionDependencyFactory:: 354 base::Bind(&PeerConnectionDependencyFactory::
354 CreateIpcNetworkManagerOnWorkerThread, 355 CreateIpcNetworkManagerOnWorkerThread,
355 base::Unretained(this), &create_network_manager_event)); 356 base::Unretained(this), &create_network_manager_event));
356 357
357 start_worker_event.Wait(); 358 start_worker_event.Wait();
358 create_network_manager_event.Wait(); 359 create_network_manager_event.Wait();
359 360
360 CHECK(worker_thread_); 361 CHECK(worker_thread_);
361 362
362 // Init SSL, which will be needed by PeerConnection. 363 // Init SSL, which will be needed by PeerConnection.
364 //
365 // TODO(davidben): BoringSSL must be initialized by Chromium code. If the
366 // initialization requirement is removed or when different libraries are
367 // allowed to call CRYPTO_library_init concurrently, remove this line and
368 // initialize within WebRTC. See https://crbug.com/542879.
369 crypto::EnsureOpenSSLInit();
363 if (!rtc::InitializeSSL()) { 370 if (!rtc::InitializeSSL()) {
364 LOG(ERROR) << "Failed on InitializeSSL."; 371 LOG(ERROR) << "Failed on InitializeSSL.";
365 NOTREACHED(); 372 NOTREACHED();
366 return; 373 return;
367 } 374 }
368 375
369 base::WaitableEvent start_signaling_event(true, false); 376 base::WaitableEvent start_signaling_event(true, false);
370 chrome_signaling_thread_.task_runner()->PostTask( 377 chrome_signaling_thread_.task_runner()->PostTask(
371 FROM_HERE, 378 FROM_HERE,
372 base::Bind(&PeerConnectionDependencyFactory::InitializeSignalingThread, 379 base::Bind(&PeerConnectionDependencyFactory::InitializeSignalingThread,
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 } 813 }
807 814
808 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() { 815 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() {
809 if (audio_device_.get()) 816 if (audio_device_.get())
810 return; 817 return;
811 818
812 audio_device_ = new WebRtcAudioDeviceImpl(); 819 audio_device_ = new WebRtcAudioDeviceImpl();
813 } 820 }
814 821
815 } // namespace content 822 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698