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

Unified Diff: content/browser/quota/storage_monitor_unittest.cc

Issue 1782053004: Change how the quota system computes the total poolsize for temporary storage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 2 months 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
Index: content/browser/quota/storage_monitor_unittest.cc
diff --git a/content/browser/quota/storage_monitor_unittest.cc b/content/browser/quota/storage_monitor_unittest.cc
index 7cbeb9140ee282a0040c544ad2f01b833b833845..6e0b4be54787e90b50f5a1605a58a21ce8513b01 100644
--- a/content/browser/quota/storage_monitor_unittest.cc
+++ b/content/browser/quota/storage_monitor_unittest.cc
@@ -68,11 +68,13 @@ class UsageMockQuotaManager : public QuotaManager {
base::FilePath(),
base::ThreadTaskRunnerHandle::Get().get(),
base::ThreadTaskRunnerHandle::Get().get(),
- special_storage_policy),
+ special_storage_policy,
+ storage::GetTemporaryStorageConfigurationFunc()),
callback_usage_(0),
callback_quota_(0),
callback_status_(kQuotaStatusOk),
- initialized_(false) {}
+ initialized_(false) {
+ }
void SetCallbackParams(int64_t usage, int64_t quota, QuotaStatusCode status) {
initialized_ = true;
@@ -88,7 +90,7 @@ class UsageMockQuotaManager : public QuotaManager {
void GetUsageAndQuotaForWebApps(
const GURL& origin,
StorageType type,
- const GetUsageAndQuotaCallback& callback) override {
+ const UsageAndQuotaCallback& callback) override {
if (initialized_)
callback.Run(callback_status_, callback_usage_, callback_quota_);
else
@@ -103,7 +105,7 @@ class UsageMockQuotaManager : public QuotaManager {
int64_t callback_quota_;
QuotaStatusCode callback_status_;
bool initialized_;
- GetUsageAndQuotaCallback delayed_callback_;
+ UsageAndQuotaCallback delayed_callback_;
};
} // namespace
@@ -649,7 +651,8 @@ class StorageMonitorIntegrationTest : public testing::Test {
storage_policy_ = new MockSpecialStoragePolicy();
quota_manager_ = new QuotaManager(
false, data_dir_.GetPath(), base::ThreadTaskRunnerHandle::Get().get(),
- base::ThreadTaskRunnerHandle::Get().get(), storage_policy_.get());
+ base::ThreadTaskRunnerHandle::Get().get(), storage_policy_.get(),
+ storage::GetTemporaryStorageConfigurationFunc());
client_ = new MockStorageClient(quota_manager_->proxy(),
NULL,

Powered by Google App Engine
This is Rietveld 408576698