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

Side by Side Diff: webrtc/api/test/fakedtlsidentitystore.h

Issue 1921653002: Enable -Winconsistent-missing-override flag. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. 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 | « webrtc/api/test/fakeaudiocapturemodule_unittest.cc ('k') | webrtc/api/videotrack.h » ('j') | 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 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2013 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 MSG_SUCCESS, 139 MSG_SUCCESS,
140 MSG_FAILURE, 140 MSG_FAILURE,
141 }; 141 };
142 142
143 const char* get_key() { 143 const char* get_key() {
144 return kKeysAndCerts[key_index_].rsa_private_key_pem; 144 return kKeysAndCerts[key_index_].rsa_private_key_pem;
145 } 145 }
146 const char* get_cert() { return kKeysAndCerts[key_index_].cert_pem; } 146 const char* get_cert() { return kKeysAndCerts[key_index_].cert_pem; }
147 147
148 // rtc::MessageHandler implementation. 148 // rtc::MessageHandler implementation.
149 void OnMessage(rtc::Message* msg) { 149 void OnMessage(rtc::Message* msg) override {
150 MessageData* message_data = static_cast<MessageData*>(msg->pdata); 150 MessageData* message_data = static_cast<MessageData*>(msg->pdata);
151 rtc::scoped_refptr<webrtc::DtlsIdentityRequestObserver> observer = 151 rtc::scoped_refptr<webrtc::DtlsIdentityRequestObserver> observer =
152 message_data->data(); 152 message_data->data();
153 switch (msg->message_id) { 153 switch (msg->message_id) {
154 case MSG_SUCCESS: { 154 case MSG_SUCCESS: {
155 std::string cert; 155 std::string cert;
156 std::string key; 156 std::string key;
157 rtc::SSLIdentity::PemToDer("CERTIFICATE", get_cert(), &cert); 157 rtc::SSLIdentity::PemToDer("CERTIFICATE", get_cert(), &cert);
158 rtc::SSLIdentity::PemToDer("RSA PRIVATE KEY", get_key(), &key); 158 rtc::SSLIdentity::PemToDer("RSA PRIVATE KEY", get_key(), &key);
159 observer->OnSuccess(cert, key); 159 observer->OnSuccess(cert, key);
160 break; 160 break;
161 } 161 }
162 case MSG_FAILURE: 162 case MSG_FAILURE:
163 observer->OnFailure(0); 163 observer->OnFailure(0);
164 break; 164 break;
165 } 165 }
166 delete message_data; 166 delete message_data;
167 } 167 }
168 168
169 bool should_fail_; 169 bool should_fail_;
170 int key_index_ = 0; 170 int key_index_ = 0;
171 }; 171 };
172 172
173 #endif // WEBRTC_API_TEST_FAKEDTLSIDENTITYSERVICE_H_ 173 #endif // WEBRTC_API_TEST_FAKEDTLSIDENTITYSERVICE_H_
OLDNEW
« no previous file with comments | « webrtc/api/test/fakeaudiocapturemodule_unittest.cc ('k') | webrtc/api/videotrack.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698