Index: base/files/file_proxy.h |
diff --git a/base/files/file_proxy.h b/base/files/file_proxy.h |
index 3c834f673eac90570c6be71095768ca8f90fdebf..f02960b8580889ff83d9ba320ee435322b4951f1 100644 |
--- a/base/files/file_proxy.h |
+++ b/base/files/file_proxy.h |
@@ -25,8 +25,11 @@ |
// same rules of the equivalent File method, as they are implemented by bouncing |
// the operation to File using a TaskRunner. |
// |
-// This class performs automatic proxying to close the underlying file at |
-// destruction. |
+// This class does NOT perform automatic proxying to close the underlying file |
+// at destruction, which means that it may potentially close the file in the |
+// wrong thread (the current thread). If that is not appropriate, the caller |
+// must ensure that Close() is called, so that the operation happens on the |
+// desired thread. |
// |
// The TaskRunner is in charge of any sequencing of the operations, but a single |
// operation can be proxied at a time, regardless of the use of a callback. |
@@ -128,7 +131,6 @@ |
private: |
friend class FileHelper; |
void SetFile(File file); |
- TaskRunner* task_runner() { return task_runner_.get(); } |
scoped_refptr<TaskRunner> task_runner_; |
File file_; |