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

Unified Diff: base/files/file.cc

Issue 201083002: Base: Make base::File use ScopedFD on POSIX. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DCHECK fd >= -1 Created 6 years, 9 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 | « base/files/file.h ('k') | base/files/file_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file.cc
diff --git a/base/files/file.cc b/base/files/file.cc
index 478f9028443437c4a14480f11fe864132f02252b..cd167b16074ec2ff98dbaa4a99a6ae1412c06c30 100644
--- a/base/files/file.cc
+++ b/base/files/file.cc
@@ -40,6 +40,9 @@ File::File(PlatformFile platform_file)
error_details_(FILE_OK),
created_(false),
async_(false) {
+#if defined(OS_POSIX)
+ DCHECK_GE(platform_file, -1);
+#endif
}
File::File(RValue other)
@@ -50,7 +53,6 @@ File::File(RValue other)
}
File::~File() {
- Close();
}
File& File::operator=(RValue other) {
« no previous file with comments | « base/files/file.h ('k') | base/files/file_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698