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

Unified Diff: content/common/page_state_serialization.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.h ('k') | content/common/page_state_serialization_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/page_state_serialization.cc
diff --git a/content/common/page_state_serialization.cc b/content/common/page_state_serialization.cc
index 4ba73458676d82396a2efa815e0b528030151478..530726bf5663492895a6431677ed8beffe659d9f 100644
--- a/content/common/page_state_serialization.cc
+++ b/content/common/page_state_serialization.cc
@@ -51,17 +51,18 @@ void AppendURLRangeToHttpBody(ExplodedHttpBody* http_body,
double file_modification_time) {
ExplodedHttpBodyElement element;
element.type = WebKit::WebHTTPBody::Element::TypeURL;
- element.url = url;
+ element.filesystem_url = url;
element.file_start = file_start;
element.file_length = file_length;
element.file_modification_time = file_modification_time;
http_body->elements.push_back(element);
}
-void AppendBlobToHttpBody(ExplodedHttpBody* http_body, const GURL& url) {
+void DeprecatedAppendBlobToHttpBody(ExplodedHttpBody* http_body,
+ const GURL& url) {
ExplodedHttpBodyElement element;
element.type = WebKit::WebHTTPBody::Element::TypeBlob;
- element.url = url;
+ element.deprecated_blob_url = url;
http_body->elements.push_back(element);
}
@@ -396,12 +397,13 @@ void WriteHttpBody(const ExplodedHttpBody& http_body, SerializeObject* obj) {
WriteInteger64(element.file_length, obj);
WriteReal(element.file_modification_time, obj);
} else if (element.type == WebKit::WebHTTPBody::Element::TypeURL) {
- WriteGURL(element.url, obj);
+ WriteGURL(element.filesystem_url, obj);
WriteInteger64(element.file_start, obj);
WriteInteger64(element.file_length, obj);
WriteReal(element.file_modification_time, obj);
} else {
- WriteGURL(element.url, obj);
+ DCHECK(element.type == WebKit::WebHTTPBody::Element::TypeBlob);
+ WriteGURL(element.deprecated_blob_url, obj);
}
}
WriteInteger64(http_body.identifier, obj);
@@ -442,7 +444,7 @@ void ReadHttpBody(SerializeObject* obj, ExplodedHttpBody* http_body) {
file_modification_time);
} else if (type == WebKit::WebHTTPBody::Element::TypeBlob) {
GURL blob_url = ReadGURL(obj);
- AppendBlobToHttpBody(http_body, blob_url);
+ DeprecatedAppendBlobToHttpBody(http_body, blob_url);
}
}
http_body->identifier = ReadInteger64(obj);
« no previous file with comments | « content/common/page_state_serialization.h ('k') | content/common/page_state_serialization_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698