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) |