summaryrefslogtreecommitdiffstats
path: root/net/http/http_stream_parser.h
diff options
context:
space:
mode:
authorsatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-22 00:11:10 +0000
committersatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-22 00:11:10 +0000
commite99a796f5a7f1910e0da9400e5cabbc346ce1d37 (patch)
treeac7be0a05511b840b977db3244c502346b34d4f6 /net/http/http_stream_parser.h
parent90f8b9bb6e85101ecccecec72ec0c997eef47a3b (diff)
downloadchromium_src-e99a796f5a7f1910e0da9400e5cabbc346ce1d37.zip
chromium_src-e99a796f5a7f1910e0da9400e5cabbc346ce1d37.tar.gz
chromium_src-e99a796f5a7f1910e0da9400e5cabbc346ce1d37.tar.bz2
Split DoSendBody() to DoSendChunkedBody() and DoSendNonChunkedBody().
The two code paths perform the send-body operation differently. Split it to separate functions to make the code easier to read. BUG=72001 TEST=net_unittests passed as before. Review URL: http://codereview.chromium.org/9252035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118632 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_stream_parser.h')
-rw-r--r--net/http/http_stream_parser.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/http/http_stream_parser.h b/net/http/http_stream_parser.h
index 3e649f1..34ec522 100644
--- a/net/http/http_stream_parser.h
+++ b/net/http/http_stream_parser.h
@@ -100,7 +100,11 @@ class NET_EXPORT_PRIVATE HttpStreamParser : public ChunkCallback {
enum State {
STATE_NONE,
STATE_SENDING_HEADERS,
- STATE_SENDING_BODY,
+ // If the request comes with a body, either of the following two
+ // states will be executed, depending on whether the body is chunked
+ // or not.
+ STATE_SENDING_CHUNKED_BODY,
+ STATE_SENDING_NON_CHUNKED_BODY,
STATE_REQUEST_SENT,
STATE_READ_HEADERS,
STATE_READ_HEADERS_COMPLETE,
@@ -131,7 +135,8 @@ class NET_EXPORT_PRIVATE HttpStreamParser : public ChunkCallback {
// The implementations of each state of the state machine.
int DoSendHeaders(int result);
- int DoSendBody(int result);
+ int DoSendChunkedBody(int result);
+ int DoSendNonChunkedBody(int result);
int DoReadHeaders();
int DoReadHeadersComplete(int result);
int DoReadBody();