diff options
author | satorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-19 07:09:29 +0000 |
---|---|---|
committer | satorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-19 07:09:29 +0000 |
commit | e44723427b1fc75475a01cbca84fc987c95e7a6b (patch) | |
tree | 807b20bfcd7ab683f380a6bf05898893b90f4292 /net/base/upload_data_stream.h | |
parent | 3c0edf1d82131458b0aa7c5115a53e62a6421f21 (diff) | |
download | chromium_src-e44723427b1fc75475a01cbca84fc987c95e7a6b.zip chromium_src-e44723427b1fc75475a01cbca84fc987c95e7a6b.tar.gz chromium_src-e44723427b1fc75475a01cbca84fc987c95e7a6b.tar.bz2 |
Factor out chunk encoding logic into HttpStreamParser::EncodeChunk().
The logic is meaty enough to be factored out.
Add unit tests along the way.
BUG=72001
TEST=add unit tests.
Review URL: http://codereview.chromium.org/9242018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118265 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/upload_data_stream.h')
-rw-r--r-- | net/base/upload_data_stream.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/base/upload_data_stream.h b/net/base/upload_data_stream.h index df21e63..d0db3ff 100644 --- a/net/base/upload_data_stream.h +++ b/net/base/upload_data_stream.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -30,9 +30,11 @@ class NET_EXPORT UploadDataStream { // TODO(satish): We should ideally have UploadDataStream expose a Read() // method which returns data in a caller provided IOBuffer. That would do away - // with this method and make the interface cleaner as well with less memmove + // with this constant and make the interface cleaner as well with less memmove // calls. - size_t GetMaxBufferSize() const { return kBufSize; } + // + // The size of the stream's buffer pointed by buf(). + static const size_t kBufferSize; // Call to indicate that a portion of the stream's buffer was consumed. This // call modifies the stream's buffer so that it contains the next segment of @@ -67,8 +69,6 @@ class NET_EXPORT UploadDataStream { static void set_merge_chunks(bool merge) { merge_chunks_ = merge; } private: - enum { kBufSize = 16384 }; - // Protects from public access since now we have a static creator function // which will do both creation and initialization and might return an error. explicit UploadDataStream(UploadData* data); |