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

Unified Diff: util/net/http_body.h

Issue 1416493006: Change file op |ssize_t|s to FileOperationResult (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: fixes Created 5 years, 2 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 | « util/file/string_file_test.cc ('k') | util/net/http_body.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/net/http_body.h
diff --git a/util/net/http_body.h b/util/net/http_body.h
index 3cc2f19d01d98ef70dcf6d488f894072a0d411be..1646591ec259d3b5c43ca10b1662313c836deaac 100644
--- a/util/net/http_body.h
+++ b/util/net/http_body.h
@@ -42,7 +42,8 @@ class HTTPBodyStream {
//! \return On success, a positive number indicating the number of bytes
//! actually copied to \a buffer. On failure, a negative number. When
//! the stream has no more data, returns `0`.
- virtual ssize_t GetBytesBuffer(uint8_t* buffer, size_t max_len) = 0;
+ virtual FileOperationResult GetBytesBuffer(uint8_t* buffer,
+ size_t max_len) = 0;
protected:
HTTPBodyStream() {}
@@ -60,7 +61,7 @@ class StringHTTPBodyStream : public HTTPBodyStream {
~StringHTTPBodyStream() override;
// HTTPBodyStream:
- ssize_t GetBytesBuffer(uint8_t* buffer, size_t max_len) override;
+ FileOperationResult GetBytesBuffer(uint8_t* buffer, size_t max_len) override;
private:
std::string string_;
@@ -81,7 +82,7 @@ class FileHTTPBodyStream : public HTTPBodyStream {
~FileHTTPBodyStream() override;
// HTTPBodyStream:
- ssize_t GetBytesBuffer(uint8_t* buffer, size_t max_len) override;
+ FileOperationResult GetBytesBuffer(uint8_t* buffer, size_t max_len) override;
private:
enum FileState {
@@ -115,7 +116,7 @@ class CompositeHTTPBodyStream : public HTTPBodyStream {
~CompositeHTTPBodyStream() override;
// HTTPBodyStream:
- ssize_t GetBytesBuffer(uint8_t* buffer, size_t max_len) override;
+ FileOperationResult GetBytesBuffer(uint8_t* buffer, size_t max_len) override;
private:
PartsList parts_;
« no previous file with comments | « util/file/string_file_test.cc ('k') | util/net/http_body.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698