| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 // | 4 // |
| 5 #ifndef ANDROID_WEBVIEW_NATIVE_STATE_SERIALIZER_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_STATE_SERIALIZER_H_ |
| 6 #define ANDROID_WEBVIEW_NATIVE_STATE_SERIALIZER_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_STATE_SERIALIZER_H_ |
| 7 | 7 |
| 8 #include <cstdint> | 8 #include <cstdint> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 | 11 |
| 12 namespace base { | 12 namespace base { |
| 13 | 13 |
| 14 class Pickle; | 14 class Pickle; |
| 15 class PickleIterator; | 15 class PickleIterator; |
| 16 | 16 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 29 // success. | 29 // success. |
| 30 | 30 |
| 31 // Note that |pickle| may be changed even if function returns false. | 31 // Note that |pickle| may be changed even if function returns false. |
| 32 bool WriteToPickle(const content::WebContents& web_contents, | 32 bool WriteToPickle(const content::WebContents& web_contents, |
| 33 base::Pickle* pickle) WARN_UNUSED_RESULT; | 33 base::Pickle* pickle) WARN_UNUSED_RESULT; |
| 34 | 34 |
| 35 // |web_contents| will not be modified if function returns false. | 35 // |web_contents| will not be modified if function returns false. |
| 36 bool RestoreFromPickle(base::PickleIterator* iterator, | 36 bool RestoreFromPickle(base::PickleIterator* iterator, |
| 37 content::WebContents* web_contents) WARN_UNUSED_RESULT; | 37 content::WebContents* web_contents) WARN_UNUSED_RESULT; |
| 38 | 38 |
| 39 | |
| 40 namespace internal { | 39 namespace internal { |
| 41 | 40 |
| 42 const uint32_t AW_STATE_VERSION_INITIAL = 20130814; | 41 const uint32_t AW_STATE_VERSION_INITIAL = 20130814; |
| 43 const uint32_t AW_STATE_VERSION_DATA_URL = 20151204; | 42 const uint32_t AW_STATE_VERSION_DATA_URL = 20151204; |
| 44 | 43 |
| 45 // Functions below are individual helper functions called by functions above. | 44 // Functions below are individual helper functions called by functions above. |
| 46 // They are broken up for unit testing, and should not be called out side of | 45 // They are broken up for unit testing, and should not be called out side of |
| 47 // tests. | 46 // tests. |
| 48 bool WriteHeaderToPickle(base::Pickle* pickle) WARN_UNUSED_RESULT; | 47 bool WriteHeaderToPickle(base::Pickle* pickle) WARN_UNUSED_RESULT; |
| 49 bool WriteHeaderToPickle(uint32_t state_version, | 48 bool WriteHeaderToPickle(uint32_t state_version, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 61 WARN_UNUSED_RESULT; | 60 WARN_UNUSED_RESULT; |
| 62 bool RestoreNavigationEntryFromPickle(uint32_t state_version, | 61 bool RestoreNavigationEntryFromPickle(uint32_t state_version, |
| 63 base::PickleIterator* iterator, | 62 base::PickleIterator* iterator, |
| 64 content::NavigationEntry* entry) | 63 content::NavigationEntry* entry) |
| 65 WARN_UNUSED_RESULT; | 64 WARN_UNUSED_RESULT; |
| 66 | 65 |
| 67 } // namespace interanl | 66 } // namespace interanl |
| 68 | 67 |
| 69 } // namespace android_webview | 68 } // namespace android_webview |
| 70 | 69 |
| 71 #endif // ANDROID_WEBVIEW_NATIVE_STATE_SERIALIZER_H_ | 70 #endif // ANDROID_WEBVIEW_BROWSER_STATE_SERIALIZER_H_ |
| OLD | NEW |