Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2193)

Unified Diff: content/public/renderer/history_item_serialization.cc

Issue 14985014: Introduce content::PageState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compilation issues. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698