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

Unified Diff: webkit/fileapi/sandbox_quota_observer.cc

Issue 11597005: Do not update FileSystemUsageCache if the delta is zero (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/sandbox_quota_observer.cc
diff --git a/webkit/fileapi/sandbox_quota_observer.cc b/webkit/fileapi/sandbox_quota_observer.cc
index e733f59b906e2ba17f8ed0140b1f3dd2dd383edf..9b2e9baf6b47130486fa3744c763519c8e765779 100644
--- a/webkit/fileapi/sandbox_quota_observer.cc
+++ b/webkit/fileapi/sandbox_quota_observer.cc
@@ -34,13 +34,14 @@ void SandboxQuotaObserver::OnStartUpdate(const FileSystemURL& url) {
}
void SandboxQuotaObserver::OnUpdate(const FileSystemURL& url,
- int64 delta) {
+ int64 delta) {
DCHECK(SandboxMountPointProvider::CanHandleType(url.type()));
DCHECK(update_notify_runner_->RunsTasksOnCurrentThread());
FilePath usage_file_path = GetUsageCachePath(url);
if (usage_file_path.empty())
return;
- FileSystemUsageCache::AtomicUpdateUsageByDelta(usage_file_path, delta);
+ if (delta)
kinuko 2012/12/17 08:14:56 nit: while I'm in chrome I may prefer delta != 0
tzik 2012/12/17 08:18:54 Done.
+ FileSystemUsageCache::AtomicUpdateUsageByDelta(usage_file_path, delta);
if (quota_manager_proxy_) {
quota_manager_proxy_->NotifyStorageModified(
quota::QuotaClient::kFileSystem,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698