summaryrefslogtreecommitdiffstats
path: root/chromeos/dbus
diff options
context:
space:
mode:
authorpaivanof@gmail.com <paivanof@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-06 00:29:51 +0000
committerpaivanof@gmail.com <paivanof@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-06 00:29:51 +0000
commitaab1b9ead19f21af4f752c4a52beed65009d96fb (patch)
tree3679bc3c3bd80678a9fb2ab383aa6834679506d0 /chromeos/dbus
parent25524c044d4aefd6902d4245b66980c46669e145 (diff)
downloadchromium_src-aab1b9ead19f21af4f752c4a52beed65009d96fb.zip
chromium_src-aab1b9ead19f21af4f752c4a52beed65009d96fb.tar.gz
chromium_src-aab1b9ead19f21af4f752c4a52beed65009d96fb.tar.bz2
net: Implement canceling of all async operations in FileStream.
Canceling of async operations allows to not wait for their completion in FileStream's destructor. Other related changes include: - Got rid of FileStream::Close() and FileStream::CloseSync() methods because reuse of FileStream object doesn't make much sense, it should be destroyed instead. - Changed FileStream to always acquire ownership of the PlatformFile it was given. Fixed usages of FileStream where no ownership was assumed, introduced new helper functions in base/platform_file.h on the way. - FileStream's destructor now always closes the file. If file was opened with PLATFORM_FILE_ASYNC then actual closing is done asynchronously, destructor doesn't wait for that and returns immediately. When file was opened without PLATFORM_FILE_ASYNC closing is done synchronously and the thread doing that should be allowed to do IO operations. - Implementation of FileStream is refactored. FileStream is now just a wrapper around internal object that does all actual work and that can be easily orphaned in the destructor to not block on the actual file descriptor closing. All platform-independent code is extracted into a special file and amount of platform-dependent code is minimized. BUG=115067, 112474 TEST=net_unittests Review URL: https://chromiumcodereview.appspot.com/10701050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166091 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/dbus')
-rw-r--r--chromeos/dbus/debug_daemon_client.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/chromeos/dbus/debug_daemon_client.cc b/chromeos/dbus/debug_daemon_client.cc
index 4bd6464..3d719f2 100644
--- a/chromeos/dbus/debug_daemon_client.cc
+++ b/chromeos/dbus/debug_daemon_client.cc
@@ -51,9 +51,7 @@ class PipeReader {
}
virtual ~PipeReader() {
- if (pipe_fd_[0] != -1)
- if (HANDLE_EINTR(close(pipe_fd_[0])) < 0)
- PLOG(ERROR) << "close[0]";
+ // Don't close pipe_fd_[0] as it's closed by data_stream_.
if (pipe_fd_[1] != -1)
if (HANDLE_EINTR(close(pipe_fd_[1])) < 0)
PLOG(ERROR) << "close[1]";