Chromium Code Reviews| Index: util/net/http_body.h |
| diff --git a/util/net/http_body.h b/util/net/http_body.h |
| index 0347e636f1b103d6910d7f2c540cd5587e949977..82ee5e0f41cd3d1bacb2d465e0de66942fa64102 100644 |
| --- a/util/net/http_body.h |
| +++ b/util/net/http_body.h |
| @@ -23,6 +23,7 @@ |
| #include "base/basictypes.h" |
| #include "base/files/file_path.h" |
| +#include "util/file/file_io.h" |
| namespace crashpad { |
| @@ -83,18 +84,17 @@ class FileHTTPBodyStream : public HTTPBodyStream { |
| ssize_t GetBytesBuffer(uint8_t* buffer, size_t max_len) override; |
| private: |
| - enum InvalidFD { |
| - kUnopenedFile = -1, |
| - kFileOpenError = -2, |
| - kClosedAtEOF = -3, |
| + enum FileState { |
| + kUnopenedFile, |
| + kFileOpenError, |
| + kClosedAtEOF, |
| + kReading, |
| }; |
| base::FilePath path_; |
|
Mark Mentovai
2014/12/19 22:55:56
Nit: blank line not necessary now that there’s no
scottmg
2014/12/19 22:58:33
Done.
|
| - // If |fd_| is greater than or equal to zero, it is an opened descriptor |
| - // from which an instance of this class is reading. If |fd_| is less than |
| - // zero, the value corresponds to an InvalidFD value. |
| - int fd_; |
| + FileState file_state_; |
|
Mark Mentovai
2014/12/19 22:55:55
Nit: sort for optimal structure packing, file_ pre
scottmg
2014/12/19 22:58:33
Done.
|
| + ScopedFileHandle file_; |
| DISALLOW_COPY_AND_ASSIGN(FileHTTPBodyStream); |
| }; |