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

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

Issue 312003002: Port net/tools/balsa to non-Linux platforms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Windows compiler warnings Created 6 years, 6 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 {
11 enum ParseState { 11 enum ParseState {
12 PARSE_ERROR, 12 PARSE_ERROR,
13 READING_HEADER_AND_FIRSTLINE, 13 READING_HEADER_AND_FIRSTLINE,
14 READING_CHUNK_LENGTH, 14 READING_CHUNK_LENGTH,
15 READING_CHUNK_EXTENSION, 15 READING_CHUNK_EXTENSION,
16 READING_CHUNK_DATA, 16 READING_CHUNK_DATA,
17 READING_CHUNK_TERM, 17 READING_CHUNK_TERM,
18 READING_LAST_CHUNK_TERM, 18 READING_LAST_CHUNK_TERM,
19 READING_TRAILER, 19 READING_TRAILER,
20 READING_UNTIL_CLOSE, 20 READING_UNTIL_CLOSE,
21 READING_CONTENT, 21 READING_CONTENT,
22 MESSAGE_FULLY_READ, 22 MESSAGE_FULLY_READ,
23 NUM_STATES, 23 NUM_STATES,
24 }; 24 };
25 25
26 enum ErrorCode { 26 enum ErrorCode {
27 #if defined(_WIN32)
28 // On Windows, <WinError.h> defines the NO_ERROR macro as 0L, which
29 // breaks the compilation of the "NO_ERROR = 0" line.
30 #undef NO_ERROR
31 #endif
27 NO_ERROR = 0, // A sentinel value for convenience, none of the callbacks 32 NO_ERROR = 0, // A sentinel value for convenience, none of the callbacks
28 // should ever see this error code. 33 // should ever see this error code.
29 // Header parsing errors 34 // Header parsing errors
30 // Note that adding one to many of the REQUEST errors yields the 35 // Note that adding one to many of the REQUEST errors yields the
31 // appropriate RESPONSE error. 36 // appropriate RESPONSE error.
32 // Particularly, when parsing the first line of a request or response, 37 // Particularly, when parsing the first line of a request or response,
33 // there are three sequences of non-whitespace regardless of whether or 38 // there are three sequences of non-whitespace regardless of whether or
34 // not it is a request or response. These are listed below, in order. 39 // not it is a request or response. These are listed below, in order.
35 // 40 //
36 // firstline_a firstline_b firstline_c 41 // firstline_a firstline_b firstline_c
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 CONTENT_LENGTH_OVERFLOW, 107 CONTENT_LENGTH_OVERFLOW,
103 NO_CONTENT_LENGTH, 108 NO_CONTENT_LENGTH,
104 VALID_CONTENT_LENGTH, 109 VALID_CONTENT_LENGTH,
105 }; 110 };
106 }; 111 };
107 112
108 } // namespace net 113 } // namespace net
109 114
110 #endif // NET_TOOLS_BALSA_BALSA_ENUMS_H_ 115 #endif // NET_TOOLS_BALSA_BALSA_ENUMS_H_
111 116
OLDNEW
« no previous file with comments | « net/net.gypi ('k') | net/tools/balsa/balsa_frame.h » ('j') | net/tools/balsa/balsa_frame.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698