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

Unified Diff: webkit/glue/glue_serialize.cc

Issue 2811007: Add support for serializing WebHistoryItem::itemSequenceNumber.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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 | « no previous file | no next file » | 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 49463)
+++ webkit/glue/glue_serialize.cc (working copy)
@@ -55,12 +55,17 @@
// 6: Adds support for documentSequenceNumbers
// 7: Adds support for stateObject
// 8: Adds support for file range and modification time
+// 9: Adds support for itemSequenceNumbers
// 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.
//
+#if defined(WEBKIT_BUG_40451_IS_FIXED)
+int kVersion = 9;
+#else
int kVersion = 8;
+#endif
// A bunch of convenience functions to read/write to SerializeObjects.
// The serializers assume the input data is in the correct format and so does
@@ -195,7 +200,8 @@
const void* data;
if (!ReadBytes(obj, &data, bytes))
return WebString();
- return WebString(static_cast<const WebUChar*>(data), bytes / sizeof(WebUChar));
+ return WebString(static_cast<const WebUChar*>(data),
+ bytes / sizeof(WebUChar));
}
// Writes a Vector of Strings into a SerializeObject for serialization.
@@ -305,6 +311,10 @@
WriteStringVector(item.documentState(), obj);
+#if defined(WEBKIT_BUG_40451_IS_FIXED)
+ if (kVersion >= 9)
+ WriteInteger64(item.itemSequenceNumber(), obj);
+#endif
if (kVersion >= 6)
WriteInteger64(item.documentSequenceNumber(), obj);
if (kVersion >= 7) {
@@ -364,6 +374,10 @@
item.setDocumentState(ReadStringVector(obj));
+#if defined(WEBKIT_BUG_40451_IS_FIXED)
+ if (obj->version >= 9)
+ item.setItemSequenceNumber(ReadInteger64(obj));
+#endif
if (obj->version >= 6)
item.setDocumentSequenceNumber(ReadInteger64(obj));
if (obj->version >= 7) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698