ServiceWorker: Consolidate version manipulation functions in SWProviderContext
[chromium-blink-merge.git] / components / sessions / ios / ios_serialized_navigation_driver.h
blobd5b7f8874204a951b44ef46f6f002f2571f93207
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 template <typename T> struct DefaultSingletonTraits;
12 namespace sessions {
14 // Provides an iOS implementation of SerializedNavigationDriver that is backed
15 // by //ios/web classes.
16 class IOSSerializedNavigationDriver
17 : public SerializedNavigationDriver {
18 public:
19 virtual ~IOSSerializedNavigationDriver();
21 // Returns the singleton IOSSerializedNavigationDriver. Almost all
22 // callers should use SerializedNavigationDriver::Get() instead.
23 static IOSSerializedNavigationDriver* GetInstance();
25 // SerializedNavigationDriver implementation.
26 int GetDefaultReferrerPolicy() const override;
27 std::string GetSanitizedPageStateForPickle(
28 const SerializedNavigationEntry* navigation) const override;
29 void Sanitize(SerializedNavigationEntry* navigation) const override;
31 private:
32 IOSSerializedNavigationDriver();
33 friend struct DefaultSingletonTraits<IOSSerializedNavigationDriver>;
36 } // namespace sessions
38 #endif // COMPONENTS_SESSIONS_IOS_IOS_SERIALIZED_NAVIGATION_DRIVER_H_