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

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

Issue 2188663003: Add plumbing for passing stats from calls to ProofSource::GetProof through QUIC. These stats are n… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@128459519
Patch Set: Rebase Created 4 years, 4 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 | net/quic/crypto/proof_source.h » ('j') | net/quic/crypto/proof_source.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 <algorithm> 5 #include <algorithm>
6 #include <cstdint> 6 #include <cstdint>
7 #include <memory> 7 #include <memory>
8 #include <ostream> 8 #include <ostream>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 const char* error_substr, 195 const char* error_substr,
196 bool* called) 196 bool* called)
197 : test_(test), 197 : test_(test),
198 should_succeed_(should_succeed), 198 should_succeed_(should_succeed),
199 error_substr_(error_substr), 199 error_substr_(error_substr),
200 called_(called) { 200 called_(called) {
201 *called_ = false; 201 *called_ = false;
202 } 202 }
203 203
204 void RunImpl(const CryptoHandshakeMessage& client_hello, 204 void RunImpl(const CryptoHandshakeMessage& client_hello,
205 const Result& result) override { 205 const Result& result,
206 std::unique_ptr<ProofSource::Details> /* details */) override {
206 { 207 {
207 // Ensure that the strike register client lock is not held. 208 // Ensure that the strike register client lock is not held.
208 QuicCryptoServerConfigPeer peer(&test_->config_); 209 QuicCryptoServerConfigPeer peer(&test_->config_);
209 base::Lock* m = peer.GetStrikeRegisterClientLock(); 210 base::Lock* m = peer.GetStrikeRegisterClientLock();
210 // In Chromium, we will dead lock if the lock is held by the current 211 // In Chromium, we will dead lock if the lock is held by the current
211 // thread. Chromium doesn't have AssertNotHeld API call. 212 // thread. Chromium doesn't have AssertNotHeld API call.
212 // m->AssertNotHeld(); 213 // m->AssertNotHeld();
213 base::AutoLock lock(*m); 214 base::AutoLock lock(*m);
214 } 215 }
215 ASSERT_FALSE(*called_); 216 ASSERT_FALSE(*called_);
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after
1208 EXPECT_EQ(0, strike_register_client_->PendingVerifications()); 1209 EXPECT_EQ(0, strike_register_client_->PendingVerifications());
1209 } else { 1210 } else {
1210 // version 33. 1211 // version 33.
1211 ASSERT_EQ(kSHLO, out_.tag()); 1212 ASSERT_EQ(kSHLO, out_.tag());
1212 CheckServerHello(out_); 1213 CheckServerHello(out_);
1213 } 1214 }
1214 } 1215 }
1215 1216
1216 } // namespace test 1217 } // namespace test
1217 } // namespace net 1218 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/crypto/proof_source.h » ('j') | net/quic/crypto/proof_source.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698