Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: content/common/page_state_serialization.h

Issue 2038233002: Using ResourceRequestBody as the type of HTTP body outside of //content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@make-resource-request-body-public
Patch Set: Rebasing... Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <vector> 11 #include <vector>
11 12
12 #include "base/strings/nullable_string16.h" 13 #include "base/strings/nullable_string16.h"
13 #include "build/build_config.h" 14 #include "build/build_config.h"
14 #include "content/common/content_export.h" 15 #include "content/common/content_export.h"
15 #include "content/common/resource_request_body_impl.h" 16 #include "content/common/resource_request_body_impl.h"
16 #include "third_party/WebKit/public/platform/WebHTTPBody.h" 17 #include "third_party/WebKit/public/platform/WebHTTPBody.h"
17 #include "third_party/WebKit/public/platform/WebHistoryScrollRestorationType.h" 18 #include "third_party/WebKit/public/platform/WebHistoryScrollRestorationType.h"
18 #include "third_party/WebKit/public/platform/WebReferrerPolicy.h" 19 #include "third_party/WebKit/public/platform/WebReferrerPolicy.h"
19 #include "ui/gfx/geometry/point.h" 20 #include "ui/gfx/geometry/point.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 CONTENT_EXPORT bool DecodePageState(const std::string& encoded, 71 CONTENT_EXPORT bool DecodePageState(const std::string& encoded,
71 ExplodedPageState* exploded); 72 ExplodedPageState* exploded);
72 CONTENT_EXPORT bool EncodePageState(const ExplodedPageState& exploded, 73 CONTENT_EXPORT bool EncodePageState(const ExplodedPageState& exploded,
73 std::string* encoded); 74 std::string* encoded);
74 75
75 #if defined(OS_ANDROID) 76 #if defined(OS_ANDROID)
76 CONTENT_EXPORT bool DecodePageStateWithDeviceScaleFactorForTesting( 77 CONTENT_EXPORT bool DecodePageStateWithDeviceScaleFactorForTesting(
77 const std::string& encoded, 78 const std::string& encoded,
78 float device_scale_factor, 79 float device_scale_factor,
79 ExplodedPageState* exploded); 80 ExplodedPageState* exploded);
81
82 // Converts results of EncodeResourceRequestBody (passed in as a pair of |data|
83 // + |size|) back into a ResourceRequestBodyImpl. Returns nullptr if the
84 // decoding fails (e.g. if |data| is malformed).
85 scoped_refptr<ResourceRequestBodyImpl> DecodeResourceRequestBody(
86 const char* data,
87 size_t size);
88
89 // Encodes |resource_request_body| into |encoded|.
90 std::string EncodeResourceRequestBody(
91 const ResourceRequestBodyImpl& resource_request_body);
80 #endif 92 #endif
81 93
82 } // namespace content 94 } // namespace content
83 95
84 #endif // CONTENT_COMMON_PAGE_STATE_SERIALIZATION_H_ 96 #endif // CONTENT_COMMON_PAGE_STATE_SERIALIZATION_H_
OLDNEW
« no previous file with comments | « content/common/android/resource_request_body_android.cc ('k') | content/common/page_state_serialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698