| Index: webkit/glue/glue_serialize.cc
|
| ===================================================================
|
| --- webkit/glue/glue_serialize.cc (revision 57697)
|
| +++ webkit/glue/glue_serialize.cc (working copy)
|
| @@ -15,6 +15,7 @@
|
| #include "third_party/WebKit/WebKit/chromium/public/WebPoint.h"
|
| #include "third_party/WebKit/WebKit/chromium/public/WebSerializedScriptValue.h"
|
| #include "third_party/WebKit/WebKit/chromium/public/WebString.h"
|
| +#include "third_party/WebKit/WebKit/chromium/public/WebURL.h"
|
| #include "third_party/WebKit/WebKit/chromium/public/WebVector.h"
|
| #include "webkit/glue/webkit_glue.h"
|
|
|
| @@ -56,12 +57,13 @@
|
| // 7: Adds support for stateObject
|
| // 8: Adds support for file range and modification time
|
| // 9: Adds support for itemSequenceNumbers
|
| +// 10: Adds support for blob
|
| // 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 = 9;
|
| +int kVersion = 10;
|
|
|
| // A bunch of convenience functions to read/write to SerializeObjects.
|
| // The serializers assume the input data is in the correct format and so does
|
| @@ -234,11 +236,13 @@
|
| if (element.type == WebHTTPBody::Element::TypeData) {
|
| WriteData(element.data.data(), static_cast<int>(element.data.size()),
|
| obj);
|
| - } else {
|
| + } else if (element.type == WebHTTPBody::Element::TypeFile) {
|
| WriteString(element.filePath, obj);
|
| WriteInteger64(element.fileStart, obj);
|
| WriteInteger64(element.fileLength, obj);
|
| WriteReal(element.fileInfo.modificationTime, obj);
|
| + } else {
|
| + WriteGURL(element.blobURL, obj);
|
| }
|
| }
|
| WriteInteger64(http_body.identifier(), obj);
|
| @@ -265,7 +269,7 @@
|
| ReadData(obj, &data, &length);
|
| if (length >= 0)
|
| http_body.appendData(WebData(static_cast<const char*>(data), length));
|
| - } else {
|
| + } else if (type == WebHTTPBody::Element::TypeFile) {
|
| WebString file_path = ReadString(obj);
|
| long long file_start = 0;
|
| long long file_length = -1;
|
| @@ -276,6 +280,9 @@
|
| file_info.modificationTime = ReadReal(obj);
|
| }
|
| http_body.appendFileRange(file_path, file_start, file_length, file_info);
|
| + } else if (obj->version >= 10) {
|
| + GURL blob_url = ReadGURL(obj);
|
| + http_body.appendBlob(blob_url);
|
| }
|
| }
|
| if (obj->version >= 4)
|
|
|