Chromium Code Reviews| Index: content/browser/fileapi/fileapi_message_filter.cc |
| diff --git a/content/browser/fileapi/fileapi_message_filter.cc b/content/browser/fileapi/fileapi_message_filter.cc |
| index 70ffc75bc58a42497066b1bcb0347c912ce82ba0..c36a6e12ac26404426254a4f08af18b245f51cdb 100644 |
| --- a/content/browser/fileapi/fileapi_message_filter.cc |
| +++ b/content/browser/fileapi/fileapi_message_filter.cc |
| @@ -136,8 +136,10 @@ void FileAPIMessageFilter::OnChannelClosing() { |
| open_filesystem_urls_.begin(); |
| iter != open_filesystem_urls_.end(); ++iter) { |
| FileSystemURL url(*iter); |
| - FileSystemOperation* operation = context_->CreateFileSystemOperation(url); |
| - operation->NotifyCloseFile(url); |
| + FileSystemOperation* operation = context_->CreateFileSystemOperation( |
| + url, NULL); |
| + if (operation) |
| + operation->NotifyCloseFile(url); |
| } |
| } |
| @@ -449,7 +451,8 @@ void FileAPIMessageFilter::OnNotifyCloseFile(const GURL& path) { |
| // Do not use GetNewOperation() here, because NotifyCloseFile is a one-way |
| // operation that does not have request_id by which we respond back. |
| - FileSystemOperation* operation = context_->CreateFileSystemOperation(url); |
| + FileSystemOperation* operation = context_->CreateFileSystemOperation( |
| + url, NULL); |
| if (operation) |
| operation->NotifyCloseFile(url); |
| } |
| @@ -493,7 +496,8 @@ void FileAPIMessageFilter::OnSyncGetPlatformPath( |
| // TODO(kinuko): this hack should go away once appropriate upload-stream |
| // handling based on element types is supported. |
| LocalFileSystemOperation* operation = |
| - context_->CreateFileSystemOperation(url)->AsLocalFileSystemOperation(); |
| + context_->CreateFileSystemOperation( |
| + url, NULL)->AsLocalFileSystemOperation(); |
| DCHECK(operation); |
| operation->SyncGetPlatformPath(url, platform_path); |
|
kinuko
2012/09/06 09:15:10
Can you change this to check the return value as w
calvinlo
2012/09/06 11:19:32
Done.
|
| } |
| @@ -793,7 +797,7 @@ FileSystemOperation* FileAPIMessageFilter::GetNewOperation( |
| const FileSystemURL& target_url, |
| int request_id) { |
| FileSystemOperation* operation = |
| - context_->CreateFileSystemOperation(target_url); |
| + context_->CreateFileSystemOperation(target_url, NULL); |
| DCHECK(operation); |
|
kinuko
2012/09/06 09:15:10
This needs to check the return value as well. Yes
calvinlo
2012/09/06 11:19:32
Done, although I did it as:
if (!operation)
retu
|
| operations_.AddWithID(operation, request_id); |
| return operation; |