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

Unified Diff: chrome/browser/extensions/api/sync_file_system/sync_file_system_browsertest.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: chrome/browser/extensions/api/sync_file_system/sync_file_system_browsertest.cc
diff --git a/chrome/browser/extensions/api/sync_file_system/sync_file_system_browsertest.cc b/chrome/browser/extensions/api/sync_file_system/sync_file_system_browsertest.cc
index 5a059fd104c60a10ca5e9acce163af92e6adddd3..1ef9f305b127e37d3880634990e1dca2ab4d50dc 100644
--- a/chrome/browser/extensions/api/sync_file_system/sync_file_system_browsertest.cc
+++ b/chrome/browser/extensions/api/sync_file_system/sync_file_system_browsertest.cc
@@ -18,6 +18,7 @@
#include "chrome/browser/sync_file_system/sync_file_system_service.h"
#include "chrome/browser/sync_file_system/sync_file_system_service_factory.h"
#include "components/drive/service/fake_drive_service.h"
+#include "content/public/browser/storage_partition.h"
#include "extensions/test/extension_test_message_listener.h"
#include "extensions/test/result_catcher.h"
#include "storage/browser/quota/quota_manager.h"
@@ -61,19 +62,6 @@ class SyncFileSystemTest : public extensions::PlatformAppBrowserTest,
: remote_service_(NULL) {
}
- void SetUpInProcessBrowserTestFixture() override {
- ExtensionApiTest::SetUpInProcessBrowserTestFixture();
- real_minimum_preserved_space_ =
- storage::QuotaManager::kMinimumPreserveForSystem;
- storage::QuotaManager::kMinimumPreserveForSystem = 0;
- }
-
- void TearDownInProcessBrowserTestFixture() override {
- storage::QuotaManager::kMinimumPreserveForSystem =
- real_minimum_preserved_space_;
- ExtensionApiTest::TearDownInProcessBrowserTestFixture();
- }
-
scoped_refptr<base::SequencedTaskRunner> MakeSequencedTaskRunner() {
scoped_refptr<base::SequencedWorkerPool> worker_pool =
content::BrowserThread::GetBlockingPool();
@@ -113,6 +101,15 @@ class SyncFileSystemTest : public extensions::PlatformAppBrowserTest,
remote_service_->SetSyncEnabled(true);
factory->set_mock_remote_file_service(
std::unique_ptr<RemoteFileSyncService>(remote_service_));
+
+ const int kMeg = 1000 * 1024;
+ storage::TemporaryStorageConfiguration config;
+ config.pool_size = 25 * kMeg;
+ config.per_host_quota = 5 * kMeg;
+ config.must_remain_available = 0;
+ config.refresh_interval = base::TimeDelta::Max();
+ content::BrowserContext::GetDefaultStoragePartition(context)->
+ GetQuotaManager()->SetTemporaryStorageConfiguration(config);
}
// drive::FakeDriveService::ChangeObserver override.

Powered by Google App Engine
This is Rietveld 408576698