| 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/ios/ios_serialized_navigation_driver.h" | 5 #include "components/sessions/ios/ios_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/serialized_navigation_entry.h" |
| 9 #include "ios/web/public/referrer.h" | 9 #include "ios/web/public/referrer.h" |
| 10 | 10 |
| 11 namespace sessions { | 11 namespace sessions { |
| 12 | 12 |
| 13 namespace { | 13 namespace { |
| 14 const int kObsoleteReferrerPolicyAlways = 0; | 14 const int kObsoleteReferrerPolicyAlways = 0; |
| 15 const int kObsoleteReferrerPolicyDefault = 1; | 15 const int kObsoleteReferrerPolicyDefault = 1; |
| 16 const int kObsoleteReferrerPolicyNever = 2; | 16 const int kObsoleteReferrerPolicyNever = 2; |
| 17 const int kObsoleteReferrerPolicyOrigin = 3; | 17 const int kObsoleteReferrerPolicyOrigin = 3; |
| 18 } // namespace | 18 } // namespace |
| 19 | 19 |
| 20 // static | 20 // static |
| 21 SerializedNavigationDriver* SerializedNavigationDriver::Get() { | 21 SerializedNavigationDriver* SerializedNavigationDriver::Get() { |
| 22 return IOSSerializedNavigationDriver::GetInstance(); | 22 return IOSSerializedNavigationDriver::GetInstance(); |
| 23 } | 23 } |
| 24 | 24 |
| 25 // static | 25 // static |
| 26 IOSSerializedNavigationDriver* | 26 IOSSerializedNavigationDriver* |
| 27 IOSSerializedNavigationDriver::GetInstance() { | 27 IOSSerializedNavigationDriver::GetInstance() { |
| 28 return Singleton<IOSSerializedNavigationDriver, | 28 return base::Singleton< |
| 29 LeakySingletonTraits<IOSSerializedNavigationDriver>>::get(); | 29 IOSSerializedNavigationDriver, |
| 30 base::LeakySingletonTraits<IOSSerializedNavigationDriver>>::get(); |
| 30 } | 31 } |
| 31 | 32 |
| 32 IOSSerializedNavigationDriver::IOSSerializedNavigationDriver() { | 33 IOSSerializedNavigationDriver::IOSSerializedNavigationDriver() { |
| 33 } | 34 } |
| 34 | 35 |
| 35 IOSSerializedNavigationDriver::~IOSSerializedNavigationDriver() { | 36 IOSSerializedNavigationDriver::~IOSSerializedNavigationDriver() { |
| 36 } | 37 } |
| 37 | 38 |
| 38 int IOSSerializedNavigationDriver::GetDefaultReferrerPolicy() const { | 39 int IOSSerializedNavigationDriver::GetDefaultReferrerPolicy() const { |
| 39 return web::ReferrerPolicyDefault; | 40 return web::ReferrerPolicyDefault; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 navigation->referrer_policy_ = GetDefaultReferrerPolicy(); | 130 navigation->referrer_policy_ = GetDefaultReferrerPolicy(); |
| 130 } | 131 } |
| 131 } | 132 } |
| 132 | 133 |
| 133 std::string IOSSerializedNavigationDriver::StripReferrerFromPageState( | 134 std::string IOSSerializedNavigationDriver::StripReferrerFromPageState( |
| 134 const std::string& page_state) const { | 135 const std::string& page_state) const { |
| 135 return std::string(); | 136 return std::string(); |
| 136 } | 137 } |
| 137 | 138 |
| 138 } // namespace sessions | 139 } // namespace sessions |
| OLD | NEW |