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

Unified Diff: android_webview/native/state_serializer.cc

Issue 22837005: Add HTTP status code to navigation data structures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix bug Created 7 years, 4 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 | android_webview/native/state_serializer_unittests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/native/state_serializer.cc
diff --git a/android_webview/native/state_serializer.cc b/android_webview/native/state_serializer.cc
index 6aa3ae11370c4aa465c2bd43242b72136b656752..6791108e92e6e168acae5a16b0bd9cecb05ebbed 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;
}
« no previous file with comments | « no previous file | android_webview/native/state_serializer_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698