| Index: base/file_descriptor_posix.h
|
| diff --git a/base/file_descriptor_posix.h b/base/file_descriptor_posix.h
|
| index abc07893fafd2df96c9b44664d179920da244d3c..093dd2fdb37abe01513863bed3e69d3747256792 100644
|
| --- a/base/file_descriptor_posix.h
|
| +++ b/base/file_descriptor_posix.h
|
| @@ -5,6 +5,8 @@
|
| #ifndef BASE_FILE_DESCRIPTOR_POSIX_H_
|
| #define BASE_FILE_DESCRIPTOR_POSIX_H_
|
|
|
| +#include "base/files/file.h"
|
| +
|
| namespace base {
|
|
|
| // -----------------------------------------------------------------------------
|
| @@ -16,13 +18,12 @@ namespace base {
|
| // above the template specialisation for this structure.
|
| // -----------------------------------------------------------------------------
|
| struct FileDescriptor {
|
| - FileDescriptor()
|
| - : fd(-1),
|
| - auto_close(false) { }
|
| + FileDescriptor() : fd(-1), auto_close(false) {}
|
| +
|
| + FileDescriptor(int ifd, bool iauto_close) : fd(ifd), auto_close(iauto_close) {
|
| + }
|
|
|
| - FileDescriptor(int ifd, bool iauto_close)
|
| - : fd(ifd),
|
| - auto_close(iauto_close) { }
|
| + FileDescriptor(File file) : fd(file.TakePlatformFile()), auto_close(true) {}
|
|
|
| bool operator==(const FileDescriptor& other) const {
|
| return (fd == other.fd && auto_close == other.auto_close);
|
|
|