Index: android_webview/native/state_serializer.h |
diff --git a/android_webview/native/state_serializer.h b/android_webview/native/state_serializer.h |
index b220ccfb5f0119c7aa184f9db589f7cdbc0b8fa9..644d5ccaa459e945fb036ba3377c6b37586987d2 100644 |
--- a/android_webview/native/state_serializer.h |
+++ b/android_webview/native/state_serializer.h |
@@ -5,6 +5,8 @@ |
#ifndef ANDROID_WEBVIEW_NATIVE_STATE_SERIALIZER_H_ |
#define ANDROID_WEBVIEW_NATIVE_STATE_SERIALIZER_H_ |
+#include <cstdint> |
+ |
#include "base/compiler_specific.h" |
namespace base { |
@@ -37,16 +39,30 @@ bool RestoreFromPickle(base::PickleIterator* iterator, |
namespace internal { |
-// Functions below are individual helper functiosn called by functions above. |
+const uint32_t AW_STATE_VERSION_INITIAL = 20130814; |
+const uint32_t AW_STATE_VERSION_DATA_URL = 20151204; |
+ |
+// Functions below are individual helper functions called by functions above. |
// They are broken up for unit testing, and should not be called out side of |
// tests. |
bool WriteHeaderToPickle(base::Pickle* pickle) WARN_UNUSED_RESULT; |
-bool RestoreHeaderFromPickle(base::PickleIterator* iterator) WARN_UNUSED_RESULT; |
+bool WriteHeaderToPickle(uint32_t state_version, |
+ base::Pickle* pickle) WARN_UNUSED_RESULT; |
+uint32_t RestoreHeaderFromPickle(base::PickleIterator* iterator) |
+ WARN_UNUSED_RESULT; |
+bool IsSupportedVersion(uint32_t state_version) WARN_UNUSED_RESULT; |
bool WriteNavigationEntryToPickle(const content::NavigationEntry& entry, |
base::Pickle* pickle) WARN_UNUSED_RESULT; |
-bool RestoreNavigationEntryFromPickle( |
- base::PickleIterator* iterator, |
- content::NavigationEntry* entry) WARN_UNUSED_RESULT; |
+bool WriteNavigationEntryToPickle(uint32_t state_version, |
+ const content::NavigationEntry& entry, |
+ base::Pickle* pickle) WARN_UNUSED_RESULT; |
+bool RestoreNavigationEntryFromPickle(base::PickleIterator* iterator, |
+ content::NavigationEntry* entry) |
+ WARN_UNUSED_RESULT; |
+bool RestoreNavigationEntryFromPickle(uint32_t state_version, |
+ base::PickleIterator* iterator, |
+ content::NavigationEntry* entry) |
+ WARN_UNUSED_RESULT; |
} // namespace interanl |