Index: base/files/file.cc |
diff --git a/base/files/file.cc b/base/files/file.cc |
index ea8dbf27ac1770d88fc6ce933a4bdd331820d2d9..7867d63878f8c2d0d763e76c6ba7a647402882fa 100644 |
--- a/base/files/file.cc |
+++ b/base/files/file.cc |
@@ -19,14 +19,16 @@ File::Info::~Info() { |
File::File() |
: error_details_(FILE_ERROR_FAILED), |
created_(false), |
- async_(false) { |
+ async_(false), |
+ flags_(0) { |
} |
#if !defined(OS_NACL) |
File::File(const FilePath& name, uint32 flags) |
: error_details_(FILE_OK), |
created_(false), |
- async_(false) { |
+ async_(false), |
+ flags_(0) { |
Initialize(name, flags); |
} |
#endif |
@@ -35,7 +37,8 @@ File::File(PlatformFile platform_file) |
: file_(platform_file), |
error_details_(FILE_OK), |
created_(false), |
- async_(false) { |
+ async_(false), |
+ flags_(0) { |
#if defined(OS_POSIX) |
DCHECK_GE(platform_file, -1); |
#endif |
@@ -44,14 +47,16 @@ File::File(PlatformFile platform_file) |
File::File(Error error_details) |
: error_details_(error_details), |
created_(false), |
- async_(false) { |
+ async_(false), |
+ flags_(0) { |
} |
File::File(RValue other) |
: file_(other.object->TakePlatformFile()), |
error_details_(other.object->error_details()), |
created_(other.object->created()), |
- async_(other.object->async_) { |
+ async_(other.object->async_), |
+ flags_(other.object->flags_) { |
} |
File::~File() { |
@@ -66,6 +71,7 @@ File& File::operator=(RValue other) { |
error_details_ = other.object->error_details(); |
created_ = other.object->created(); |
async_ = other.object->async_; |
+ flags_ = other.object->flags_; |
} |
return *this; |
} |
@@ -76,6 +82,7 @@ void File::Initialize(const FilePath& name, uint32 flags) { |
error_details_ = FILE_ERROR_ACCESS_DENIED; |
return; |
} |
+ flags_ = flags; |
InitializeUnsafe(name, flags); |
} |
#endif |