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

Unified Diff: webkit/glue/glue_serialize.cc

Issue 11410019: ********** Chromium Blob hacking (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 10 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 | « webkit/fileapi/webfilewriter_base.cc ('k') | webkit/glue/resource_request_body.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/glue_serialize.cc
===================================================================
--- webkit/glue/glue_serialize.cc (revision 183651)
+++ webkit/glue/glue_serialize.cc (working copy)
@@ -69,12 +69,13 @@
// 11: Adds support for pageScaleFactor
// 12: Adds support for hasPasswordData in HTTP body
// 13: Adds support for URL (FileSystem URL)
+// 14: Use blob UUID strings in stead of URLs.
// Should be const, but unit tests may modify it.
//
// NOTE: If the version is -1, then the pickle contains only a URL string.
// See CreateHistoryStateForURL.
//
-int kVersion = 13;
+int kVersion = 14;
// A bunch of convenience functions to read/write to SerializeObjects.
// The serializers assume the input data is in the correct format and so does
@@ -259,13 +260,14 @@
WriteInteger64(element.fileStart, obj);
WriteInteger64(element.fileLength, obj);
WriteReal(element.modificationTime, obj);
- } else if (element.type == WebHTTPBody::Element::TypeURL) {
- WriteGURL(element.url, obj);
+ } else if (element.type == WebHTTPBody::Element::TypeFileSystemURL) {
+ WriteGURL(element.fileSystemURL, obj);
WriteInteger64(element.fileStart, obj);
WriteInteger64(element.fileLength, obj);
WriteReal(element.modificationTime, obj);
} else {
- WriteGURL(element.url, obj);
+ DCHECK(element.type == WebHTTPBody::Element::TypeBlob);
+ WriteString(element.blobUUID, obj);
}
}
WriteInteger64(http_body.identifier(), obj);
@@ -305,7 +307,7 @@
}
http_body.appendFileRange(file_path, file_start, file_length,
modification_time);
- } else if (type == WebHTTPBody::Element::TypeURL) {
+ } else if (type == WebHTTPBody::Element::TypeFileSystemURL) {
GURL url = ReadGURL(obj);
long long file_start = 0;
long long file_length = -1;
@@ -316,8 +318,13 @@
http_body.appendURLRange(url, file_start, file_length,
modification_time);
} else if (obj->version >= 10) {
- GURL blob_url = ReadGURL(obj);
- http_body.appendBlob(blob_url);
+ DCHECK(type == WebHTTPBody::Element::TypeBlob);
+ if (obj->version >= 14) {
+ WebString blob_uuid = ReadString(obj);
+ http_body.appendBlob(blob_uuid);
+ } else {
+ GURL obsolete_format = ReadGURL(obj);
+ }
}
}
if (obj->version >= 4)
« no previous file with comments | « webkit/fileapi/webfilewriter_base.cc ('k') | webkit/glue/resource_request_body.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698