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..94265846b4f05dbb6c18c31d79a1446e61b26aa7 100644 |
--- a/content/browser/indexed_db/indexed_db_browsertest.cc |
+++ b/content/browser/indexed_db/indexed_db_browsertest.cc |
@@ -122,27 +122,29 @@ 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, |
+ 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)); |
+ 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; |
+ storage::TemporaryStorageConfiguration config; |
+ config.per_host_quota = per_host_quota_kilobytes * KB; |
+ config.pool_size = config.per_host_quota * 5; |
+ config.must_remain_available = 100 * KB * KB; |
+ config.refresh_interval = base::TimeDelta::Max(); |
+ qm->SetTemporaryStorageConfiguration(config); |
} |
virtual int64_t RequestDiskUsage() { |