| Index: net/base/upload_data.h
|
| diff --git a/net/base/upload_data.h b/net/base/upload_data.h
|
| index ab6186b78a9194a24d3a85785ecf1a1903c08d8b..41fdcd8ad9b44a3773e47cb3336fb2052713aa5f 100644
|
| --- a/net/base/upload_data.h
|
| +++ b/net/base/upload_data.h
|
| @@ -12,9 +12,7 @@
|
| #include "base/file_path.h"
|
| #include "base/gtest_prod_util.h"
|
| #include "base/memory/ref_counted.h"
|
| -#include "base/supports_user_data.h"
|
| #include "base/time.h"
|
| -#include "googleurl/src/gurl.h"
|
| #include "net/base/net_export.h"
|
|
|
| namespace net {
|
| @@ -40,13 +38,11 @@ class NET_EXPORT_PRIVATE ChunkCallback {
|
| // SupportsUserData to allow users to stash random data by
|
| // key and ensure its destruction when UploadData is finally deleted.
|
| class NET_EXPORT UploadData
|
| - : public base::RefCounted<UploadData>,
|
| - public base::SupportsUserData {
|
| + : public base::RefCounted<UploadData> {
|
| public:
|
| enum Type {
|
| TYPE_BYTES,
|
| TYPE_FILE,
|
| - TYPE_BLOB,
|
|
|
| // A block of bytes to be sent in chunked encoding immediately, without
|
| // waiting for rest of the data.
|
| @@ -73,7 +69,6 @@ class NET_EXPORT UploadData
|
| const base::Time& expected_file_modification_time() const {
|
| return expected_file_modification_time_;
|
| }
|
| - const GURL& blob_url() const { return blob_url_; }
|
|
|
| void SetToBytes(const char* bytes, int bytes_len) {
|
| type_ = TYPE_BYTES;
|
| @@ -97,13 +92,6 @@ class NET_EXPORT UploadData
|
| expected_file_modification_time_ = expected_modification_time;
|
| }
|
|
|
| - // TODO(jianli): UploadData should not contain any blob reference. We need
|
| - // to define another structure to represent WebKit::WebHTTPBody.
|
| - void SetToBlobUrl(const GURL& blob_url) {
|
| - type_ = TYPE_BLOB;
|
| - blob_url_ = blob_url;
|
| - }
|
| -
|
| // 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.
|
| @@ -157,7 +145,6 @@ class NET_EXPORT UploadData
|
| uint64 file_range_offset_;
|
| uint64 file_range_length_;
|
| base::Time expected_file_modification_time_;
|
| - GURL blob_url_;
|
| bool is_last_chunk_;
|
| bool override_content_length_;
|
| bool content_length_computed_;
|
| @@ -187,8 +174,6 @@ class NET_EXPORT UploadData
|
| uint64 offset, uint64 length,
|
| const base::Time& expected_modification_time);
|
|
|
| - void AppendBlob(const GURL& blob_url);
|
| -
|
| // Adds the given chunk of bytes to be sent immediately with chunked transfer
|
| // encoding.
|
| void AppendChunk(const char* bytes, int bytes_len, bool is_last_chunk);
|
| @@ -259,31 +244,6 @@ class NET_EXPORT UploadData
|
| DISALLOW_COPY_AND_ASSIGN(UploadData);
|
| };
|
|
|
| -#if defined(UNIT_TEST)
|
| -inline bool operator==(const UploadData::Element& a,
|
| - const UploadData::Element& b) {
|
| - if (a.type() != b.type())
|
| - return false;
|
| - if (a.type() == UploadData::TYPE_BYTES)
|
| - return a.bytes() == b.bytes();
|
| - if (a.type() == UploadData::TYPE_FILE) {
|
| - return a.file_path() == b.file_path() &&
|
| - a.file_range_offset() == b.file_range_offset() &&
|
| - a.file_range_length() == b.file_range_length() &&
|
| - a.expected_file_modification_time() ==
|
| - b.expected_file_modification_time();
|
| - }
|
| - if (a.type() == UploadData::TYPE_BLOB)
|
| - return a.blob_url() == b.blob_url();
|
| - return false;
|
| -}
|
| -
|
| -inline bool operator!=(const UploadData::Element& a,
|
| - const UploadData::Element& b) {
|
| - return !(a == b);
|
| -}
|
| -#endif // defined(UNIT_TEST)
|
| -
|
| } // namespace net
|
|
|
| #endif // NET_BASE_UPLOAD_DATA_H_
|
|
|