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

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: Update 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 virtual ~ExtendedInfoHandler() {}
26
27 // Returns the extended info from NavigationEntry for
sky 2016/09/29 03:08:19 How about: "Returns the data to write to disk for
jianli 2016/09/29 22:02:29 Done.
28 // SerializedNavigationEntry to save it.
29 virtual std::string GetExtendedInfo(
30 const content::NavigationEntry& entry) const = 0;
31
32 // Puts the extended info, extracted from SerializedNavigationEntry, into
sky 2016/09/29 03:08:19 And similar to the above, "Restores |info| which w
jianli 2016/09/29 22:02:29 Done.
33 // NavigationEntry.
34 virtual void RestoreExtendedInfo(
35 const std::string& info, 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