summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi
diff options
context:
space:
mode:
authorkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-27 10:14:45 +0000
committerkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-27 10:14:45 +0000
commit10510463affa3e729dc71d4aa82b7e5f1cbdd3cb (patch)
tree5079157a00e25795a8927efa6ea1ad56d819365a /webkit/fileapi
parent82850d067269c1d2ea7674d41c9529024f393d81 (diff)
downloadchromium_src-10510463affa3e729dc71d4aa82b7e5f1cbdd3cb.zip
chromium_src-10510463affa3e729dc71d4aa82b7e5f1cbdd3cb.tar.gz
chromium_src-10510463affa3e729dc71d4aa82b7e5f1cbdd3cb.tar.bz2
Make LocalFileReader deletable at any time and add unittests.
Changed the internal Open() logic not to deal with raw PlatformFile handle but instead to rely on net::FileStream's destructor to close the file. Also adding more specific comment to FileReader interface. BUG=123570 TEST=unit_tests:LocalFileReader.* Review URL: https://chromiumcodereview.appspot.com/10234006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134248 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/fileapi')
-rw-r--r--webkit/fileapi/file_system_url_request_job.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/webkit/fileapi/file_system_url_request_job.cc b/webkit/fileapi/file_system_url_request_job.cc
index 8b39722..b76e11e 100644
--- a/webkit/fileapi/file_system_url_request_job.cc
+++ b/webkit/fileapi/file_system_url_request_job.cc
@@ -97,7 +97,7 @@ bool FileSystemURLRequestJob::ReadRawData(net::IOBuffer* dest, int dest_size,
const int rv = reader_->Read(dest, dest_size,
base::Bind(&FileSystemURLRequestJob::DidRead,
- base::Unretained(this)));
+ weak_factory_.GetWeakPtr()));
if (rv >= 0) {
// Data is immediately available.
*bytes_read = rv;