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

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

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
Index: net/quic/test_tools/failing_proof_source.h
diff --git a/net/quic/test_tools/failing_proof_source.h b/net/quic/test_tools/failing_proof_source.h
new file mode 100644
index 0000000000000000000000000000000000000000..67aa44e0a89a1e5a94f650c93e003b3bbeb359bb
--- /dev/null
+++ b/net/quic/test_tools/failing_proof_source.h
@@ -0,0 +1,36 @@
+// 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.
+
+#ifndef NET_QUIC_TEST_TOOLS_FAILING_PROOF_SOURCE_H_
+#define NET_QUIC_TEST_TOOLS_FAILING_PROOF_SOURCE_H_
+
+#include "net/quic/core/crypto/proof_source.h"
+
+namespace net {
+namespace test {
+
+class FailingProofSource : public ProofSource {
+ public:
+ bool 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) override;
+
+ void 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) override;
+};
+
+} // namespace test
+} // namespace net
+
+#endif // NET_QUIC_TEST_TOOLS_FAILING_PROOF_SOURCE_H_

Powered by Google App Engine
This is Rietveld 408576698