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

Unified Diff: content/common/fileapi/webblobregistry_impl.cc

Issue 10828252: Support FileSystem URL in File object (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: content/common/fileapi/webblobregistry_impl.cc
diff --git a/content/common/fileapi/webblobregistry_impl.cc b/content/common/fileapi/webblobregistry_impl.cc
index 9a80fb99764613d839425756681c770f8195b7c7..c77f37641bb33c6e63da2269cbe61a1fce3375b0 100644
--- a/content/common/fileapi/webblobregistry_impl.cc
+++ b/content/common/fileapi/webblobregistry_impl.cc
@@ -78,12 +78,24 @@ void WebBlobRegistryImpl::registerBlobURL(
case WebBlobData::Item::TypeBlob:
if (data_item.length) {
item.SetToBlob(
- data_item.blobURL,
+ data_item.url,
static_cast<uint64>(data_item.offset),
static_cast<uint64>(data_item.length));
child_thread_->Send(new BlobHostMsg_AppendBlobDataItem(url, item));
}
break;
+ case WebBlobData::Item::TypeURL:
+ if (data_item.length) {
+ // We only support filesystem URL as of now.
+ DCHECK(GURL(data_item.url).SchemeIsFileSystem());
+ item.SetToFileSystemFile(
+ data_item.url,
+ static_cast<uint64>(data_item.offset),
+ static_cast<uint64>(data_item.length),
+ base::Time::FromDoubleT(data_item.expectedModificationTime));
+ child_thread_->Send(new BlobHostMsg_AppendBlobDataItem(url, item));
+ }
+ break;
default:
NOTREACHED();
}

Powered by Google App Engine
This is Rietveld 408576698