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

Side by Side Diff: webrtc/api/dtlsidentitystore.h

Issue 1964663004: Removed old RequestIdentity function signature (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.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 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 /* 1 /*
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // This interface defines an in-memory DTLS identity store, which generates DTLS 50 // This interface defines an in-memory DTLS identity store, which generates DTLS
51 // identities. 51 // identities.
52 // APIs calls must be made on the signaling thread and the callbacks are also 52 // APIs calls must be made on the signaling thread and the callbacks are also
53 // called on the signaling thread. 53 // called on the signaling thread.
54 class DtlsIdentityStoreInterface { 54 class DtlsIdentityStoreInterface {
55 public: 55 public:
56 virtual ~DtlsIdentityStoreInterface() { } 56 virtual ~DtlsIdentityStoreInterface() { }
57 57
58 // The |observer| will be called when the requested identity is ready, or when 58 // The |observer| will be called when the requested identity is ready, or when
59 // identity generation fails. 59 // identity generation fails.
60 // TODO(torbjorng,hbos): There are currently two versions of RequestIdentity,
61 // with default implementation to call the other version of itself (so that a
62 // call can be made regardless of which version has been overridden). The 1st
63 // version exists because it is currently implemented in chromium. The 2nd
64 // version will become the one and only RequestIdentity as soon as chromium
65 // implements the correct version. crbug.com/544902, webrtc:5092.
66 virtual void RequestIdentity(
67 rtc::KeyParams key_params,
68 const rtc::scoped_refptr<DtlsIdentityRequestObserver>& observer) {
69 // Add default ("null") expiration.
70 RequestIdentity(key_params, rtc::Optional<uint64_t>(), observer);
71 }
72 virtual void RequestIdentity( 60 virtual void RequestIdentity(
73 const rtc::KeyParams& key_params, 61 const rtc::KeyParams& key_params,
74 const rtc::Optional<uint64_t>& expires_ms, 62 const rtc::Optional<uint64_t>& expires_ms,
75 const rtc::scoped_refptr<DtlsIdentityRequestObserver>& observer) { 63 const rtc::scoped_refptr<DtlsIdentityRequestObserver>& observer) = 0;
76 // Drop |expires|.
77 RequestIdentity(key_params, observer);
78 }
79 }; 64 };
80 65
81 // The WebRTC default implementation of DtlsIdentityStoreInterface. 66 // The WebRTC default implementation of DtlsIdentityStoreInterface.
82 // Identity generation is performed on the worker thread. 67 // Identity generation is performed on the worker thread.
83 class DtlsIdentityStoreImpl : public DtlsIdentityStoreInterface, 68 class DtlsIdentityStoreImpl : public DtlsIdentityStoreInterface,
84 public rtc::MessageHandler { 69 public rtc::MessageHandler {
85 public: 70 public:
86 // This will start to preemptively generating an RSA identity in the 71 // This will start to preemptively generating an RSA identity in the
87 // background if the worker thread is not the same as the signaling thread. 72 // background if the worker thread is not the same as the signaling thread.
88 DtlsIdentityStoreImpl(rtc::Thread* signaling_thread, 73 DtlsIdentityStoreImpl(rtc::Thread* signaling_thread,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 std::unique_ptr<rtc::SSLIdentity> free_identity_; 127 std::unique_ptr<rtc::SSLIdentity> free_identity_;
143 }; 128 };
144 129
145 // One RequestInfo per KeyType. Only touch on the |signaling_thread_|. 130 // One RequestInfo per KeyType. Only touch on the |signaling_thread_|.
146 RequestInfo request_info_[rtc::KT_LAST]; 131 RequestInfo request_info_[rtc::KT_LAST];
147 }; 132 };
148 133
149 } // namespace webrtc 134 } // namespace webrtc
150 135
151 #endif // WEBRTC_API_DTLSIDENTITYSTORE_H_ 136 #endif // WEBRTC_API_DTLSIDENTITYSTORE_H_
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