summaryrefslogtreecommitdiffstats
path: root/webkit/quota
diff options
context:
space:
mode:
authortzik@chromium.org <tzik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-14 13:22:07 +0000
committertzik@chromium.org <tzik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-14 13:22:07 +0000
commit8bff0e34eb5f15a4f1210239a3aced0df9d5d317 (patch)
treeb907f171aeb77e454059a2e23f2be9d6a2b246d0 /webkit/quota
parent83c7ee874809518fbb13c055f0c1aa8d5de462d7 (diff)
downloadchromium_src-8bff0e34eb5f15a4f1210239a3aced0df9d5d317.zip
chromium_src-8bff0e34eb5f15a4f1210239a3aced0df9d5d317.tar.gz
chromium_src-8bff0e34eb5f15a4f1210239a3aced0df9d5d317.tar.bz2
Fix quota value overflow (reland).
BUG=104111 TEST='QuotaManagerTest.*' Review URL: http://codereview.chromium.org/8528022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109871 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/quota')
-rw-r--r--webkit/quota/quota_manager.cc2
-rw-r--r--webkit/quota/quota_manager_unittest.cc4
2 files changed, 3 insertions, 3 deletions
diff --git a/webkit/quota/quota_manager.cc b/webkit/quota/quota_manager.cc
index 655dade..433e975 100644
--- a/webkit/quota/quota_manager.cc
+++ b/webkit/quota/quota_manager.cc
@@ -755,7 +755,7 @@ class QuotaManager::UpdatePersistentHostQuotaTask
UpdatePersistentHostQuotaTask(
QuotaManager* manager,
const std::string& host,
- int new_quota,
+ int64 new_quota,
const HostQuotaCallback& callback)
: DatabaseTaskBase(manager),
host_(host),
diff --git a/webkit/quota/quota_manager_unittest.cc b/webkit/quota/quota_manager_unittest.cc
index b3d71e4..54f74dd 100644
--- a/webkit/quota/quota_manager_unittest.cc
+++ b/webkit/quota/quota_manager_unittest.cc
@@ -895,10 +895,10 @@ TEST_F(QuotaManagerTest, GetAndSetPerststentHostQuota) {
GetPersistentHostQuota("foo.com");
SetPersistentHostQuota("foo.com", 200);
GetPersistentHostQuota("foo.com");
- SetPersistentHostQuota("foo.com", 300);
+ SetPersistentHostQuota("foo.com", 300000000000ll);
GetPersistentHostQuota("foo.com");
MessageLoop::current()->RunAllPending();
- EXPECT_EQ(300, quota());
+ EXPECT_EQ(300000000000ll, quota());
}
TEST_F(QuotaManagerTest, GetAndSetPersistentUsageAndQuota) {