diff options
author | pvalenzuela@chromium.org <pvalenzuela@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-28 07:51:44 +0000 |
---|---|---|
committer | pvalenzuela@chromium.org <pvalenzuela@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-28 07:51:44 +0000 |
commit | f49737b38742a270515974c6e20780eaf4f06fa2 (patch) | |
tree | c3b8ae39faa1ebe84bc3a99c3ab21c00960a4c9f /android_webview/native/state_serializer.cc | |
parent | c65f676922a747565ccba68a69f6d61f8fe009ca (diff) | |
download | chromium_src-f49737b38742a270515974c6e20780eaf4f06fa2.zip chromium_src-f49737b38742a270515974c6e20780eaf4f06fa2.tar.gz chromium_src-f49737b38742a270515974c6e20780eaf4f06fa2.tar.bz2 |
Add HTTP status code to navigation data structures
This is a reboot of https://codereview.chromium.org/11054025/
BUG=153936,260276
Review URL: https://chromiumcodereview.appspot.com/22837005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219954 0039d316-1c4b-4281-b951-d872f2087c98
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; } |