diff options
Diffstat (limited to 'storage')
-rw-r--r-- | storage/browser/fileapi/file_system_dir_url_request_job.cc | 7 | ||||
-rw-r--r-- | storage/browser/fileapi/file_system_dir_url_request_job.h | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/storage/browser/fileapi/file_system_dir_url_request_job.cc b/storage/browser/fileapi/file_system_dir_url_request_job.cc index c053773..c99454d 100644 --- a/storage/browser/fileapi/file_system_dir_url_request_job.cc +++ b/storage/browser/fileapi/file_system_dir_url_request_job.cc @@ -100,8 +100,8 @@ void FileSystemDirURLRequestJob::StartAsync() { return; } file_system_context_->operation_runner()->ReadDirectory( - url_, - base::Bind(&FileSystemDirURLRequestJob::DidReadDirectory, this)); + url_, base::Bind(&FileSystemDirURLRequestJob::DidReadDirectory, + weak_factory_.GetWeakPtr())); } void FileSystemDirURLRequestJob::DidAttemptAutoMount(base::File::Error result) { @@ -159,7 +159,8 @@ void FileSystemDirURLRequestJob::GetMetadata(size_t index) { file_system_context_->operation_runner()->GetMetadata( url, FileSystemOperation::GET_METADATA_FIELD_SIZE | FileSystemOperation::GET_METADATA_FIELD_LAST_MODIFIED, - base::Bind(&FileSystemDirURLRequestJob::DidGetMetadata, this, index)); + base::Bind(&FileSystemDirURLRequestJob::DidGetMetadata, + weak_factory_.GetWeakPtr(), index)); } void FileSystemDirURLRequestJob::DidGetMetadata( diff --git a/storage/browser/fileapi/file_system_dir_url_request_job.h b/storage/browser/fileapi/file_system_dir_url_request_job.h index 93fdd1f..57b6904 100644 --- a/storage/browser/fileapi/file_system_dir_url_request_job.h +++ b/storage/browser/fileapi/file_system_dir_url_request_job.h @@ -29,6 +29,8 @@ class STORAGE_EXPORT FileSystemDirURLRequestJob : public net::URLRequestJob { const std::string& storage_domain, FileSystemContext* file_system_context); + ~FileSystemDirURLRequestJob() override; + // URLRequestJob methods: void Start() override; void Kill() override; @@ -43,8 +45,6 @@ class STORAGE_EXPORT FileSystemDirURLRequestJob : public net::URLRequestJob { private: class CallbackDispatcher; - ~FileSystemDirURLRequestJob() override; - void StartAsync(); void DidAttemptAutoMount(base::File::Error result); void DidReadDirectory(base::File::Error result, |