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..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 |