| Index: content/renderer/history_serialization.cc
|
| diff --git a/content/renderer/history_serialization.cc b/content/renderer/history_serialization.cc
|
| index d015cf29c99bc1d1f1586974738f51c0dd98bef3..e2c41d12b48177d9481f2694ffb1c0fa9ee98e5b 100644
|
| --- a/content/renderer/history_serialization.cc
|
| +++ b/content/renderer/history_serialization.cc
|
| @@ -5,6 +5,7 @@
|
| #include "content/renderer/history_serialization.h"
|
|
|
| #include "content/common/page_state_serialization.h"
|
| +#include "content/common/site_isolation_policy.h"
|
| #include "content/public/common/page_state.h"
|
| #include "content/renderer/history_entry.h"
|
| #include "third_party/WebKit/public/platform/WebFloatPoint.h"
|
| @@ -172,6 +173,8 @@ void RecursivelyGenerateHistoryItem(const ExplodedFrameState& state,
|
| } // namespace
|
|
|
| PageState HistoryEntryToPageState(HistoryEntry* entry) {
|
| + DCHECK(!SiteIsolationPolicy::UseSubframeNavigationEntries());
|
| +
|
| ExplodedPageState state;
|
| RecursivelyGenerateFrameState(entry->root_history_node(), &state.top,
|
| &state.referenced_files);
|
| @@ -184,6 +187,8 @@ PageState HistoryEntryToPageState(HistoryEntry* entry) {
|
| }
|
|
|
| PageState SingleHistoryItemToPageState(const WebHistoryItem& item) {
|
| + DCHECK(!SiteIsolationPolicy::UseSubframeNavigationEntries());
|
| +
|
| ExplodedPageState state;
|
| ToNullableString16Vector(item.getReferencedFilePaths(),
|
| &state.referenced_files);
|
| @@ -197,6 +202,8 @@ PageState SingleHistoryItemToPageState(const WebHistoryItem& item) {
|
| }
|
|
|
| scoped_ptr<HistoryEntry> PageStateToHistoryEntry(const PageState& page_state) {
|
| + DCHECK(!SiteIsolationPolicy::UseSubframeNavigationEntries());
|
| +
|
| ExplodedPageState state;
|
| if (!DecodePageState(page_state.ToEncodedData(), &state))
|
| return scoped_ptr<HistoryEntry>();
|
| @@ -207,4 +214,21 @@ scoped_ptr<HistoryEntry> PageStateToHistoryEntry(const PageState& page_state) {
|
| return entry.Pass();
|
| }
|
|
|
| +ExplodedFrameState HistoryItemToFrameState(const WebHistoryItem& item) {
|
| + DCHECK(SiteIsolationPolicy::UseSubframeNavigationEntries());
|
| +
|
| + // TODO(creis): We're missing the list of referenced_files.
|
| + ExplodedFrameState state;
|
| + GenerateFrameStateFromItem(item, &state);
|
| + return state;
|
| +}
|
| +
|
| +WebHistoryItem FrameStateToHistoryItem(const ExplodedFrameState& state) {
|
| + DCHECK(SiteIsolationPolicy::UseSubframeNavigationEntries());
|
| +
|
| + scoped_ptr<HistoryEntry> entry(new HistoryEntry());
|
| + RecursivelyGenerateHistoryItem(state, entry->root_history_node());
|
| + return entry->root_history_node()->item();
|
| +}
|
| +
|
| } // namespace content
|
|
|