summaryrefslogtreecommitdiffstats
path: root/net/base
diff options
context:
space:
mode:
authorjianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-11 17:42:03 +0000
committerjianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-11 17:42:03 +0000
commite2327e1c76276b05492c4d7909432d323c7fdb55 (patch)
treed536e4e9609062e81844dffd8aa6a579ef7441e4 /net/base
parentc4924c4375f326a6e5a4e6f0f625f88d44389492 (diff)
downloadchromium_src-e2327e1c76276b05492c4d7909432d323c7fdb55.zip
chromium_src-e2327e1c76276b05492c4d7909432d323c7fdb55.tar.gz
chromium_src-e2327e1c76276b05492c4d7909432d323c7fdb55.tar.bz2
Fix ~FileStream in POSIX to auto close if the flag is set. This is left from my
last patch. BUG=none TEST=none Review URL: http://codereview.chromium.org/1989011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46937 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base')
-rw-r--r--net/base/file_stream_posix.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/base/file_stream_posix.cc b/net/base/file_stream_posix.cc
index 735f2b8..8a0f2e3 100644
--- a/net/base/file_stream_posix.cc
+++ b/net/base/file_stream_posix.cc
@@ -311,7 +311,8 @@ FileStream::FileStream(base::PlatformFile file, int flags)
}
FileStream::~FileStream() {
- Close();
+ if (auto_closed_)
+ Close();
}
void FileStream::Close() {