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 #include "components/sessions/content/content_serialized_navigation_driver.h" | 5 #include "components/sessions/content/content_serialized_navigation_driver.h" |
6 | 6 |
7 #include "base/memory/singleton.h" | 7 #include "base/memory/singleton.h" |
8 #include "components/sessions/serialized_navigation_entry.h" | 8 #include "components/sessions/core/serialized_navigation_entry.h" |
9 #include "content/public/common/page_state.h" | 9 #include "content/public/common/page_state.h" |
10 #include "content/public/common/referrer.h" | 10 #include "content/public/common/referrer.h" |
11 #include "content/public/common/url_constants.h" | 11 #include "content/public/common/url_constants.h" |
12 | 12 |
13 namespace sessions { | 13 namespace sessions { |
14 | 14 |
15 namespace { | 15 namespace { |
16 const int kObsoleteReferrerPolicyAlways = 0; | 16 const int kObsoleteReferrerPolicyAlways = 0; |
17 const int kObsoleteReferrerPolicyDefault = 1; | 17 const int kObsoleteReferrerPolicyDefault = 1; |
18 const int kObsoleteReferrerPolicyNever = 2; | 18 const int kObsoleteReferrerPolicyNever = 2; |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 } | 126 } |
127 | 127 |
128 std::string ContentSerializedNavigationDriver::StripReferrerFromPageState( | 128 std::string ContentSerializedNavigationDriver::StripReferrerFromPageState( |
129 const std::string& page_state) const { | 129 const std::string& page_state) const { |
130 return content::PageState::CreateFromEncodedData(page_state) | 130 return content::PageState::CreateFromEncodedData(page_state) |
131 .RemoveReferrer() | 131 .RemoveReferrer() |
132 .ToEncodedData(); | 132 .ToEncodedData(); |
133 } | 133 } |
134 | 134 |
135 } // namespace sessions | 135 } // namespace sessions |
OLD | NEW |