| Index: webkit/blob/blob_data.cc
|
| diff --git a/webkit/blob/blob_data.cc b/webkit/blob/blob_data.cc
|
| index 33ee36b9faacb2f016e2fa9f6681bd28223ef09f..c6227caa8ff368efa1710a9086255b2318aac15d 100644
|
| --- a/webkit/blob/blob_data.cc
|
| +++ b/webkit/blob/blob_data.cc
|
| @@ -71,11 +71,22 @@ BlobData::BlobData(const WebBlobData& data) {
|
| case WebBlobData::Item::TypeBlob:
|
| if (item.length) {
|
| AppendBlob(
|
| - item.blobURL,
|
| + item.url,
|
| static_cast<uint64>(item.offset),
|
| static_cast<uint64>(item.length));
|
| }
|
| break;
|
| + case WebBlobData::Item::TypeURL:
|
| + if (item.length) {
|
| + // We only support filesystem URL as of now.
|
| + DCHECK(GURL(item.url).SchemeIsFileSystem());
|
| + AppendFileSystemFile(
|
| + item.url,
|
| + static_cast<uint64>(item.offset),
|
| + static_cast<uint64>(item.length),
|
| + base::Time::FromDoubleT(item.expectedModificationTime));
|
| + }
|
| + break;
|
| default:
|
| NOTREACHED();
|
| }
|
| @@ -107,6 +118,16 @@ void BlobData::AppendBlob(const GURL& blob_url, uint64 offset, uint64 length) {
|
| items_.back().SetToBlob(blob_url, offset, length);
|
| }
|
|
|
| +void BlobData::AppendFileSystemFile(
|
| + const GURL& url, uint64 offset,
|
| + uint64 length,
|
| + const base::Time& expected_modification_time) {
|
| + DCHECK(length > 0);
|
| + items_.push_back(Item());
|
| + items_.back().SetToFileSystemFile(url, offset, length,
|
| + expected_modification_time);
|
| +}
|
| +
|
| int64 BlobData::GetMemoryUsage() const {
|
| int64 memory = 0;
|
| for (std::vector<Item>::const_iterator iter = items_.begin();
|
|
|