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

Unified Diff: content/common/resource_messages.cc

Issue 23223003: Chromium Blob hacking (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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/page_state_serialization_unittest.cc ('k') | content/content_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/resource_messages.cc
diff --git a/content/common/resource_messages.cc b/content/common/resource_messages.cc
index 0bfaa07ace3932f2ab304e800bd87d8374492f6a..72127b9ca38dfd625a8e392a21dbd1256df90bc7 100644
--- a/content/common/resource_messages.cc
+++ b/content/common/resource_messages.cc
@@ -50,7 +50,7 @@ void ParamTraits<webkit_common::DataElement>::Write(
break;
}
case webkit_common::DataElement::TYPE_FILE_FILESYSTEM: {
- WriteParam(m, p.url());
+ WriteParam(m, p.filesystem_url());
WriteParam(m, p.offset());
WriteParam(m, p.length());
WriteParam(m, p.expected_modification_time());
@@ -58,7 +58,8 @@ void ParamTraits<webkit_common::DataElement>::Write(
}
default: {
DCHECK(p.type() == webkit_common::DataElement::TYPE_BLOB);
- WriteParam(m, p.url());
+ WriteParam(m, p.blob_uuid());
+ WriteParam(m, p.blob_url());
WriteParam(m, p.offset());
WriteParam(m, p.length());
break;
@@ -114,15 +115,21 @@ bool ParamTraits<webkit_common::DataElement>::Read(
}
default: {
DCHECK(type == webkit_common::DataElement::TYPE_BLOB);
+ std::string blob_uuid;
GURL blob_url;
uint64 offset, length;
+ if (!ReadParam(m, iter, &blob_uuid))
+ return false;
if (!ReadParam(m, iter, &blob_url))
return false;
if (!ReadParam(m, iter, &offset))
return false;
if (!ReadParam(m, iter, &length))
return false;
- r->SetToBlobUrlRange(blob_url, offset, length);
+ if (!blob_uuid.empty())
+ r->SetToBlobRange(blob_uuid, offset, length);
+ else
+ r->SetToBlobUrlRange(blob_url, offset, length);
break;
}
}
« no previous file with comments | « content/common/page_state_serialization_unittest.cc ('k') | content/content_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698