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

Unified Diff: content/common/resource_messages.cc

Issue 46303005: Fix chrome upload with content uri (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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/resource_messages.cc
diff --git a/content/common/resource_messages.cc b/content/common/resource_messages.cc
index 87f9e9ffbc28ac4e906d4f367e6a667c08aab3f9..854441b6ec29199a9e26f127c4108884ca9f9952 100644
--- a/content/common/resource_messages.cc
+++ b/content/common/resource_messages.cc
@@ -56,6 +56,15 @@ void ParamTraits<webkit_common::DataElement>::Write(
WriteParam(m, p.expected_modification_time());
break;
}
+#if defined(OS_ANDROID)
+ case webkit_common::DataElement::TYPE_CONTENT_URL: {
+ WriteParam(m, p.content_url());
+ WriteParam(m, p.offset());
+ WriteParam(m, p.length());
+ WriteParam(m, p.expected_modification_time());
+ break;
+ }
+#endif
default: {
DCHECK(p.type() == webkit_common::DataElement::TYPE_BLOB);
WriteParam(m, p.blob_uuid());
@@ -112,6 +121,24 @@ bool ParamTraits<webkit_common::DataElement>::Read(
expected_modification_time);
break;
}
+#if defined(OS_ANDROID)
+ case webkit_common::DataElement::TYPE_CONTENT_URL: {
+ GURL content_url;
+ uint64 offset, length;
+ base::Time expected_modification_time;
+ if (!ReadParam(m, iter, &content_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->SetToContentUrlRange(content_url, offset, length,
+ expected_modification_time);
kinuko 2013/10/29 02:52:31 nit: indent is off
qinmin 2013/10/29 19:14:21 Done.
+ break;
+ }
+#endif
default: {
DCHECK(type == webkit_common::DataElement::TYPE_BLOB);
std::string blob_uuid;

Powered by Google App Engine
This is Rietveld 408576698