Index: content/common/page_state_serialization.h |
diff --git a/content/common/page_state_serialization.h b/content/common/page_state_serialization.h |
index 7939094cbed7d605b908617195a0f4d9770674a0..c8bacb785110cba74d984662d33e4641f679832f 100644 |
--- a/content/common/page_state_serialization.h |
+++ b/content/common/page_state_serialization.h |
@@ -7,6 +7,7 @@ |
#include <stdint.h> |
+#include <string> |
#include <vector> |
#include "base/strings/nullable_string16.h" |
@@ -77,6 +78,17 @@ CONTENT_EXPORT bool DecodePageStateWithDeviceScaleFactorForTesting( |
const std::string& encoded, |
float device_scale_factor, |
ExplodedPageState* exploded); |
+ |
+// Converts results of EncodeResourceRequestBody (passed in as a pair of |data| |
+// + |size|) back into a ResourceRequestBodyImpl. Returns nullptr if the |
+// decoding fails (e.g. if |data| is malformed). |
+scoped_refptr<ResourceRequestBodyImpl> DecodeResourceRequestBody( |
+ const char* data, |
+ size_t size); |
+ |
+// Encodes |resource_request_body| into |encoded|. |
+std::string EncodeResourceRequestBody( |
+ const ResourceRequestBodyImpl& resource_request_body); |
#endif |
} // namespace content |