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

Side by Side Diff: net/quic/crypto/quic_crypto_server_config_test.cc

Issue 667923003: Standardize usage of virtual/override/final in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « net/quic/crypto/quic_crypto_server_config.cc ('k') | net/quic/crypto/quic_random.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "net/quic/crypto/quic_crypto_server_config.h" 5 #include "net/quic/crypto/quic_crypto_server_config.h"
6 6
7 #include <stdarg.h> 7 #include <stdarg.h>
8 8
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "net/quic/crypto/aes_128_gcm_12_encrypter.h" 10 #include "net/quic/crypto/aes_128_gcm_12_encrypter.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 const QuicCryptoServerConfig* server_config_; 200 const QuicCryptoServerConfig* server_config_;
201 }; 201 };
202 202
203 class TestStrikeRegisterClient : public StrikeRegisterClient { 203 class TestStrikeRegisterClient : public StrikeRegisterClient {
204 public: 204 public:
205 explicit TestStrikeRegisterClient(QuicCryptoServerConfig* config) 205 explicit TestStrikeRegisterClient(QuicCryptoServerConfig* config)
206 : config_(config), 206 : config_(config),
207 is_known_orbit_called_(false) { 207 is_known_orbit_called_(false) {
208 } 208 }
209 209
210 virtual bool IsKnownOrbit(StringPiece orbit) const override { 210 bool IsKnownOrbit(StringPiece orbit) const override {
211 // Ensure that the strike register client lock is not held. 211 // Ensure that the strike register client lock is not held.
212 QuicCryptoServerConfigPeer peer(config_); 212 QuicCryptoServerConfigPeer peer(config_);
213 base::Lock* m = peer.GetStrikeRegisterClientLock(); 213 base::Lock* m = peer.GetStrikeRegisterClientLock();
214 // In Chromium, we will dead lock if the lock is held by the current thread. 214 // In Chromium, we will dead lock if the lock is held by the current thread.
215 // Chromium doesn't have AssertNotHeld API call. 215 // Chromium doesn't have AssertNotHeld API call.
216 // m->AssertNotHeld(); 216 // m->AssertNotHeld();
217 base::AutoLock lock(*m); 217 base::AutoLock lock(*m);
218 218
219 is_known_orbit_called_ = true; 219 is_known_orbit_called_ = true;
220 return true; 220 return true;
221 } 221 }
222 222
223 virtual void VerifyNonceIsValidAndUnique( 223 void VerifyNonceIsValidAndUnique(StringPiece nonce,
224 StringPiece nonce, 224 QuicWallTime now,
225 QuicWallTime now, 225 ResultCallback* cb) override {
226 ResultCallback* cb) override {
227 LOG(FATAL) << "Not implemented"; 226 LOG(FATAL) << "Not implemented";
228 } 227 }
229 228
230 bool is_known_orbit_called() { return is_known_orbit_called_; } 229 bool is_known_orbit_called() { return is_known_orbit_called_; }
231 230
232 private: 231 private:
233 QuicCryptoServerConfig* config_; 232 QuicCryptoServerConfig* config_;
234 mutable bool is_known_orbit_called_; 233 mutable bool is_known_orbit_called_;
235 }; 234 };
236 235
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 nullptr); 695 nullptr);
697 test_peer_.CheckConfigs( 696 test_peer_.CheckConfigs(
698 "a", false, 697 "a", false,
699 "b", true, 698 "b", true,
700 "c", false, 699 "c", false,
701 nullptr); 700 nullptr);
702 } 701 }
703 702
704 } // namespace test 703 } // namespace test
705 } // namespace net 704 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/crypto/quic_crypto_server_config.cc ('k') | net/quic/crypto/quic_random.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698