Chromium Code Reviews| Index: net/base/file_stream.h |
| =================================================================== |
| --- net/base/file_stream.h (revision 148849) |
| +++ net/base/file_stream.h (working copy) |
| @@ -40,7 +40,9 @@ |
| // |net_log| is the net log pointer to use to create a |BoundNetLog|. May be |
| // NULL if logging is not needed. |
| // The already opened file will not be automatically closed when FileStream |
| - // is destructed. |
| + // is destroyed. |
| + // Note: new FileStream object takes ownership of the PlatformFile and will |
|
willchan no longer on Chromium
2012/08/14 19:23:26
Nit: grammar is a bit off. Either it should be "th
|
| + // close it on destruction. |
| FileStream(base::PlatformFile file, int flags, net::NetLog* net_log); |
| // If the file stream was opened with Open() or OpenSync(), the underlying |
| @@ -62,7 +64,8 @@ |
| // Call this method to close the FileStream synchronously. |
| // It is OK to call CloseSync() multiple times. Redundant calls are |
| // ignored. Note that if there are any pending async operations, they'll |
| - // be aborted. |
| + // be aborted and actual closing of the stream will happen asynchronously |
| + // (to avoid races with async operation). |
| virtual void CloseSync(); |
| // Call this method to open the FileStream asynchronously. The remaining |