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

Unified Diff: components/sessions/content/content_serialized_navigation_driver.cc

Issue 2310363002: Persist offline page info in a navigation entry if needed (Closed)
Patch Set: Update Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698