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 // 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_ |
(...skipping 10 matching lines...) Expand all Loading... |
21 namespace webkit_glue { | 21 namespace webkit_glue { |
22 | 22 |
23 // HistoryItem serialization. | 23 // HistoryItem serialization. |
24 WEBKIT_GLUE_EXPORT std::string HistoryItemToString( | 24 WEBKIT_GLUE_EXPORT std::string HistoryItemToString( |
25 const WebKit::WebHistoryItem& item); | 25 const WebKit::WebHistoryItem& item); |
26 WEBKIT_GLUE_EXPORT WebKit::WebHistoryItem HistoryItemFromString( | 26 WEBKIT_GLUE_EXPORT WebKit::WebHistoryItem HistoryItemFromString( |
27 const std::string& serialized_item); | 27 const std::string& serialized_item); |
28 | 28 |
29 // Reads file paths from the HTTP body and the file input elements of a | 29 // Reads file paths from the HTTP body and the file input elements of a |
30 // serialized WebHistoryItem. | 30 // serialized WebHistoryItem. |
31 WEBKIT_GLUE_EXPORT std::vector<FilePath> FilePathsFromHistoryState( | 31 WEBKIT_GLUE_EXPORT std::vector<base::FilePath> FilePathsFromHistoryState( |
32 const std::string& content_state); | 32 const std::string& content_state); |
33 | 33 |
34 // For testing purposes only. | 34 // For testing purposes only. |
35 WEBKIT_GLUE_EXPORT void HistoryItemToVersionedString( | 35 WEBKIT_GLUE_EXPORT void HistoryItemToVersionedString( |
36 const WebKit::WebHistoryItem& item, | 36 const WebKit::WebHistoryItem& item, |
37 int version, | 37 int version, |
38 std::string* serialized_item); | 38 std::string* serialized_item); |
39 WEBKIT_GLUE_EXPORT int HistoryItemCurrentVersion(); | 39 WEBKIT_GLUE_EXPORT int HistoryItemCurrentVersion(); |
40 | 40 |
41 // Removes any form data state from the history state string |content_state|. | 41 // Removes any form data state from the history state string |content_state|. |
(...skipping 10 matching lines...) Expand all Loading... |
52 const std::string& content_state); | 52 const std::string& content_state); |
53 | 53 |
54 // Creates serialized state for the specified URL. This is a variant of | 54 // Creates serialized state for the specified URL. This is a variant of |
55 // HistoryItemToString (in glue_serialize) that is used during session restore | 55 // HistoryItemToString (in glue_serialize) that is used during session restore |
56 // if the saved state is empty. | 56 // if the saved state is empty. |
57 WEBKIT_GLUE_EXPORT std::string CreateHistoryStateForURL(const GURL& url); | 57 WEBKIT_GLUE_EXPORT std::string CreateHistoryStateForURL(const GURL& url); |
58 | 58 |
59 } // namespace webkit_glue | 59 } // namespace webkit_glue |
60 | 60 |
61 #endif // #ifndef WEBKIT_GLUE_GLUE_SERIALIZE_H_ | 61 #endif // #ifndef WEBKIT_GLUE_GLUE_SERIALIZE_H_ |
OLD | NEW |