| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_SESSIONS_IOS_IOS_SERIALIZED_NAVIGATION_DRIVER_H_ | 5 #ifndef COMPONENTS_SESSIONS_IOS_IOS_SERIALIZED_NAVIGATION_DRIVER_H_ |
| 6 #define COMPONENTS_SESSIONS_IOS_IOS_SERIALIZED_NAVIGATION_DRIVER_H_ | 6 #define COMPONENTS_SESSIONS_IOS_IOS_SERIALIZED_NAVIGATION_DRIVER_H_ |
| 7 | 7 |
| 8 #include "components/sessions/core/serialized_navigation_driver.h" | 8 #include "components/sessions/core/serialized_navigation_driver.h" |
| 9 | 9 |
| 10 template <typename T> struct DefaultSingletonTraits; | 10 template <typename T> struct DefaultSingletonTraits; |
| 11 | 11 |
| 12 namespace sessions { | 12 namespace sessions { |
| 13 | 13 |
| 14 // Provides an iOS implementation of SerializedNavigationDriver that is backed | 14 // Provides an iOS implementation of SerializedNavigationDriver that is backed |
| 15 // by //ios/web classes. | 15 // by //ios/web classes. |
| 16 class IOSSerializedNavigationDriver | 16 class IOSSerializedNavigationDriver |
| 17 : public SerializedNavigationDriver { | 17 : public SerializedNavigationDriver { |
| 18 public: | 18 public: |
| 19 virtual ~IOSSerializedNavigationDriver(); | 19 ~IOSSerializedNavigationDriver() override; |
| 20 | 20 |
| 21 // Returns the singleton IOSSerializedNavigationDriver. Almost all | 21 // Returns the singleton IOSSerializedNavigationDriver. Almost all |
| 22 // callers should use SerializedNavigationDriver::Get() instead. | 22 // callers should use SerializedNavigationDriver::Get() instead. |
| 23 static IOSSerializedNavigationDriver* GetInstance(); | 23 static IOSSerializedNavigationDriver* GetInstance(); |
| 24 | 24 |
| 25 // SerializedNavigationDriver implementation. | 25 // SerializedNavigationDriver implementation. |
| 26 int GetDefaultReferrerPolicy() const override; | 26 int GetDefaultReferrerPolicy() const override; |
| 27 std::string GetSanitizedPageStateForPickle( | 27 std::string GetSanitizedPageStateForPickle( |
| 28 const SerializedNavigationEntry* navigation) const override; | 28 const SerializedNavigationEntry* navigation) const override; |
| 29 void Sanitize(SerializedNavigationEntry* navigation) const override; | 29 void Sanitize(SerializedNavigationEntry* navigation) const override; |
| 30 | 30 |
| 31 private: | 31 private: |
| 32 IOSSerializedNavigationDriver(); | 32 IOSSerializedNavigationDriver(); |
| 33 friend struct DefaultSingletonTraits<IOSSerializedNavigationDriver>; | 33 friend struct DefaultSingletonTraits<IOSSerializedNavigationDriver>; |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 } // namespace sessions | 36 } // namespace sessions |
| 37 | 37 |
| 38 #endif // COMPONENTS_SESSIONS_IOS_IOS_SERIALIZED_NAVIGATION_DRIVER_H_ | 38 #endif // COMPONENTS_SESSIONS_IOS_IOS_SERIALIZED_NAVIGATION_DRIVER_H_ |
| OLD | NEW |