OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // This file contains (de)serialization (or if you like python, pickling) | 5 // This file contains (de)serialization (or if you like python, pickling) |
6 // methods for various objects that we want to persist. | 6 // methods for various objects that we want to persist. |
7 // In serialization, we write an object's state to a string in some opaque | 7 // In serialization, we write an object's state to a string in some opaque |
8 // format. Deserialization reconstructs the object's state from such a string. | 8 // format. Deserialization reconstructs the object's state from such a string. |
9 | 9 |
10 #ifndef WEBKIT_GLUE_GLUE_SERIALIZE_H_ | 10 #ifndef WEBKIT_GLUE_GLUE_SERIALIZE_H_ |
11 #define WEBKIT_GLUE_GLUE_SERIALIZE_H_ | 11 #define WEBKIT_GLUE_GLUE_SERIALIZE_H_ |
12 | 12 |
13 #include <string> | 13 #include <string> |
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h" | 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h" |
| 15 #include "webkit/glue/webkit_glue_export.h" |
15 | 16 |
16 namespace webkit_glue { | 17 namespace webkit_glue { |
17 | 18 |
18 // HistoryItem serialization. | 19 // HistoryItem serialization. |
19 std::string HistoryItemToString(const WebKit::WebHistoryItem& item); | 20 WEBKIT_GLUE_EXPORT std::string HistoryItemToString( |
20 WebKit::WebHistoryItem HistoryItemFromString( | 21 const WebKit::WebHistoryItem& item); |
| 22 WEBKIT_GLUE_EXPORT WebKit::WebHistoryItem HistoryItemFromString( |
21 const std::string& serialized_item); | 23 const std::string& serialized_item); |
22 | 24 |
23 // For testing purposes only. | 25 // For testing purposes only. |
24 void HistoryItemToVersionedString(const WebKit::WebHistoryItem& item, | 26 WEBKIT_GLUE_EXPORT void HistoryItemToVersionedString( |
25 int version, | 27 const WebKit::WebHistoryItem& item, |
26 std::string* serialized_item); | 28 int version, |
| 29 std::string* serialized_item); |
27 | 30 |
28 } // namespace webkit_glue | 31 } // namespace webkit_glue |
29 | 32 |
30 #endif // #ifndef WEBKIT_GLUE_GLUE_SERIALIZE_H_ | 33 #endif // #ifndef WEBKIT_GLUE_GLUE_SERIALIZE_H_ |
OLD | NEW |