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

Unified Diff: webkit/blob/blob_storage_controller.cc

Issue 10828252: Support FileSystem URL in File object (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment fix 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
« no previous file with comments | « webkit/blob/blob_storage_controller.h ('k') | webkit/blob/blob_url_request_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/blob/blob_storage_controller.cc
diff --git a/webkit/blob/blob_storage_controller.cc b/webkit/blob/blob_storage_controller.cc
index 1092248dcb8fc1c25ea696f957fe12b4452b2aa8..503c47ea995717c26534dcf6f0bea41d40414c97 100644
--- a/webkit/blob/blob_storage_controller.cc
+++ b/webkit/blob/blob_storage_controller.cc
@@ -64,6 +64,8 @@ void BlobStorageController::AppendBlobDataItem(
// 1) The Data item is denoted by the raw data and the range.
// 2) The File item is denoted by the file path, the range and the expected
// modification time.
+ // 3) The FileSystem File item is denoted by the FileSystem URL, the range
+ // and the expected modification time.
// All the Blob items in the passing blob data are resolved and expanded into
// a set of Data and File items.
@@ -80,6 +82,13 @@ void BlobStorageController::AppendBlobDataItem(
item.length(),
item.expected_modification_time());
break;
+ case BlobData::Item::TYPE_FILE_FILESYSTEM:
+ AppendFileSystemFileItem(target_blob_data,
+ item.url(),
+ item.offset(),
+ item.length(),
+ item.expected_modification_time());
+ break;
case BlobData::Item::TYPE_BLOB: {
BlobData* src_blob_data = GetBlobDataFromUrl(item.url());
DCHECK(src_blob_data);
@@ -218,6 +227,14 @@ void BlobStorageController::AppendFileItem(
target_blob_data->AttachShareableFileReference(shareable_file);
}
+void BlobStorageController::AppendFileSystemFileItem(
+ BlobData* target_blob_data,
+ const GURL& url, uint64 offset, uint64 length,
+ const base::Time& expected_modification_time) {
+ target_blob_data->AppendFileSystemFile(url, offset, length,
+ expected_modification_time);
+}
+
void BlobStorageController::IncrementBlobDataUsage(BlobData* blob_data) {
blob_data_usage_count_[blob_data] += 1;
}
« no previous file with comments | « webkit/blob/blob_storage_controller.h ('k') | webkit/blob/blob_url_request_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698