diff options
author | jiayl@chromium.org <jiayl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-10 13:38:48 +0000 |
---|---|---|
committer | jiayl@chromium.org <jiayl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-10 13:38:48 +0000 |
commit | 994fe1999ae76f2bcc508bf8264068bfe0a55612 (patch) | |
tree | 33c875283416b44ad39f5b95ce8058ec88c645db /content/renderer/media | |
parent | 02d1d4480b811b26d3e80aecf4a4f4777de858de (diff) | |
download | chromium_src-994fe1999ae76f2bcc508bf8264068bfe0a55612.zip chromium_src-994fe1999ae76f2bcc508bf8264068bfe0a55612.tar.gz chromium_src-994fe1999ae76f2bcc508bf8264068bfe0a55612.tar.bz2 |
Passing NULL PeerConnectionIdentityService to Libjingle when Chrome is using openssl.
Because the crypto APIs needed for generating identities are not implemented for openssl yet, we should let Libjingle generate its own by passing NULL.
BUG=
Review URL: https://chromiumcodereview.appspot.com/22640017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@216837 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/media')
3 files changed, 20 insertions, 5 deletions
diff --git a/content/renderer/media/media_stream_dependency_factory.cc b/content/renderer/media/media_stream_dependency_factory.cc index 3d07ce8..304a818 100644 --- a/content/renderer/media/media_stream_dependency_factory.cc +++ b/content/renderer/media/media_stream_dependency_factory.cc @@ -551,8 +551,8 @@ MediaStreamDependencyFactory::CreatePeerConnection( web_frame); PeerConnectionIdentityService* identity_service = - new PeerConnectionIdentityService(GURL(web_frame->document().url().spec()) - .GetOrigin()); + PeerConnectionIdentityService::Create( + GURL(web_frame->document().url().spec()).GetOrigin()); return pc_factory_->CreatePeerConnection(ice_servers, constraints, diff --git a/content/renderer/media/peer_connection_identity_service.cc b/content/renderer/media/peer_connection_identity_service.cc index f7bc856..904eb41 100644 --- a/content/renderer/media/peer_connection_identity_service.cc +++ b/content/renderer/media/peer_connection_identity_service.cc @@ -9,8 +9,17 @@ namespace content { -PeerConnectionIdentityService::PeerConnectionIdentityService(const GURL& origin) - : origin_(origin), pending_observer_(NULL), pending_request_id_(0) {} +PeerConnectionIdentityService* PeerConnectionIdentityService::Create( + const GURL& origin) { +// The crypto APIs needed for generating identities are not implenented for +// OPENSSL yet (crbug/91512). So returning NULL in that case. +// TODO(jiayl): remove the #if once the crypto APIs are implemented for OPENSSL. +#if defined(USE_OPENSSL) + return NULL; +#else + return new PeerConnectionIdentityService(origin); +#endif // defined(USE_OPENSSL) +} PeerConnectionIdentityService::~PeerConnectionIdentityService() { if (pending_observer_) @@ -39,6 +48,9 @@ bool PeerConnectionIdentityService::RequestIdentity( return true; } +PeerConnectionIdentityService::PeerConnectionIdentityService(const GURL& origin) + : origin_(origin), pending_observer_(NULL), pending_request_id_(0) {} + void PeerConnectionIdentityService::OnIdentityReady( const std::string& certificate, const std::string& private_key) { diff --git a/content/renderer/media/peer_connection_identity_service.h b/content/renderer/media/peer_connection_identity_service.h index a5092e3..fa0b16a 100644 --- a/content/renderer/media/peer_connection_identity_service.h +++ b/content/renderer/media/peer_connection_identity_service.h @@ -19,7 +19,8 @@ namespace content { class PeerConnectionIdentityService : public webrtc::DTLSIdentityServiceInterface { public: - explicit PeerConnectionIdentityService(const GURL& origin); + static PeerConnectionIdentityService* Create(const GURL& origin); + virtual ~PeerConnectionIdentityService(); // webrtc::DTLSIdentityServiceInterface implementation. @@ -29,6 +30,8 @@ class PeerConnectionIdentityService webrtc::DTLSIdentityRequestObserver* observer) OVERRIDE; private: + explicit PeerConnectionIdentityService(const GURL& origin); + void OnIdentityReady(const std::string& certificate, const std::string& private_key); void OnRequestFailed(int error); |