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

Unified Diff: net/quic/crypto/proof_source_chromium.cc

Issue 2125063003: Add async variant of ProofSource::GetProof (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@126463885
Patch Set: Created 4 years, 5 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/crypto/proof_source_chromium.h ('k') | net/quic/crypto/proof_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/proof_source_chromium.cc
diff --git a/net/quic/crypto/proof_source_chromium.cc b/net/quic/crypto/proof_source_chromium.cc
index 3a62346ed34ac1c311331ae2f207bd65f1054c03..7e98c950166445bf61c108a3045031612d8e4746 100644
--- a/net/quic/crypto/proof_source_chromium.cc
+++ b/net/quic/crypto/proof_source_chromium.cc
@@ -151,4 +151,25 @@ bool ProofSourceChromium::GetProof(const IPAddress& server_ip,
return true;
}
+void ProofSourceChromium::GetProof(const IPAddress& server_ip,
+ const std::string& hostname,
+ const std::string& server_config,
+ QuicVersion quic_version,
+ base::StringPiece chlo_hash,
+ bool ecdsa_ok,
+ std::unique_ptr<Callback> callback) {
+ // As a transitional implementation, just call the synchronous version of
+ // GetProof, then invoke the callback with the results and destroy it.
+ // TODO(gredner): rework this when GetProof involves an RPC. At that point
+ // this class will also need to store a pointer to the callback and ensure
+ // that it gets deleted after it is invoked.
Ryan Hamilton 2016/07/07 16:34:00 Since proof_source_chromium is not shared, I think
+ scoped_refptr<ProofSource::Chain> chain;
+ string signature;
+ string leaf_cert_sct;
+ const bool ok =
+ GetProof(server_ip, hostname, server_config, quic_version, chlo_hash,
+ ecdsa_ok, &chain, &signature, &leaf_cert_sct);
+ callback->Run(ok, chain, signature, leaf_cert_sct);
+}
+
} // namespace net
« no previous file with comments | « net/quic/crypto/proof_source_chromium.h ('k') | net/quic/crypto/proof_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698