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

Unified Diff: third_party/crashpad/crashpad/util/net/http_multipart_builder.cc

Issue 2705373005: Revert of Update Crashpad to 6da9708e7cc93e2e1772439d51646e47583cb225 (Closed)
Patch Set: Created 3 years, 10 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
Index: third_party/crashpad/crashpad/util/net/http_multipart_builder.cc
diff --git a/third_party/crashpad/crashpad/util/net/http_multipart_builder.cc b/third_party/crashpad/crashpad/util/net/http_multipart_builder.cc
index 640d540a6ed0d889b378c76cb491a6aad454b626..46f6f09099c9556e2f6e96f83496619f22b7a0c4 100644
--- a/third_party/crashpad/crashpad/util/net/http_multipart_builder.cc
+++ b/third_party/crashpad/crashpad/util/net/http_multipart_builder.cc
@@ -23,7 +23,6 @@
#include "base/rand_util.h"
#include "base/strings/stringprintf.h"
#include "util/net/http_body.h"
-#include "util/net/http_body_gzip.h"
namespace crashpad {
@@ -117,16 +116,10 @@ void AssertSafeMIMEType(const std::string& string) {
} // namespace
HTTPMultipartBuilder::HTTPMultipartBuilder()
- : boundary_(GenerateBoundaryString()),
- form_data_(),
- file_attachments_(),
- gzip_enabled_(false) {}
-
-HTTPMultipartBuilder::~HTTPMultipartBuilder() {
+ : boundary_(GenerateBoundaryString()), form_data_(), file_attachments_() {
}
-void HTTPMultipartBuilder::SetGzipEnabled(bool gzip_enabled) {
- gzip_enabled_ = gzip_enabled;
+HTTPMultipartBuilder::~HTTPMultipartBuilder() {
}
void HTTPMultipartBuilder::SetFormData(const std::string& key,
@@ -186,24 +179,13 @@ std::unique_ptr<HTTPBodyStream> HTTPMultipartBuilder::GetBodyStream() {
streams.push_back(
new StringHTTPBodyStream("--" + boundary_ + "--" + kCRLF));
- auto composite =
- std::unique_ptr<HTTPBodyStream>(new CompositeHTTPBodyStream(streams));
- if (gzip_enabled_) {
- return std::unique_ptr<HTTPBodyStream>(
- new GzipHTTPBodyStream(std::move(composite)));
- }
- return composite;
+ return std::unique_ptr<HTTPBodyStream>(new CompositeHTTPBodyStream(streams));
}
-void HTTPMultipartBuilder::PopulateContentHeaders(
- HTTPHeaders* http_headers) const {
+HTTPHeaders::value_type HTTPMultipartBuilder::GetContentType() const {
std::string content_type =
base::StringPrintf("multipart/form-data; boundary=%s", boundary_.c_str());
- (*http_headers)[kContentType] = content_type;
-
- if (gzip_enabled_) {
- (*http_headers)[kContentEncoding] = "gzip";
- }
+ return std::make_pair(kContentType, content_type);
}
void HTTPMultipartBuilder::EraseKey(const std::string& key) {

Powered by Google App Engine
This is Rietveld 408576698