| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 IOS_WEB_NAVIGATION_SERIALIZED_NAVIGATION_MANAGER_BUILDER_H_ | 5 #ifndef IOS_WEB_NAVIGATION_SERIALIZED_NAVIGATION_MANAGER_BUILDER_H_ |
| 6 #define IOS_WEB_NAVIGATION_SERIALIZED_NAVIGATION_MANAGER_BUILDER_H_ | 6 #define IOS_WEB_NAVIGATION_SERIALIZED_NAVIGATION_MANAGER_BUILDER_H_ |
| 7 | 7 |
| 8 @class CRWSessionStorage; | 8 @class CRWSessionStorage; |
| 9 | 9 |
| 10 namespace web { | 10 namespace web { |
| 11 | 11 |
| 12 class WebStateImpl; | 12 class WebStateImpl; |
| 13 | 13 |
| 14 // Class that can serialize and deserialize session information. | 14 // Class that can serialize and deserialize session information. |
| 15 class SessionStorageBuilder { | 15 class SessionStorageBuilder { |
| 16 public: | 16 public: |
| 17 // Creates a serializable session storage from |web_state|. | 17 // Creates a serializable session storage from |web_state|. |
| 18 CRWSessionStorage* BuildStorage(WebStateImpl* web_state) const; | 18 CRWSessionStorage* BuildStorage(WebStateImpl* web_state) const; |
| 19 // Populates |web_state| with |storage|'s session information. | 19 // Populates |web_state| with |storage|'s session information. |
| 20 // The provided |web_state| must already have a |NavigationManager|. |
| 20 void ExtractSessionState(WebStateImpl* web_state, | 21 void ExtractSessionState(WebStateImpl* web_state, |
| 21 CRWSessionStorage* storage) const; | 22 CRWSessionStorage* storage) const; |
| 22 }; | 23 }; |
| 23 | 24 |
| 24 } // namespace web | 25 } // namespace web |
| 25 | 26 |
| 26 #endif // IOS_WEB_NAVIGATION_SERIALIZED_NAVIGATION_MANAGER_BUILDER_H_ | 27 #endif // IOS_WEB_NAVIGATION_SERIALIZED_NAVIGATION_MANAGER_BUILDER_H_ |
| OLD | NEW |