diff options
Diffstat (limited to 'android_webview/native/state_serializer.cc')
-rw-r--r-- | android_webview/native/state_serializer.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/android_webview/native/state_serializer.cc b/android_webview/native/state_serializer.cc index 6aa3ae1..6791108 100644 --- a/android_webview/native/state_serializer.cc +++ b/android_webview/native/state_serializer.cc @@ -35,7 +35,7 @@ namespace { // Sanity check value that we are restoring from a valid pickle. // This can potentially used as an actual serialization version number in the // future if we ever decide to support restoring from older versions. -const uint32 AW_STATE_VERSION = 20121126; +const uint32 AW_STATE_VERSION = 20130814; } // namespace @@ -186,6 +186,9 @@ bool WriteNavigationEntryToPickle(const content::NavigationEntry& entry, if (!pickle->WriteInt64(entry.GetTimestamp().ToInternalValue())) return false; + if (!pickle->WriteInt(entry.GetHttpStatusCode())) + return false; + // Please update AW_STATE_VERSION if serialization format is changed. return true; @@ -272,6 +275,13 @@ bool RestoreNavigationEntryFromPickle(PickleIterator* iterator, entry->SetTimestamp(base::Time::FromInternalValue(timestamp)); } + { + int http_status_code; + if (!iterator->ReadInt(&http_status_code)) + return false; + entry->SetHttpStatusCode(http_status_code); + } + return true; } |