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

Unified Diff: net/base/upload_element.h

Issue 10861036: net: Remove UploadElement::TYPE_CHUNK (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unused UploadElement::set_type() Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/upload_data_stream.cc ('k') | net/base/upload_element.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/upload_element.h
diff --git a/net/base/upload_element.h b/net/base/upload_element.h
index 90444d69036a344cea1086c4fdc8a7cfe551d36d..50ed438e235a1fef3c93eb8866ce9f4b62552a0f 100644
--- a/net/base/upload_element.h
+++ b/net/base/upload_element.h
@@ -24,21 +24,12 @@ class NET_EXPORT UploadElement {
enum Type {
TYPE_BYTES,
TYPE_FILE,
-
- // A block of bytes to be sent in chunked encoding immediately, without
- // waiting for rest of the data.
- TYPE_CHUNK,
};
UploadElement();
~UploadElement();
Type type() const { return type_; }
- // Explicitly sets the type of this UploadElement. Used during IPC
- // marshalling.
- void set_type(Type type) {
- type_ = type;
- }
const char* bytes() const { return bytes_start_ ? bytes_start_ : &buf_[0]; }
uint64 bytes_length() const { return buf_.size() + bytes_length_; }
@@ -81,17 +72,6 @@ class NET_EXPORT UploadElement {
expected_file_modification_time_ = expected_modification_time;
}
- // Though similar to bytes, a chunk indicates that the element is sent via
- // chunked transfer encoding and not buffered until the full upload data
- // is available.
- void SetToChunk(const char* bytes, int bytes_len, bool is_last_chunk);
-
- bool is_last_chunk() const { return is_last_chunk_; }
- // Sets whether this is the last chunk. Used during IPC marshalling.
- void set_is_last_chunk(bool is_last_chunk) {
- is_last_chunk_ = is_last_chunk;
- }
-
// Returns the byte-length of the element. For files that do not exist, 0
// is returned. This is done for consistency with Mozilla.
uint64 GetContentLength();
@@ -115,7 +95,7 @@ class NET_EXPORT UploadElement {
FileStream* OpenFileStream();
// Reads up to |buf_len| bytes synchronously from memory (i.e. type_ is
- // TYPE_BYTES or TYPE_CHUNK).
+ // TYPE_BYTES).
int ReadFromMemorySync(char* buf, int buf_len);
// Reads up to |buf_len| bytes synchronously from a file (i.e. type_ is
@@ -136,7 +116,6 @@ class NET_EXPORT UploadElement {
uint64 file_range_offset_;
uint64 file_range_length_;
base::Time expected_file_modification_time_;
- bool is_last_chunk_;
bool override_content_length_;
bool content_length_computed_;
uint64 content_length_;
« no previous file with comments | « net/base/upload_data_stream.cc ('k') | net/base/upload_element.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698