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

Unified Diff: net/base/file_stream.h

Issue 10701050: net: Implement canceling of all async operations in FileStream. (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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
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

Powered by Google App Engine
This is Rietveld 408576698