| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_COMMON_PAGE_STATE_SERIALIZATION_H_ | 5 #ifndef CONTENT_COMMON_PAGE_STATE_SERIALIZATION_H_ |
| 6 #define CONTENT_COMMON_PAGE_STATE_SERIALIZATION_H_ | 6 #define CONTENT_COMMON_PAGE_STATE_SERIALIZATION_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 ExplodedFrameState(); | 51 ExplodedFrameState(); |
| 52 ExplodedFrameState(const ExplodedFrameState& other); | 52 ExplodedFrameState(const ExplodedFrameState& other); |
| 53 ~ExplodedFrameState(); | 53 ~ExplodedFrameState(); |
| 54 void operator=(const ExplodedFrameState& other); | 54 void operator=(const ExplodedFrameState& other); |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 void assign(const ExplodedFrameState& other); | 57 void assign(const ExplodedFrameState& other); |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 struct CONTENT_EXPORT ExplodedPageState { | 60 struct CONTENT_EXPORT ExplodedPageState { |
| 61 // TODO(creis): Move referenced_files to ExplodedFrameState. | 61 // TODO(creis, lukasza): Instead of storing them in |referenced_files|, |
| 62 // It currently contains a list from all frames, but cannot be deserialized | 62 // extract referenced files from ExplodedHttpBody. |referenced_files| |
| 63 // into the files referenced by each frame. See http://crbug.com/441966. | 63 // currently contains a list from all frames, but cannot be deserialized into |
| 64 // the files referenced by each frame. See http://crbug.com/441966. |
| 64 std::vector<base::NullableString16> referenced_files; | 65 std::vector<base::NullableString16> referenced_files; |
| 65 ExplodedFrameState top; | 66 ExplodedFrameState top; |
| 66 | 67 |
| 67 ExplodedPageState(); | 68 ExplodedPageState(); |
| 68 ~ExplodedPageState(); | 69 ~ExplodedPageState(); |
| 69 }; | 70 }; |
| 70 | 71 |
| 71 CONTENT_EXPORT bool DecodePageState(const std::string& encoded, | 72 CONTENT_EXPORT bool DecodePageState(const std::string& encoded, |
| 72 ExplodedPageState* exploded); | 73 ExplodedPageState* exploded); |
| 73 CONTENT_EXPORT bool EncodePageState(const ExplodedPageState& exploded, | 74 CONTENT_EXPORT bool EncodePageState(const ExplodedPageState& exploded, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 87 size_t size); | 88 size_t size); |
| 88 | 89 |
| 89 // Encodes |resource_request_body| into |encoded|. | 90 // Encodes |resource_request_body| into |encoded|. |
| 90 std::string EncodeResourceRequestBody( | 91 std::string EncodeResourceRequestBody( |
| 91 const ResourceRequestBodyImpl& resource_request_body); | 92 const ResourceRequestBodyImpl& resource_request_body); |
| 92 #endif | 93 #endif |
| 93 | 94 |
| 94 } // namespace content | 95 } // namespace content |
| 95 | 96 |
| 96 #endif // CONTENT_COMMON_PAGE_STATE_SERIALIZATION_H_ | 97 #endif // CONTENT_COMMON_PAGE_STATE_SERIALIZATION_H_ |
| OLD | NEW |