1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 // 5 // This file contains (de)serialization (or if you like python, pickling) 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 8 // format. Deserialization reconstructs the object's state from such a string. 9 10 #ifndef WEBKIT_GLUE_GLUE_SERIALIZE_H_ 11 #define WEBKIT_GLUE_GLUE_SERIALIZE_H_ 12 13 #include <string> 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h" 15 16 namespace webkit_glue { 17 18 // HistoryItem serialization. 19 std::string HistoryItemToString( 20 const WebKit::WebHistoryItem& item); 21 WebKit::WebHistoryItem HistoryItemFromString( 22 const std::string& serialized_item); 23 24 // For testing purposes only. 25 void HistoryItemToVersionedString( 26 const WebKit::WebHistoryItem& item, int version, 27 std::string* serialized_item); 28 29 } // namespace webkit_glue 30 31 #endif // #ifndef WEBKIT_GLUE_GLUE_SERIALIZE_H_ 32