Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(673)

Side by Side Diff: components/sessions/core/serialized_navigation_driver.h

Issue 2759333002: Move chrome-specific SerializedNavigation code to chrome/. (Closed)
Patch Set: Fix Android Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_CORE_SERIALIZED_NAVIGATION_DRIVER_H_ 5 #ifndef COMPONENTS_SESSIONS_CORE_SERIALIZED_NAVIGATION_DRIVER_H_
6 #define COMPONENTS_SESSIONS_CORE_SERIALIZED_NAVIGATION_DRIVER_H_ 6 #define COMPONENTS_SESSIONS_CORE_SERIALIZED_NAVIGATION_DRIVER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "components/sessions/core/sessions_export.h" 10 #include "components/sessions/core/sessions_export.h"
11 11
12 namespace sessions { 12 namespace sessions {
13 13
14 class SerializedNavigationEntry; 14 class SerializedNavigationEntry;
15 15
16 // The SerializedNavigationDriver interface allows SerializedNavigationEntry to 16 // The SerializedNavigationDriver interface allows SerializedNavigationEntry to
17 // obtain information from a singleton driver object. A concrete implementation 17 // obtain information from a singleton driver object. A concrete implementation
18 // must be provided by the driver on each platform. 18 // must be provided by the driver on each platform.
19 class SESSIONS_EXPORT SerializedNavigationDriver { 19 class SESSIONS_EXPORT SerializedNavigationDriver {
20 public: 20 public:
21 virtual ~SerializedNavigationDriver() {}
22
23 // Returns the singleton SerializedNavigationDriver. 21 // Returns the singleton SerializedNavigationDriver.
24 static SerializedNavigationDriver* Get(); 22 static SerializedNavigationDriver* Get();
25 23
26 // Returns the default referrer policy. 24 // Returns the default referrer policy.
27 virtual int GetDefaultReferrerPolicy() const = 0; 25 virtual int GetDefaultReferrerPolicy() const = 0;
28 26
29 // Maps current referrer policies to old values to work around 27 // Maps current referrer policies to old values to work around
30 // crbug.com/450589. Returns false if the referrer should be stripped. 28 // crbug.com/450589. Returns false if the referrer should be stripped.
31 virtual bool MapReferrerPolicyToOldValues( 29 virtual bool MapReferrerPolicyToOldValues(
32 int referrer_policy, 30 int referrer_policy,
(...skipping 10 matching lines...) Expand all
43 virtual std::string GetSanitizedPageStateForPickle( 41 virtual std::string GetSanitizedPageStateForPickle(
44 const SerializedNavigationEntry* navigation) const = 0; 42 const SerializedNavigationEntry* navigation) const = 0;
45 43
46 // Sanitizes the data in the given |navigation| to be more robust against 44 // Sanitizes the data in the given |navigation| to be more robust against
47 // faulty data written by older versions. 45 // faulty data written by older versions.
48 virtual void Sanitize(SerializedNavigationEntry* navigation) const = 0; 46 virtual void Sanitize(SerializedNavigationEntry* navigation) const = 0;
49 47
50 // Removes the referrer from the encoded page state. 48 // Removes the referrer from the encoded page state.
51 virtual std::string StripReferrerFromPageState( 49 virtual std::string StripReferrerFromPageState(
52 const std::string& page_state) const = 0; 50 const std::string& page_state) const = 0;
51
52 protected:
53 virtual ~SerializedNavigationDriver() {}
53 }; 54 };
54 55
55 } // namespace sessions 56 } // namespace sessions
56 57
57 #endif // COMPONENTS_SESSIONS_CORE_SERIALIZED_NAVIGATION_DRIVER_H_ 58 #endif // COMPONENTS_SESSIONS_CORE_SERIALIZED_NAVIGATION_DRIVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698