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

Unified Diff: net/http2/decoder/decode_status.h

Issue 2293613002: Add new HTTP/2 and HPACK decoder in net/http2/. (Closed)
Patch Set: Replace LOG(INFO) by VLOG(2) in DecodeBufferTest.SlowDecodeTestStruct so that trybots do not fail. Created 4 years 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/http2/decoder/decode_http2_structures_test.cc ('k') | net/http2/decoder/decode_status.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http2/decoder/decode_status.h
diff --git a/net/http2/decoder/decode_status.h b/net/http2/decoder/decode_status.h
new file mode 100644
index 0000000000000000000000000000000000000000..e5fbeebc57c08a0ad66f8400594b2d5f1bad8659
--- /dev/null
+++ b/net/http2/decoder/decode_status.h
@@ -0,0 +1,32 @@
+// Copyright 2016 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_HTTP2_DECODER_DECODE_STATUS_H_
+#define NET_HTTP2_DECODER_DECODE_STATUS_H_
+
+// Enum DecodeStatus is used to report the status of decoding of many
+// types of HTTP/2 and HPACK objects.
+
+#include <ostream>
+
+#include "net/base/net_export.h"
+
+namespace net {
+
+enum class DecodeStatus {
+ // Decoding is done.
+ kDecodeDone,
+
+ // Decoder needs more input to be able to make progress.
+ kDecodeInProgress,
+
+ // Decoding failed (e.g. HPACK variable length integer is too large, or
+ // an HTTP/2 frame has padding declared to be larger than the payload).
+ kDecodeError,
+};
+NET_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& out, DecodeStatus v);
+
+} // namespace net
+
+#endif // NET_HTTP2_DECODER_DECODE_STATUS_H_
« no previous file with comments | « net/http2/decoder/decode_http2_structures_test.cc ('k') | net/http2/decoder/decode_status.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698