| Index: webkit/fileapi/file_system_usage_cache.cc
|
| diff --git a/webkit/fileapi/file_system_usage_cache.cc b/webkit/fileapi/file_system_usage_cache.cc
|
| index d1bc5c03fc9ca4b5259ccea5c0a0ee56e6d1cfb2..73f4cbed60881f53c05e8c71e6da706a4a0e81e6 100644
|
| --- a/webkit/fileapi/file_system_usage_cache.cc
|
| +++ b/webkit/fileapi/file_system_usage_cache.cc
|
| @@ -86,7 +86,10 @@ bool FileSystemUsageCache::Invalidate(const FilePath& usage_file_path) {
|
| bool FileSystemUsageCache::IsValid(const FilePath& usage_file_path) {
|
| bool is_valid = true;
|
| uint32 dirty = 0;
|
| - Read(usage_file_path, &is_valid, &dirty);
|
| + int64 result = Read(usage_file_path, &is_valid, &dirty);
|
| + if (result < 0)
|
| + return false;
|
| +
|
| return is_valid;
|
| }
|
|
|
| @@ -163,8 +166,11 @@ int FileSystemUsageCache::Write(const FilePath& usage_file_path,
|
|
|
| DCHECK(!usage_file_path.empty());
|
| FilePath temporary_usage_file_path;
|
| - file_util::CreateTemporaryFileInDir(usage_file_path.DirName(),
|
| - &temporary_usage_file_path);
|
| + if (!file_util::CreateTemporaryFileInDir(usage_file_path.DirName(),
|
| + &temporary_usage_file_path)) {
|
| + return -1;
|
| + }
|
| +
|
| int bytes_written = file_util::WriteFile(temporary_usage_file_path,
|
| (const char *)write_pickle.data(),
|
| write_pickle.size());
|
|
|