Index: content/browser/indexed_db/indexed_db_browsertest.cc |
diff --git a/content/browser/indexed_db/indexed_db_browsertest.cc b/content/browser/indexed_db/indexed_db_browsertest.cc |
index 52b1192a6e537513b0a895fb967da0c6ef0b4187..fe07e681a25629292a3a18cd9a90cf9b6111c6cf 100644 |
--- a/content/browser/indexed_db/indexed_db_browsertest.cc |
+++ b/content/browser/indexed_db/indexed_db_browsertest.cc |
@@ -122,27 +122,25 @@ class IndexedDBBrowserTest : public ContentBrowserTest, |
return static_cast<IndexedDBContextImpl*>(partition->GetIndexedDBContext()); |
} |
- void SetQuota(int quota_kilobytes) { |
- const int kTemporaryStorageQuotaSize = |
- quota_kilobytes * 1024 * QuotaManager::kPerHostTemporaryPortion; |
- SetTempQuota(kTemporaryStorageQuotaSize, |
- BrowserContext::GetDefaultStoragePartition( |
- shell()->web_contents()->GetBrowserContext())->GetQuotaManager()); |
+ void SetQuota(int per_host_quota_kilobytes) { |
+ SetTempQuota(per_host_quota_kilobytes, |
+ BrowserContext::GetDefaultStoragePartition( |
+ shell()->web_contents()->GetBrowserContext()) |
+ ->GetQuotaManager()); |
} |
- static void SetTempQuota(int64_t bytes, scoped_refptr<QuotaManager> qm) { |
+ static void SetTempQuota(int per_host_quota_kilobytes, |
+ scoped_refptr<QuotaManager> qm) { |
if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) { |
- BrowserThread::PostTask( |
- BrowserThread::IO, FROM_HERE, |
- base::Bind(&IndexedDBBrowserTest::SetTempQuota, bytes, qm)); |
+ BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, |
+ base::Bind(&IndexedDBBrowserTest::SetTempQuota, |
+ per_host_quota_kilobytes, qm)); |
return; |
} |
DCHECK_CURRENTLY_ON(BrowserThread::IO); |
- qm->SetTemporaryGlobalOverrideQuota(bytes, storage::QuotaCallback()); |
- // Don't return until the quota has been set. |
- scoped_refptr<base::ThreadTestHelper> helper(new base::ThreadTestHelper( |
- BrowserThread::GetTaskRunnerForThread(BrowserThread::DB))); |
- ASSERT_TRUE(helper->Run()); |
+ const int KB = 1024; |
+ qm->SetQuotaSettings( |
+ storage::GetHardCodedSettings(per_host_quota_kilobytes * KB)); |
} |
virtual int64_t RequestDiskUsage() { |