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

Side by Side Diff: net/tools/balsa/balsa_enums.h

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_TOOLS_BALSA_BALSA_ENUMS_H_ 5 #ifndef NET_TOOLS_BALSA_BALSA_ENUMS_H_
6 #define NET_TOOLS_BALSA_BALSA_ENUMS_H_ 6 #define NET_TOOLS_BALSA_BALSA_ENUMS_H_
7 7
8 namespace net { 8 namespace net {
9 9
10 struct BalsaFrameEnums { 10 struct BalsaFrameEnums {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 // | this NONWS 53 // | this NONWS
54 // | sequence... 54 // | sequence...
55 NO_STATUS_LINE_IN_RESPONSE, // | 55 NO_STATUS_LINE_IN_RESPONSE, // |
56 NO_REQUEST_LINE_IN_REQUEST, // | 56 NO_REQUEST_LINE_IN_REQUEST, // |
57 FAILED_TO_FIND_WS_AFTER_RESPONSE_VERSION, // | firstline_a 57 FAILED_TO_FIND_WS_AFTER_RESPONSE_VERSION, // | firstline_a
58 FAILED_TO_FIND_WS_AFTER_REQUEST_METHOD, // | firstline_a 58 FAILED_TO_FIND_WS_AFTER_REQUEST_METHOD, // | firstline_a
59 FAILED_TO_FIND_WS_AFTER_RESPONSE_STATUSCODE, // | firstline_b 59 FAILED_TO_FIND_WS_AFTER_RESPONSE_STATUSCODE, // | firstline_b
60 FAILED_TO_FIND_WS_AFTER_REQUEST_REQUEST_URI, // | firstline_b 60 FAILED_TO_FIND_WS_AFTER_REQUEST_REQUEST_URI, // | firstline_b
61 FAILED_TO_FIND_NL_AFTER_RESPONSE_REASON_PHRASE, // | firstline_c 61 FAILED_TO_FIND_NL_AFTER_RESPONSE_REASON_PHRASE, // | firstline_c
62 FAILED_TO_FIND_NL_AFTER_REQUEST_HTTP_VERSION, // | firstline_c 62 FAILED_TO_FIND_NL_AFTER_REQUEST_HTTP_VERSION, // | firstline_c
63
64 FAILED_CONVERTING_STATUS_CODE_TO_INT, 63 FAILED_CONVERTING_STATUS_CODE_TO_INT,
65 REQUEST_URI_TOO_LONG, // Request URI greater than kMaxUrlLen. 64 REQUEST_URI_TOO_LONG, // Request URI greater than kMaxUrlLen.
66
67 HEADERS_TOO_LONG, 65 HEADERS_TOO_LONG,
68 UNPARSABLE_CONTENT_LENGTH, 66 UNPARSABLE_CONTENT_LENGTH,
69 // Warning: there may be a body but there was no content-length/chunked 67 // Warning: there may be a body but there was no content-length/chunked
70 // encoding 68 // encoding
71 MAYBE_BODY_BUT_NO_CONTENT_LENGTH, 69 MAYBE_BODY_BUT_NO_CONTENT_LENGTH,
72 70
73 // This is used if a body is required for a request. 71 // This is used if a body is required for a request.
74 REQUIRED_BODY_BUT_NO_CONTENT_LENGTH, 72 REQUIRED_BODY_BUT_NO_CONTENT_LENGTH,
75
76 HEADER_MISSING_COLON, 73 HEADER_MISSING_COLON,
77 74
78 // Chunking errors 75 // Chunking errors
79 INVALID_CHUNK_LENGTH, 76 INVALID_CHUNK_LENGTH,
80 CHUNK_LENGTH_OVERFLOW, 77 CHUNK_LENGTH_OVERFLOW,
81 78
82 // Other errors. 79 // Other errors.
83 CALLED_BYTES_SPLICED_WHEN_UNSAFE_TO_DO_SO, 80 CALLED_BYTES_SPLICED_WHEN_UNSAFE_TO_DO_SO,
84 CALLED_BYTES_SPLICED_AND_EXCEEDED_SAFE_SPLICE_AMOUNT, 81 CALLED_BYTES_SPLICED_AND_EXCEEDED_SAFE_SPLICE_AMOUNT,
85 MULTIPLE_CONTENT_LENGTH_KEYS, 82 MULTIPLE_CONTENT_LENGTH_KEYS,
86 MULTIPLE_TRANSFER_ENCODING_KEYS, 83 MULTIPLE_TRANSFER_ENCODING_KEYS,
87 UNKNOWN_TRANSFER_ENCODING, 84 UNKNOWN_TRANSFER_ENCODING,
88 INVALID_HEADER_FORMAT, 85 INVALID_HEADER_FORMAT,
89 86
90 // A detected internal inconsistency was found. 87 // A detected internal inconsistency was found.
91 INTERNAL_LOGIC_ERROR, 88 INTERNAL_LOGIC_ERROR,
92
93 NUM_ERROR_CODES 89 NUM_ERROR_CODES
94 }; 90 };
95 static const char* ParseStateToString(ParseState error_code); 91 static const char* ParseStateToString(ParseState error_code);
96 static const char* ErrorCodeToString(ErrorCode error_code); 92 static const char* ErrorCodeToString(ErrorCode error_code);
97 }; 93 };
98 94
99 struct BalsaHeadersEnums { 95 struct BalsaHeadersEnums {
100 enum ContentLengthStatus { 96 enum ContentLengthStatus {
101 INVALID_CONTENT_LENGTH, 97 INVALID_CONTENT_LENGTH,
102 CONTENT_LENGTH_OVERFLOW, 98 CONTENT_LENGTH_OVERFLOW,
103 NO_CONTENT_LENGTH, 99 NO_CONTENT_LENGTH,
104 VALID_CONTENT_LENGTH, 100 VALID_CONTENT_LENGTH,
105 }; 101 };
106 }; 102 };
107 103
108 } // namespace net 104 } // namespace net
109 105
110 #endif // NET_TOOLS_BALSA_BALSA_ENUMS_H_ 106 #endif // NET_TOOLS_BALSA_BALSA_ENUMS_H_
111
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698