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

Side by Side Diff: components/sessions/content/extended_info_handler.h

Issue 2310363002: Persist offline page info in a navigation entry if needed (Closed)
Patch Set: Fix win compiling error due to using unique_ptr map in SESSIONS_EXPORT class Created 4 years, 2 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 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 #ifndef COMPONENTS_SESSIONS_CONTENT_EXTENDED_INFO_HANDLER_H_
6 #define COMPONENTS_SESSIONS_CONTENT_EXTENDED_INFO_HANDLER_H_
7
8 #include <string>
9
10 #include "components/sessions/core/sessions_export.h"
11
12 namespace content {
13 class NavigationEntry;
14 }
15
16 namespace sessions {
17
18 // This interface is used to store and retrieve arbitrary key/value pairs for
19 // a NavigationEntry that are not a core part of NavigationEntry.
20 // WARNING: implementations must deal with versioning. In particular
21 // RestoreExtendedInfo() may be called with data from a previous version of
22 // Chrome.
23 class SESSIONS_EXPORT ExtendedInfoHandler {
24 public:
25 ExtendedInfoHandler() {}
26 virtual ~ExtendedInfoHandler() {}
27
28 // Returns the data to write to disk for the specified NavigationEntry.
29 virtual std::string GetExtendedInfo(
30 const content::NavigationEntry& entry) const = 0;
31
32 // Restores |info| which was obtained from a previous call to
33 // GetExtendedInfo() to a NavigationEntry.
34 virtual void RestoreExtendedInfo(const std::string& info,
35 content::NavigationEntry* entry) = 0;
36 };
37
38 } // namespace sessions
39
40 #endif // COMPONENTS_SESSIONS_CONTENT_EXTENDED_INFO_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698