Chromium Code Reviews| Index: components/sessions/content/content_serialized_navigation_driver.cc |
| diff --git a/components/sessions/content/content_serialized_navigation_driver.cc b/components/sessions/content/content_serialized_navigation_driver.cc |
| index a3305a8695311157429112f3677d91fa124daac5..c20cd895f61c036c4147cc9c8af3d0d8e5276ef8 100644 |
| --- a/components/sessions/content/content_serialized_navigation_driver.cc |
| +++ b/components/sessions/content/content_serialized_navigation_driver.cc |
| @@ -6,6 +6,7 @@ |
| #include "base/memory/singleton.h" |
| #include "build/build_config.h" |
| +#include "components/sessions/content/extended_info_handler.h" |
| #include "components/sessions/core/serialized_navigation_entry.h" |
| #include "content/public/common/page_state.h" |
| #include "content/public/common/referrer.h" |
| @@ -133,4 +134,16 @@ std::string ContentSerializedNavigationDriver::StripReferrerFromPageState( |
| .ToEncodedData(); |
| } |
| +void ContentSerializedNavigationDriver::RegisterExtendedInfoHandler( |
| + const std::string& key, |
| + std::unique_ptr<ExtendedInfoHandler> handler) { |
| + DCHECK(!key.empty()); |
|
sky
2016/09/29 03:08:19
Please also add a DCHECK that there isn't a handle
jianli
2016/09/29 22:02:29
Done.
|
| + extended_info_handler_map_[key] = std::move(handler); |
| +} |
| + |
| +const ContentSerializedNavigationDriver::ExtendedInfoHandlerMap& |
| +ContentSerializedNavigationDriver::GetAllExtendedInfoHandlers() const { |
| + return extended_info_handler_map_; |
| +} |
| + |
| } // namespace sessions |