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

Unified Diff: content/public/common/common_param_traits.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 | « content/common/fileapi/webblobregistry_impl.cc ('k') | webkit/base/data_element.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/common/common_param_traits.cc
diff --git a/content/public/common/common_param_traits.cc b/content/public/common/common_param_traits.cc
index 728d837dc433222b34ebfd65d49b88dd334ab3e6..f8a030d19c15c4c6ab737cfe615333f848d396c5 100644
--- a/content/public/common/common_param_traits.cc
+++ b/content/public/common/common_param_traits.cc
@@ -244,7 +244,15 @@ void ParamTraits<webkit_base::DataElement>::Write(
WriteParam(m, p.expected_modification_time());
break;
}
+ case webkit_base::DataElement::TYPE_FILE_FILESYSTEM: {
+ WriteParam(m, p.url());
+ WriteParam(m, p.offset());
+ WriteParam(m, p.length());
+ WriteParam(m, p.expected_modification_time());
+ break;
+ }
default: {
+ DCHECK(p.type() == webkit_base::DataElement::TYPE_BLOB);
WriteParam(m, p.url());
break;
}
@@ -281,6 +289,22 @@ bool ParamTraits<webkit_base::DataElement>::Read(
expected_modification_time);
break;
}
+ case webkit_base::DataElement::TYPE_FILE_FILESYSTEM: {
+ GURL file_system_url;
+ uint64 offset, length;
+ base::Time expected_modification_time;
+ if (!ReadParam(m, iter, &file_system_url))
+ return false;
+ if (!ReadParam(m, iter, &offset))
+ return false;
+ if (!ReadParam(m, iter, &length))
+ return false;
+ if (!ReadParam(m, iter, &expected_modification_time))
+ return false;
+ r->SetToFileSystemUrlRange(file_system_url, offset, length,
+ expected_modification_time);
+ break;
+ }
default: {
DCHECK(type == webkit_base::DataElement::TYPE_BLOB);
GURL blob_url;
« no previous file with comments | « content/common/fileapi/webblobregistry_impl.cc ('k') | webkit/base/data_element.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698