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

Unified Diff: content/common/resource_messages.cc

Issue 1288373002: [BlobAsync] Patch 2: Common Constants (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@async1
Patch Set: Created 5 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: content/common/resource_messages.cc
diff --git a/content/common/resource_messages.cc b/content/common/resource_messages.cc
index 9cadbfffd7f2cec29e134f80a85c27d49d851b96..ba9220703770ff2f2cbdb5d6d20301e9dbbeb271 100644
--- a/content/common/resource_messages.cc
+++ b/content/common/resource_messages.cc
@@ -42,6 +42,10 @@ void ParamTraits<storage::DataElement>::Write(Message* m, const param_type& p) {
m->WriteData(p.bytes(), static_cast<int>(p.length()));
break;
}
+ case storage::DataElement::TYPE_BYTES_DESCRIPTION: {
+ WriteParam(m, p.length());
+ break;
+ }
case storage::DataElement::TYPE_FILE: {
WriteParam(m, p.path());
WriteParam(m, p.offset());
@@ -88,6 +92,13 @@ bool ParamTraits<storage::DataElement>::Read(const Message* m,
r->SetToBytes(data, len);
break;
}
+ case storage::DataElement::TYPE_BYTES_DESCRIPTION: {
+ uint64 length;
+ if (!ReadParam(m, iter, &length))
+ return false;
+ r->SetToBytesDescription(length);
+ break;
+ }
case storage::DataElement::TYPE_FILE: {
base::FilePath file_path;
uint64 offset, length;

Powered by Google App Engine
This is Rietveld 408576698