diff options
author | tzik@chromium.org <tzik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-17 10:05:31 +0000 |
---|---|---|
committer | tzik@chromium.org <tzik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-17 10:05:31 +0000 |
commit | f3fdedc5659affe6342e342b8e829b9b59b5637d (patch) | |
tree | 0ee13345bbf0881356e3827255e1fa9941c59e8c /webkit/fileapi | |
parent | 1bedfcfa4f0c64c4a7edff08eb52cb58a2c13425 (diff) | |
download | chromium_src-f3fdedc5659affe6342e342b8e829b9b59b5637d.zip chromium_src-f3fdedc5659affe6342e342b8e829b9b59b5637d.tar.gz chromium_src-f3fdedc5659affe6342e342b8e829b9b59b5637d.tar.bz2 |
Do not update FileSystemUsageCache if the delta is zero
BUG=166158
Review URL: https://chromiumcodereview.appspot.com/11597005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173439 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/fileapi')
-rw-r--r-- | webkit/fileapi/sandbox_quota_observer.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/webkit/fileapi/sandbox_quota_observer.cc b/webkit/fileapi/sandbox_quota_observer.cc index e733f59..29e1102 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 != 0) + FileSystemUsageCache::AtomicUpdateUsageByDelta(usage_file_path, delta); if (quota_manager_proxy_) { quota_manager_proxy_->NotifyStorageModified( quota::QuotaClient::kFileSystem, |