1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28

content / public / browser / navigation_entry_restore_context.h [blame]

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_RESTORE_CONTEXT_H_
#define CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_RESTORE_CONTEXT_H_

#include <memory>

#include "content/common/content_export.h"

namespace content {

// A NavigationEntryRestoreContext is an opaque structure passed to
// NavigationEntry::SetPageState() when restoring a vector of NavigationEntries.
// It tracks the item sequence number (ISN) associated with each session
// history item, and maintains a mapping of ISNs to session history items to
// ensure items are de-duplicated if they appear in multiple NavigationEntries.
class NavigationEntryRestoreContext {
 public:
  virtual ~NavigationEntryRestoreContext() = default;

  CONTENT_EXPORT static std::unique_ptr<NavigationEntryRestoreContext> Create();
};

}  // namespace content

#endif  // CONTENT_PUBLIC_BROWSER_NAVIGATION_ENTRY_RESTORE_CONTEXT_H_