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

Unified Diff: chromeos/dbus/debug_daemon_client.cc

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
« no previous file with comments | « no previous file | net/base/file_stream.h » ('j') | net/base/file_stream_posix.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/debug_daemon_client.cc
===================================================================
--- chromeos/dbus/debug_daemon_client.cc (revision 145483)
+++ chromeos/dbus/debug_daemon_client.cc (working copy)
@@ -51,9 +51,12 @@
}
virtual ~PipeReader() {
- if (pipe_fd_[0] != -1)
- if (HANDLE_EINTR(close(pipe_fd_[0])) < 0)
+ if (pipe_fd_[0] != -1) {
+ if (data_stream_.get())
+ data_stream_->CloseAndCancelAsync();
+ else if (HANDLE_EINTR(close(pipe_fd_[0])) < 0)
PLOG(ERROR) << "close[0]";
+ }
if (pipe_fd_[1] != -1)
if (HANDLE_EINTR(close(pipe_fd_[1])) < 0)
PLOG(ERROR) << "close[1]";
« no previous file with comments | « no previous file | net/base/file_stream.h » ('j') | net/base/file_stream_posix.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698