| Index: webkit/glue/glue_serialize.cc
|
| diff --git a/webkit/glue/glue_serialize.cc b/webkit/glue/glue_serialize.cc
|
| index 048bbdd63be70aa7d95b82cbfb13fbe0e2aa9a4c..c712d777af4233f562d12356b7fff6633ecd36e8 100644
|
| --- a/webkit/glue/glue_serialize.cc
|
| +++ b/webkit/glue/glue_serialize.cc
|
| @@ -68,12 +68,13 @@ struct SerializeObject {
|
| // 10: Adds support for blob
|
| // 11: Adds support for pageScaleFactor
|
| // 12: Adds support for hasPasswordData in HTTP body
|
| +// 13: Adds support for URL (FileSystem URL)
|
| // 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 = 12;
|
| +int kVersion = 13;
|
|
|
| // A bunch of convenience functions to read/write to SerializeObjects.
|
| // The serializers assume the input data is in the correct format and so does
|
| @@ -258,8 +259,13 @@ void WriteFormData(const WebHTTPBody& http_body, SerializeObject* obj) {
|
| WriteInteger64(element.fileStart, obj);
|
| WriteInteger64(element.fileLength, obj);
|
| WriteReal(element.modificationTime, obj);
|
| + } else if (element.type == WebHTTPBody::Element::TypeURL) {
|
| + WriteGURL(element.url, obj);
|
| + WriteInteger64(element.fileStart, obj);
|
| + WriteInteger64(element.fileLength, obj);
|
| + WriteReal(element.modificationTime, obj);
|
| } else {
|
| - WriteGURL(element.blobURL, obj);
|
| + WriteGURL(element.url, obj);
|
| }
|
| }
|
| WriteInteger64(http_body.identifier(), obj);
|
| @@ -299,6 +305,16 @@ WebHTTPBody ReadFormData(const SerializeObject* obj) {
|
| }
|
| http_body.appendFileRange(file_path, file_start, file_length,
|
| modification_time);
|
| + } else if (type == WebHTTPBody::Element::TypeURL) {
|
| + GURL url = ReadGURL(obj);
|
| + long long file_start = 0;
|
| + long long file_length = -1;
|
| + double modification_time = 0.0;
|
| + file_start = ReadInteger64(obj);
|
| + file_length = ReadInteger64(obj);
|
| + modification_time = ReadReal(obj);
|
| + 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);
|
|
|