summaryrefslogtreecommitdiffstats
path: root/content/browser/fileapi
diff options
context:
space:
mode:
authortommycli@chromium.org <tommycli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-24 23:06:56 +0000
committertommycli@chromium.org <tommycli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-24 23:06:56 +0000
commit4c3c2aa023393009dddd42ad0dd989feb4df6e35 (patch)
tree3511737765b936882112d0937d7eeb2df827816b /content/browser/fileapi
parent044e86998a829be0e0bae20cffd8e6834ab10a1e (diff)
downloadchromium_src-4c3c2aa023393009dddd42ad0dd989feb4df6e35.zip
chromium_src-4c3c2aa023393009dddd42ad0dd989feb4df6e35.tar.gz
chromium_src-4c3c2aa023393009dddd42ad0dd989feb4df6e35.tar.bz2
MTP Streaming: Linux streaming infrastructure changes.
BUG=110119 Review URL: https://codereview.chromium.org/107833003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246996 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/fileapi')
-rw-r--r--content/browser/fileapi/fileapi_message_filter.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/content/browser/fileapi/fileapi_message_filter.cc b/content/browser/fileapi/fileapi_message_filter.cc
index 6d015b8..11b4794 100644
--- a/content/browser/fileapi/fileapi_message_filter.cc
+++ b/content/browser/fileapi/fileapi_message_filter.cc
@@ -778,6 +778,16 @@ void FileAPIMessageFilter::DidCreateSnapshot(
return;
}
+ // TODO(tommycli): This allows streaming blobs to use a 'fake' snapshot file
+ // with an empty path. We want to eventually have explicit plumbing for
+ // the creation of Blobs without snapshot files, probably called something
+ // like GetMetadataForStreaming.
+ if (platform_path.empty()) {
+ Send(new FileSystemMsg_DidCreateSnapshotFile(request_id, info,
+ base::FilePath()));
+ return;
+ }
+
scoped_refptr<webkit_blob::ShareableFileReference> file_ref =
webkit_blob::ShareableFileReference::Get(platform_path);
if (!security_policy_->CanReadFile(process_id_, platform_path)) {
@@ -809,7 +819,7 @@ void FileAPIMessageFilter::DidCreateSnapshot(
// Return the file info and platform_path.
Send(new FileSystemMsg_DidCreateSnapshotFile(
- request_id, info, platform_path));
+ request_id, info, platform_path));
}
bool FileAPIMessageFilter::ValidateFileSystemURL(