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

Unified Diff: net/base/upload_data.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: net/base/upload_data.cc
diff --git a/net/base/upload_data.cc b/net/base/upload_data.cc
index b13e9091e8cb0051caeb26a516ba1cd806f600d0..480cfdfd03b10e6732143957b63f847419608dce 100644
--- a/net/base/upload_data.cc
+++ b/net/base/upload_data.cc
@@ -70,6 +70,8 @@ uint64 UploadData::Element::GetContentLength() {
// The blob reference will be resolved later.
return 0;
+ // Assume we have no TYPE_FILE_FILESYSTEM items at this stage.
+
DCHECK_EQ(TYPE_FILE, type_);
DCHECK(!file_stream_);
@@ -230,6 +232,16 @@ void UploadData::AppendFileRange(const FilePath& file_path,
expected_modification_time);
}
+void UploadData::AppendFileSystemFileRange(
+ const GURL& url,
+ uint64 offset, uint64 length,
+ const base::Time& expected_modification_time) {
+ DCHECK(!is_chunked_);
+ elements_.push_back(Element());
+ elements_.back().SetToFileSystemURLRange(url, offset, length,
+ expected_modification_time);
+}
+
void UploadData::AppendBlob(const GURL& blob_url) {
DCHECK(!is_chunked_);
elements_.push_back(Element());
« net/base/upload_data.h ('K') | « net/base/upload_data.h ('k') | webkit/blob/blob_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698