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

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

Issue 2626443002: Fix QUIC crash when ProofSource::GetProof fails (Closed)
Patch Set: Created 3 years, 11 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/failing_proof_source.h ('k') | net/quic/test_tools/quic_crypto_server_config_peer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/test_tools/failing_proof_source.cc
diff --git a/net/quic/test_tools/failing_proof_source.cc b/net/quic/test_tools/failing_proof_source.cc
new file mode 100644
index 0000000000000000000000000000000000000000..53b69e19c856a40f8479cba4ae12b1104edd5ffc
--- /dev/null
+++ b/net/quic/test_tools/failing_proof_source.cc
@@ -0,0 +1,33 @@
+// Copyright (c) 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "net/quic/test_tools/failing_proof_source.h"
+
+namespace net {
+namespace test {
+
+bool FailingProofSource::GetProof(
+ const QuicSocketAddress& server_address,
+ const std::string& hostname,
+ const std::string& server_config,
+ QuicVersion quic_version,
+ base::StringPiece chlo_hash,
+ const QuicTagVector& connection_options,
+ QuicReferenceCountedPointer<ProofSource::Chain>* out_chain,
+ QuicCryptoProof* out_proof) {
+ return false;
Jana 2017/01/09 22:08:08 Can you not just do this in the .h file as in the
danzh1 2017/01/09 22:20:42 Yes, chromium compiler failed in my local repo. An
+}
+
+void FailingProofSource::GetProof(const QuicSocketAddress& server_address,
+ const std::string& hostname,
+ const std::string& server_config,
+ QuicVersion quic_version,
+ base::StringPiece chlo_hash,
+ const QuicTagVector& connection_options,
+ std::unique_ptr<Callback> callback) {
+ callback->Run(false, nullptr, QuicCryptoProof(), nullptr);
+}
+
+} // namespace test
+} // namespace net
« no previous file with comments | « net/quic/test_tools/failing_proof_source.h ('k') | net/quic/test_tools/quic_crypto_server_config_peer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698