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

Unified Diff: components/sessions/core/serialized_navigation_driver.h

Issue 2759333002: Move chrome-specific SerializedNavigation code to chrome/. (Closed)
Patch Set: Rebase, fix Android? Created 3 years, 9 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/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..3c04735b3a9e281b12a46fdd14e7fc970a3118df 100644
--- a/components/sessions/core/serialized_navigation_driver.h
+++ b/components/sessions/core/serialized_navigation_driver.h
@@ -7,6 +7,7 @@
#include <string>
+#include "base/callback.h"
#include "components/sessions/core/sessions_export.h"
namespace sessions {
@@ -18,11 +19,14 @@ class SerializedNavigationEntry;
// must be provided by the driver on each platform.
class SESSIONS_EXPORT SerializedNavigationDriver {
public:
- virtual ~SerializedNavigationDriver() {}
+ using SanitizeCallback = base::Callback<void(SerializedNavigationEntry*)>;
sky 2017/03/21 14:47:39 This seems like a roundabout way of overriding San
Lei Zhang 2017/03/21 17:12:51 Wouldn't I need to move SerializedNavigationDriver
sky 2017/03/21 17:50:59 Good point. How about having setters that content
// Returns the singleton SerializedNavigationDriver.
static SerializedNavigationDriver* Get();
+ // Sets the callback to use for Sanitize().
+ static void SetSanitizeCallback(const SanitizeCallback& callback);
+
// Returns the default referrer policy.
virtual int GetDefaultReferrerPolicy() const = 0;
@@ -50,6 +54,9 @@ class SESSIONS_EXPORT SerializedNavigationDriver {
// Removes the referrer from the encoded page state.
virtual std::string StripReferrerFromPageState(
const std::string& page_state) const = 0;
+
+ protected:
+ virtual ~SerializedNavigationDriver() {}
};
} // namespace sessions

Powered by Google App Engine
This is Rietveld 408576698