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

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

Issue 2710663006: Update Crashpad to 4a2043ea65e2641ef1a921801c0aaa15ada02fc7 (Closed)
Patch Set: Update Crashpad to 4a2043ea65e2 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.h
diff --git a/third_party/crashpad/crashpad/util/net/http_multipart_builder.h b/third_party/crashpad/crashpad/util/net/http_multipart_builder.h
index 65602c714235c31b3b12495ae070e8f19e937942..e0c98fa4ef72cd385d396373437007dcaf969a5b 100644
--- a/third_party/crashpad/crashpad/util/net/http_multipart_builder.h
+++ b/third_party/crashpad/crashpad/util/net/http_multipart_builder.h
@@ -34,6 +34,15 @@ class HTTPMultipartBuilder {
HTTPMultipartBuilder();
~HTTPMultipartBuilder();
+ //! \brief Enables or disables `gzip` compression.
+ //!
+ //! \param[in] gzip_enabled Whether to enable or disable `gzip` compression.
+ //!
+ //! When `gzip` compression is enabled, the body stream returned by
+ //! GetBodyStream() will be `gzip`-compressed, and the content headers set by
+ //! PopulateContentHeaders() will contain `Content-Encoding: gzip`.
+ void SetGzipEnabled(bool gzip_enabled);
+
//! \brief Sets a `Content-Disposition: form-data` key-value pair.
//!
//! \param[in] key The key of the form data, specified as the `name` in the
@@ -64,8 +73,11 @@ class HTTPMultipartBuilder {
//! \return A caller-owned HTTPBodyStream object.
std::unique_ptr<HTTPBodyStream> GetBodyStream();
- //! \brief Gets the header pair for `"Content-Type"`.
- HTTPHeaders::value_type GetContentType() const;
+ //! \brief Adds the appropriate content headers to \a http_headers.
+ //!
+ //! Any headers that this method adds will replace existing headers by the
+ //! same name in \a http_headers.
+ void PopulateContentHeaders(HTTPHeaders* http_headers) const;
private:
struct FileAttachment {
@@ -81,6 +93,7 @@ class HTTPMultipartBuilder {
std::string boundary_;
std::map<std::string, std::string> form_data_;
std::map<std::string, FileAttachment> file_attachments_;
+ bool gzip_enabled_;
DISALLOW_COPY_AND_ASSIGN(HTTPMultipartBuilder);
};

Powered by Google App Engine
This is Rietveld 408576698