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

Unified Diff: base/files/file.h

Issue 172673002: Base: Don't check for thread restrictions when closing a file doesn't do IO. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | « no previous file | 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.h
diff --git a/base/files/file.h b/base/files/file.h
index a8cb16cb45722aa14523a1e28d74e85f2f61c238..8597473cc7a47ea381ce08c5b7646ea35524fa83 100644
--- a/base/files/file.h
+++ b/base/files/file.h
@@ -171,7 +171,11 @@ class BASE_EXPORT File {
// FLAG_CREATE_ALWAYS), and false otherwise.
bool created() const { return created_; }
- // Returns the OS result of opening this file.
+ // Returns the OS result of opening this file. Note that the way to verify
+ // the success of the operation is to use IsValid(), not this method:
+ // File file(name, flags);
+ // if (!file.IsValid())
+ // return;
Error error_details() const { return error_details_; }
PlatformFile GetPlatformFile() const { return file_; }
« no previous file with comments | « no previous file | base/files/file_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698