Index: content/public/renderer/history_item_serialization.cc |
diff --git a/content/public/renderer/history_item_serialization.cc b/content/public/renderer/history_item_serialization.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d8fcdc9eff80b0d7d736922fe3f2195808024414 |
--- /dev/null |
+++ b/content/public/renderer/history_item_serialization.cc |
@@ -0,0 +1,21 @@ |
+// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "content/public/renderer/history_item_serialization.h" |
+ |
+#include "content/public/common/page_state.h" |
+#include "webkit/glue/glue_serialize_deprecated.h" |
+ |
+namespace content { |
+ |
+PageState HistoryItemToPageState(const WebKit::WebHistoryItem& item) { |
+ return PageState::CreateFromEncodedData( |
+ webkit_glue::HistoryItemToString(item)); |
+} |
+ |
+WebKit::WebHistoryItem PageStateToHistoryItem(const PageState& state) { |
+ return webkit_glue::HistoryItemFromString(state.ToEncodedData()); |
+} |
+ |
+} // namespace content |