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

Unified Diff: content/shell/browser/layout_test/layout_test_browser_main_parts.cc

Issue 2592793002: Revert of Change how the quota system computes the total poolsize for temporary storage (Closed)
Patch Set: Created 4 years 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/shell/browser/layout_test/layout_test_browser_main_parts.cc
diff --git a/content/shell/browser/layout_test/layout_test_browser_main_parts.cc b/content/shell/browser/layout_test/layout_test_browser_main_parts.cc
index 7f01424a9aaabf74f974e90d577d13b118fda3b7..acb5e2a44feb53a8edf17c75515247bcb2b9efa6 100644
--- a/content/shell/browser/layout_test/layout_test_browser_main_parts.cc
+++ b/content/shell/browser/layout_test/layout_test_browser_main_parts.cc
@@ -27,6 +27,7 @@
#include "net/base/net_module.h"
#include "net/grit/net_resources.h"
#include "ppapi/features/features.h"
+#include "storage/browser/quota/quota_manager.h"
#include "ui/base/resource/resource_bundle.h"
#include "url/gurl.h"
@@ -50,6 +51,13 @@
namespace content {
+namespace {
+
+// Default quota for each origin is 5MB.
+const int kDefaultLayoutTestQuotaBytes = 5 * 1024 * 1024;
+
+} // namespace
+
LayoutTestBrowserMainParts::LayoutTestBrowserMainParts(
const MainFunctionParams& parameters)
: ShellBrowserMainParts(parameters) {
@@ -64,6 +72,18 @@ void LayoutTestBrowserMainParts::InitializeBrowserContexts() {
}
void LayoutTestBrowserMainParts::InitializeMessageLoopContext() {
+ storage::QuotaManager* quota_manager =
+ BrowserContext::GetDefaultStoragePartition(browser_context())
+ ->GetQuotaManager();
+ BrowserThread::PostTask(
+ BrowserThread::IO,
+ FROM_HERE,
+ base::Bind(&storage::QuotaManager::SetTemporaryGlobalOverrideQuota,
+ quota_manager,
+ kDefaultLayoutTestQuotaBytes *
+ storage::QuotaManager::kPerHostTemporaryPortion,
+ storage::QuotaCallback()));
+
#if BUILDFLAG(ENABLE_PLUGINS)
PluginService* plugin_service = PluginService::GetInstance();
plugin_service_filter_.reset(new ShellPluginServiceFilter);

Powered by Google App Engine
This is Rietveld 408576698