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

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 147715)
+++ 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
+ // 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
@@ -61,8 +63,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.
+ // ignored. Note that if there are any pending async operations, then
+ // behavior of this method is equivalent to CloseAndCancelAsync().
willchan no longer on Chromium 2012/07/27 21:19:47 You can undo this comment change, right?
virtual void CloseSync();
// Call this method to open the FileStream asynchronously. The remaining

Powered by Google App Engine
This is Rietveld 408576698