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

Unified Diff: android_webview/native/state_serializer.h

Issue 1687853002: Make AW state_serializer handle restoring also legacy format (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix signed/unsigned int mismatch Created 4 years, 10 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.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | android_webview/native/state_serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698