Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Unified Diff: webkit/fileapi/file_system_usage_cache.cc

Issue 7608011: Simplify directory path accounting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rolled in CR feedback. Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/fileapi/file_system_test_helper.cc ('k') | webkit/fileapi/file_writer_delegate_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 eee383f4a533a48353322a7419f8b560b9f2eb87..6fa788e8fbcc5e6f931c3d28dfb965d1b71ae467 100644
--- a/webkit/fileapi/file_system_usage_cache.cc
+++ b/webkit/fileapi/file_system_usage_cache.cc
@@ -74,6 +74,9 @@ int FileSystemUsageCache::AtomicUpdateUsageByDelta(
// TODO(dmikurube): Make sure that usage_file_path is available.
fs_usage = Read(usage_file_path, &dirty);
+ if (fs_usage < 0)
+ return -1;
+
return Write(usage_file_path, dirty, fs_usage + delta);
}
@@ -144,4 +147,4 @@ int FileSystemUsageCache::Write(const FilePath& usage_file_path,
return -1;
}
-}
+} // namespace fileapi
« no previous file with comments | « webkit/fileapi/file_system_test_helper.cc ('k') | webkit/fileapi/file_writer_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698