Chromium Code Reviews| Index: components/sessions/core/serialized_navigation_driver.h |
| diff --git a/components/sessions/core/serialized_navigation_driver.h b/components/sessions/core/serialized_navigation_driver.h |
| index 5fc261e4a95c5915f0c3dc2fef55beb33ad14352..c4e6ea6a646e63ccbb62f3a1650c4d5d8e05ce3c 100644 |
| --- a/components/sessions/core/serialized_navigation_driver.h |
| +++ b/components/sessions/core/serialized_navigation_driver.h |
| @@ -5,12 +5,19 @@ |
| #ifndef COMPONENTS_SESSIONS_CORE_SERIALIZED_NAVIGATION_DRIVER_H_ |
| #define COMPONENTS_SESSIONS_CORE_SERIALIZED_NAVIGATION_DRIVER_H_ |
| +#include <map> |
| +#include <memory> |
| #include <string> |
| #include "components/sessions/core/sessions_export.h" |
| +namespace content { |
| +class NavigationEntry; |
| +} |
| + |
| namespace sessions { |
| +class ExtendedInfoHandler; |
| class SerializedNavigationEntry; |
| // The SerializedNavigationDriver interface allows SerializedNavigationEntry to |
| @@ -50,6 +57,18 @@ class SESSIONS_EXPORT SerializedNavigationDriver { |
| // Removes the referrer from the encoded page state. |
| virtual std::string StripReferrerFromPageState( |
| const std::string& page_state) const = 0; |
| + |
| + // Registers a handler that is used to read and write the extended |
| + // info stored in SerializedNavigationEntry. |
| + virtual void RegisterExtendedInfoHandler( |
|
sky
2016/09/28 00:22:00
Can you clarify why you want to add these function
|
| + const std::string& key, |
| + std::unique_ptr<ExtendedInfoHandler> handler) = 0; |
| + |
| + using ExtendedInfoHandlerMap = |
| + std::map<std::string, std::unique_ptr<ExtendedInfoHandler>>; |
| + |
| + // Returns all the registered handlers to deal with the extended info. |
| + virtual const ExtendedInfoHandlerMap& GetAllExtendedInfoHandlers() const = 0; |
| }; |
| } // namespace sessions |