Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/peer_connection_identity_service.h" | 5 #include "content/renderer/media/peer_connection_identity_service.h" |
| 6 | 6 |
| 7 #include "content/renderer/media/webrtc_identity_service.h" | 7 #include "content/renderer/media/webrtc_identity_service.h" |
| 8 #include "content/renderer/render_thread_impl.h" | 8 #include "content/renderer/render_thread_impl.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| 11 | 11 |
| 12 PeerConnectionIdentityService* PeerConnectionIdentityService::Create( | 12 PeerConnectionIdentityService* PeerConnectionIdentityService::Create( |
|
Ami GONE FROM CHROMIUM
2013/10/18 18:33:14
This factory method is no longer necessary, so you
jiayl
2013/10/18 22:13:42
Done.
| |
| 13 const GURL& origin) { | 13 const GURL& origin) { |
| 14 // The crypto APIs needed for generating identities are not implenented for | |
| 15 // OPENSSL yet (crbug/91512). So returning NULL in that case. | |
| 16 // TODO(jiayl): remove the #if once the crypto APIs are implemented for OPENSSL. | |
| 17 #if defined(USE_OPENSSL) | |
| 18 return NULL; | |
| 19 #else | |
| 20 return new PeerConnectionIdentityService(origin); | 14 return new PeerConnectionIdentityService(origin); |
| 21 #endif // defined(USE_OPENSSL) | |
| 22 } | 15 } |
| 23 | 16 |
| 24 PeerConnectionIdentityService::~PeerConnectionIdentityService() { | 17 PeerConnectionIdentityService::~PeerConnectionIdentityService() { |
| 25 if (pending_observer_) | 18 if (pending_observer_) |
| 26 RenderThreadImpl::current()->get_webrtc_identity_service() | 19 RenderThreadImpl::current()->get_webrtc_identity_service() |
| 27 ->CancelRequest(pending_request_id_); | 20 ->CancelRequest(pending_request_id_); |
| 28 } | 21 } |
| 29 | 22 |
| 30 bool PeerConnectionIdentityService::RequestIdentity( | 23 bool PeerConnectionIdentityService::RequestIdentity( |
| 31 const std::string& identity_name, | 24 const std::string& identity_name, |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 62 pending_observer_->OnFailure(error); | 55 pending_observer_->OnFailure(error); |
| 63 ResetPendingRequest(); | 56 ResetPendingRequest(); |
| 64 } | 57 } |
| 65 | 58 |
| 66 void PeerConnectionIdentityService::ResetPendingRequest() { | 59 void PeerConnectionIdentityService::ResetPendingRequest() { |
| 67 pending_observer_ = NULL; | 60 pending_observer_ = NULL; |
| 68 pending_request_id_ = 0; | 61 pending_request_id_ = 0; |
| 69 } | 62 } |
| 70 | 63 |
| 71 } // namespace content | 64 } // namespace content |
| OLD | NEW |