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

Unified Diff: net/quic/test_tools/fake_proof_source.cc

Issue 2679783003: Deprecate FLAGS_quic_reloadable_flag_enable_async_get_proof (Closed)
Patch Set: Address gredner's comments. Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/test_tools/fake_proof_source.h ('k') | net/tools/quic/quic_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/test_tools/fake_proof_source.cc
diff --git a/net/quic/test_tools/fake_proof_source.cc b/net/quic/test_tools/fake_proof_source.cc
index 135baeebb3b9111db520c19c02ddd09d3a715b9a..0eea145bc1d10024abb762dda06f1c09a024111c 100644
--- a/net/quic/test_tools/fake_proof_source.cc
+++ b/net/quic/test_tools/fake_proof_source.cc
@@ -42,21 +42,6 @@ void FakeProofSource::Activate() {
active_ = true;
}
-bool FakeProofSource::GetProof(
- const QuicSocketAddress& server_address,
- const string& hostname,
- const string& server_config,
- QuicVersion quic_version,
- StringPiece chlo_hash,
- const QuicTagVector& connection_options,
- QuicReferenceCountedPointer<ProofSource::Chain>* out_chain,
- QuicCryptoProof* out_proof) {
- QUIC_LOG(WARNING) << "Synchronous GetProof called";
- return delegate_->GetProof(server_address, hostname, server_config,
- quic_version, chlo_hash, connection_options,
- out_chain, out_proof);
-}
-
void FakeProofSource::GetProof(
const QuicSocketAddress& server_address,
const string& hostname,
@@ -66,16 +51,11 @@ void FakeProofSource::GetProof(
const QuicTagVector& connection_options,
std::unique_ptr<ProofSource::Callback> callback) {
if (!active_) {
- QuicReferenceCountedPointer<Chain> chain;
- QuicCryptoProof proof;
- const bool ok =
- GetProof(server_address, hostname, server_config, quic_version,
- chlo_hash, connection_options, &chain, &proof);
- callback->Run(ok, chain, proof, /* details = */ nullptr);
+ delegate_->GetProof(server_address, hostname, server_config, quic_version,
+ chlo_hash, connection_options, std::move(callback));
return;
}
- QUIC_LOG(WARNING) << "Asynchronous GetProof called";
params_.push_back(Params{server_address, hostname, server_config,
quic_version, chlo_hash.as_string(),
connection_options, std::move(callback)});
@@ -88,16 +68,14 @@ int FakeProofSource::NumPendingCallbacks() const {
void FakeProofSource::InvokePendingCallback(int n) {
CHECK(NumPendingCallbacks() > n);
- const Params& params = params_[n];
+ Params& params = params_[n];
- QuicReferenceCountedPointer<ProofSource::Chain> chain;
- QuicCryptoProof proof;
- const bool ok = delegate_->GetProof(
- params.server_address, params.hostname, params.server_config,
- params.quic_version, params.chlo_hash, params.connection_options, &chain,
- &proof);
+ // Note: relies on the callback being invoked synchronously
+ delegate_->GetProof(params.server_address, params.hostname,
+ params.server_config, params.quic_version,
+ params.chlo_hash, params.connection_options,
+ std::move(params.callback));
- params.callback->Run(ok, chain, proof, /* details = */ nullptr);
auto it = params_.begin() + n;
params_.erase(it);
}
« no previous file with comments | « net/quic/test_tools/fake_proof_source.h ('k') | net/tools/quic/quic_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698