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

Unified Diff: content/public/common/resource_request_body.cc

Issue 2030473002: ABANDONED CL: Using ResourceRequestBody as the type of browser_initiated_post_data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@make-resource-request-body-public
Patch Set: Rebasing... Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/common/resource_request_body.h ('k') | content/shell/browser/shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/common/resource_request_body.cc
diff --git a/content/public/common/resource_request_body.cc b/content/public/common/resource_request_body.cc
index e3235fa8c5e9b9a18709cb60a2d31d45996570f6..4e0c9a6f52694e5c1adc064919510c6d0450fb61 100644
--- a/content/public/common/resource_request_body.cc
+++ b/content/public/common/resource_request_body.cc
@@ -12,4 +12,19 @@ ResourceRequestBody::ResourceRequestBody() {}
ResourceRequestBody::~ResourceRequestBody() {}
+// static
+scoped_refptr<ResourceRequestBody> ResourceRequestBody::CreateFromBytes(
+ const char* bytes,
+ size_t length) {
+ scoped_refptr<ResourceRequestBodyImpl> result = new ResourceRequestBodyImpl();
+ result->AppendBytes(bytes, length);
+ return result;
+}
+
+// static
+scoped_refptr<ResourceRequestBody> ResourceRequestBody::CreateFromBytes(
+ const std::string& bytes) {
+ return CreateFromBytes(bytes.data(), bytes.size());
+}
+
} // namespace content
« no previous file with comments | « content/public/common/resource_request_body.h ('k') | content/shell/browser/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698