| Index: webkit/common/data_element.h
|
| diff --git a/webkit/common/data_element.h b/webkit/common/data_element.h
|
| index 4ec09cec4e1ae6a1b61c97b657b2dd1949be07c6..9c22320a2f495972f5842cd6f263279bc81fc873 100644
|
| --- a/webkit/common/data_element.h
|
| +++ b/webkit/common/data_element.h
|
| @@ -27,6 +27,9 @@ class WEBKIT_COMMON_EXPORT DataElement {
|
| TYPE_FILE,
|
| TYPE_BLOB,
|
| TYPE_FILE_FILESYSTEM,
|
| +#if defined(OS_ANDROID)
|
| + TYPE_CONTENT_URL,
|
| +#endif
|
| };
|
|
|
| DataElement();
|
| @@ -36,6 +39,9 @@ class WEBKIT_COMMON_EXPORT DataElement {
|
| const char* bytes() const { return bytes_ ? bytes_ : &buf_[0]; }
|
| const base::FilePath& path() const { return path_; }
|
| const GURL& filesystem_url() const { return filesystem_url_; }
|
| +#if defined(OS_ANDROID)
|
| + const GURL& content_url() const { return content_url_; }
|
| +#endif
|
| const std::string& blob_uuid() const { return blob_uuid_; }
|
| uint64 offset() const { return offset_; }
|
| uint64 length() const { return length_; }
|
| @@ -82,12 +88,22 @@ class WEBKIT_COMMON_EXPORT DataElement {
|
| uint64 offset, uint64 length,
|
| const base::Time& expected_modification_time);
|
|
|
| +#if defined(OS_ANDROID)
|
| + // Sets TYPE_CONTENT_URL with range.
|
| + void SetToContentUrlRange(const GURL& content_url,
|
| + uint64 offset, uint64 length,
|
| + const base::Time& expected_modification_time);
|
| +#endif
|
| +
|
| private:
|
| Type type_;
|
| std::vector<char> buf_; // For TYPE_BYTES.
|
| const char* bytes_; // For TYPE_BYTES.
|
| base::FilePath path_; // For TYPE_FILE.
|
| GURL filesystem_url_; // For TYPE_FILE_FILESYSTEM.
|
| +#if defined(OS_ANDROID)
|
| + GURL content_url_; // For TYPE_CONTENT_URL.
|
| +#endif
|
| std::string blob_uuid_;
|
| uint64 offset_;
|
| uint64 length_;
|
| @@ -110,6 +126,10 @@ inline bool operator==(const DataElement& a, const DataElement& b) {
|
| return a.blob_uuid() == b.blob_uuid();
|
| case DataElement::TYPE_FILE_FILESYSTEM:
|
| return a.filesystem_url() == b.filesystem_url();
|
| +#if defined(OS_ANDROID)
|
| + case DataElement::TYPE_CONTENT_URL:
|
| + return a.content_url() == b.content_url();
|
| +#endif
|
| case DataElement::TYPE_UNKNOWN:
|
| NOTREACHED();
|
| return false;
|
|
|