Linux: Depend on liberation-fonts package for RPMs.
[chromium-blink-merge.git] / components / sessions / ios / ios_serialized_navigation_driver.h
blob7982ad3145e794307c2f5100a09e04e9f01e9666
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
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_SESSIONS_IOS_IOS_SERIALIZED_NAVIGATION_DRIVER_H_
6 #define COMPONENTS_SESSIONS_IOS_IOS_SERIALIZED_NAVIGATION_DRIVER_H_
8 #include "components/sessions/core/serialized_navigation_driver.h"
10 namespace base {
11 template <typename T> struct DefaultSingletonTraits;
14 namespace sessions {
16 // Provides an iOS implementation of SerializedNavigationDriver that is backed
17 // by //ios/web classes.
18 class IOSSerializedNavigationDriver
19 : public SerializedNavigationDriver {
20 public:
21 ~IOSSerializedNavigationDriver() override;
23 // Returns the singleton IOSSerializedNavigationDriver. Almost all
24 // callers should use SerializedNavigationDriver::Get() instead.
25 static IOSSerializedNavigationDriver* GetInstance();
27 // SerializedNavigationDriver implementation.
28 int GetDefaultReferrerPolicy() const override;
29 bool MapReferrerPolicyToOldValues(int referrer_policy,
30 int* mapped_referrer_policy) const override;
31 bool MapReferrerPolicyToNewValues(int referrer_policy,
32 int* mapped_referrer_policy) const override;
33 std::string GetSanitizedPageStateForPickle(
34 const SerializedNavigationEntry* navigation) const override;
35 void Sanitize(SerializedNavigationEntry* navigation) const override;
36 std::string StripReferrerFromPageState(
37 const std::string& page_state) const override;
39 private:
40 IOSSerializedNavigationDriver();
41 friend struct base::DefaultSingletonTraits<IOSSerializedNavigationDriver>;
44 } // namespace sessions
46 #endif // COMPONENTS_SESSIONS_IOS_IOS_SERIALIZED_NAVIGATION_DRIVER_H_