Index: util/file/file_writer.h |
diff --git a/util/file/file_writer.h b/util/file/file_writer.h |
index 62fddf5f37180ef39c78c3c6ecfeda726d6d30aa..f2bc452d9ca46acbcc3271d9873d351619d72e10 100644 |
--- a/util/file/file_writer.h |
+++ b/util/file/file_writer.h |
@@ -15,15 +15,12 @@ |
#ifndef CRASHPAD_UTIL_FILE_FILE_WRITER_H_ |
#define CRASHPAD_UTIL_FILE_FILE_WRITER_H_ |
-#include <fcntl.h> |
-#include <stddef.h> |
+#include <sys/types.h> |
-#include <string> |
#include <vector> |
#include "base/basictypes.h" |
#include "base/files/file_path.h" |
-#include "build/build_config.h" |
#include "util/file/file_io.h" |
namespace crashpad { |
@@ -44,6 +41,8 @@ struct WritableIoVec { |
//! \brief An interface to write to files and other file-like objects with |
//! semantics matching the underlying platform (POSIX or Windows). |
+// |
+// TODO(mark): Templatize and share more with FileReaderInterface? |
class FileWriterInterface { |
public: |
//! \brief Wraps WriteFile(), or provides an implementation with identical |
@@ -69,6 +68,9 @@ class FileWriterInterface { |
//! |
//! \return The return value of LoggingFileSeek(). `-1` on failure, |
//! with an error message logged. |
+ // |
+ // TODO(mark): This may be better with a common base of FileWriterInterface |
+ // and FileReaderInterface to declaring Seek(). |
virtual FileOffset Seek(FileOffset offset, int whence) = 0; |
protected: |
@@ -110,7 +112,7 @@ class WeakFileHandleFileWriter : public FileWriterInterface { |
FileHandle file_handle_; // weak |
// FileWriter uses this class as its internal implementation, and it needs to |
- // be able to call set_file_handle(). FileWriter cannot initialize an |
+ // be able to call set_file_handle(). FileWriter cannot initialize a |
// WeakFileHandleFileWriter with a correct file descriptor at the time of |
// construction because no file descriptor will be available until |
// FileWriter::Open() is called. |