Fix two unchecked return values

CID=104234,104664
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10824031

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149970 0039d316-1c4b-4281-b951-d872f2087c98
parent d71d9082
......@@ -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());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment