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_CONTENT_CONTENT_SERIALIZED_NAVIGATION_DRIVER_H_ | 5 #ifndef COMPONENTS_SESSIONS_CONTENT_CONTENT_SERIALIZED_NAVIGATION_DRIVER_H_ |
6 #define COMPONENTS_SESSIONS_CONTENT_CONTENT_SERIALIZED_NAVIGATION_DRIVER_H_ | 6 #define COMPONENTS_SESSIONS_CONTENT_CONTENT_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 #include "components/sessions/sessions_export.h" | 10 #include "components/sessions/sessions_export.h" |
11 | 11 |
| 12 namespace base { |
12 template <typename T> struct DefaultSingletonTraits; | 13 template <typename T> struct DefaultSingletonTraits; |
| 14 } |
13 | 15 |
14 namespace sessions { | 16 namespace sessions { |
15 | 17 |
16 // Provides an implementation of SerializedNavigationDriver that is backed by | 18 // Provides an implementation of SerializedNavigationDriver that is backed by |
17 // content classes. | 19 // content classes. |
18 class SESSIONS_EXPORT_PRIVATE ContentSerializedNavigationDriver | 20 class SESSIONS_EXPORT_PRIVATE ContentSerializedNavigationDriver |
19 : public SerializedNavigationDriver { | 21 : public SerializedNavigationDriver { |
20 public: | 22 public: |
21 ~ContentSerializedNavigationDriver() override; | 23 ~ContentSerializedNavigationDriver() override; |
22 | 24 |
23 // Returns the singleton ContentSerializedNavigationDriver. Almost all | 25 // Returns the singleton ContentSerializedNavigationDriver. Almost all |
24 // callers should use SerializedNavigationDriver::Get() instead. | 26 // callers should use SerializedNavigationDriver::Get() instead. |
25 static ContentSerializedNavigationDriver* GetInstance(); | 27 static ContentSerializedNavigationDriver* GetInstance(); |
26 | 28 |
27 // SerializedNavigationDriver implementation. | 29 // SerializedNavigationDriver implementation. |
28 int GetDefaultReferrerPolicy() const override; | 30 int GetDefaultReferrerPolicy() const override; |
29 bool MapReferrerPolicyToOldValues(int referrer_policy, | 31 bool MapReferrerPolicyToOldValues(int referrer_policy, |
30 int* mapped_referrer_policy) const override; | 32 int* mapped_referrer_policy) const override; |
31 bool MapReferrerPolicyToNewValues(int referrer_policy, | 33 bool MapReferrerPolicyToNewValues(int referrer_policy, |
32 int* mapped_referrer_policy) const override; | 34 int* mapped_referrer_policy) const override; |
33 std::string GetSanitizedPageStateForPickle( | 35 std::string GetSanitizedPageStateForPickle( |
34 const SerializedNavigationEntry* navigation) const override; | 36 const SerializedNavigationEntry* navigation) const override; |
35 void Sanitize(SerializedNavigationEntry* navigation) const override; | 37 void Sanitize(SerializedNavigationEntry* navigation) const override; |
36 std::string StripReferrerFromPageState( | 38 std::string StripReferrerFromPageState( |
37 const std::string& page_state) const override; | 39 const std::string& page_state) const override; |
38 | 40 |
39 private: | 41 private: |
40 ContentSerializedNavigationDriver(); | 42 ContentSerializedNavigationDriver(); |
41 friend struct DefaultSingletonTraits<ContentSerializedNavigationDriver>; | 43 friend struct base::DefaultSingletonTraits<ContentSerializedNavigationDriver>; |
42 }; | 44 }; |
43 | 45 |
44 } // namespace sessions | 46 } // namespace sessions |
45 | 47 |
46 #endif // COMPONENTS_SESSIONS_CONTENT_CONTENT_SERIALIZED_NAVIGATION_DRIVER_H_ | 48 #endif // COMPONENTS_SESSIONS_CONTENT_CONTENT_SERIALIZED_NAVIGATION_DRIVER_H_ |
OLD | NEW |