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

Side by Side Diff: third_party/crashpad/crashpad/util/net/http_transport.h

Issue 2555353002: Update Crashpad to 32981a3ee9d7c2769fb27afa038fe2e194cfa329 (Closed)
Patch Set: fix readme Created 4 years 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 2014 The Crashpad Authors. All rights reserved. 1 // Copyright 2014 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 void SetBodyStream(std::unique_ptr<HTTPBodyStream> stream); 67 void SetBodyStream(std::unique_ptr<HTTPBodyStream> stream);
68 68
69 //! \brief Sets the timeout for the HTTP request. The default is 15 seconds. 69 //! \brief Sets the timeout for the HTTP request. The default is 15 seconds.
70 //! 70 //!
71 //! \param[in] timeout The request timeout, in seconds. 71 //! \param[in] timeout The request timeout, in seconds.
72 void SetTimeout(double timeout); 72 void SetTimeout(double timeout);
73 73
74 //! \brief Performs the HTTP request with the configured parameters and waits 74 //! \brief Performs the HTTP request with the configured parameters and waits
75 //! for the execution to complete. 75 //! for the execution to complete.
76 //! 76 //!
77 //! \param[out] response On success, this will be set to the HTTP response 77 //! \param[out] response_body On success, this will be set to the HTTP
78 //! body. This parameter is optional and may be set to `nullptr` if the 78 //! response body. This parameter is optional and may be set to `nullptr`
79 //! response body is not required. 79 //! if the response body is not required.
80 //! 80 //!
81 //! \return Whether or not the request was successful, defined as returning 81 //! \return Whether or not the request was successful, defined as returning
82 //! a HTTP status 200 (OK) code. 82 //! a HTTP status 200 (OK) code.
83 virtual bool ExecuteSynchronously(std::string* response_body) = 0; 83 virtual bool ExecuteSynchronously(std::string* response_body) = 0;
84 84
85 protected: 85 protected:
86 HTTPTransport(); 86 HTTPTransport();
87 87
88 const std::string& url() const { return url_; } 88 const std::string& url() const { return url_; }
89 const std::string& method() const { return method_; } 89 const std::string& method() const { return method_; }
90 const HTTPHeaders& headers() const { return headers_; } 90 const HTTPHeaders& headers() const { return headers_; }
91 HTTPBodyStream* body_stream() const { return body_stream_.get(); } 91 HTTPBodyStream* body_stream() const { return body_stream_.get(); }
92 double timeout() const { return timeout_; } 92 double timeout() const { return timeout_; }
93 93
94 private: 94 private:
95 std::string url_; 95 std::string url_;
96 std::string method_; 96 std::string method_;
97 HTTPHeaders headers_; 97 HTTPHeaders headers_;
98 std::unique_ptr<HTTPBodyStream> body_stream_; 98 std::unique_ptr<HTTPBodyStream> body_stream_;
99 double timeout_; 99 double timeout_;
100 100
101 DISALLOW_COPY_AND_ASSIGN(HTTPTransport); 101 DISALLOW_COPY_AND_ASSIGN(HTTPTransport);
102 }; 102 };
103 103
104 } // namespace crashpad 104 } // namespace crashpad
105 105
106 #endif // CRASHPAD_UTIL_NET_HTTP_TRANSPORT_H_ 106 #endif // CRASHPAD_UTIL_NET_HTTP_TRANSPORT_H_
OLDNEW
« no previous file with comments | « third_party/crashpad/crashpad/util/misc/uuid_test.cc ('k') | third_party/crashpad/crashpad/util/net/http_transport_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698