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

Side by Side Diff: content/shell/browser/layout_test/layout_test_message_filter.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: big delta 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/shell/browser/layout_test/layout_test_message_filter.h" 5 #include "content/shell/browser/layout_test/layout_test_message_filter.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/threading/thread_restrictions.h" 10 #include "base/threading/thread_restrictions.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 policy->GrantReadFileSystem(render_process_id_, *filesystem_id); 112 policy->GrantReadFileSystem(render_process_id_, *filesystem_id);
113 } 113 }
114 114
115 void LayoutTestMessageFilter::OnClearAllDatabases() { 115 void LayoutTestMessageFilter::OnClearAllDatabases() {
116 DCHECK_CURRENTLY_ON(BrowserThread::FILE); 116 DCHECK_CURRENTLY_ON(BrowserThread::FILE);
117 database_tracker_->DeleteDataModifiedSince( 117 database_tracker_->DeleteDataModifiedSince(
118 base::Time(), net::CompletionCallback()); 118 base::Time(), net::CompletionCallback());
119 } 119 }
120 120
121 void LayoutTestMessageFilter::OnSetDatabaseQuota(int quota) { 121 void LayoutTestMessageFilter::OnSetDatabaseQuota(int quota) {
122 quota_manager_->SetTemporaryGlobalOverrideQuota( 122 storage::TemporaryStorageConfiguration config;
123 quota * storage::QuotaManager::kPerHostTemporaryPortion, 123 config.per_host_quota = quota;
124 storage::QuotaCallback()); 124 config.pool_size = 5 * quota;
125 config.must_remain_available = quota;
126 config.refresh_interval = base::TimeDelta::Max();
127 quota_manager_->SetTemporaryStorageConfiguration(config);
125 } 128 }
126 129
127 void LayoutTestMessageFilter::OnSimulateWebNotificationClick( 130 void LayoutTestMessageFilter::OnSimulateWebNotificationClick(
128 const std::string& title, int action_index) { 131 const std::string& title, int action_index) {
129 LayoutTestNotificationManager* manager = 132 LayoutTestNotificationManager* manager =
130 LayoutTestContentBrowserClient::Get()->GetLayoutTestNotificationManager(); 133 LayoutTestContentBrowserClient::Get()->GetLayoutTestNotificationManager();
131 if (manager) 134 if (manager)
132 manager->SimulateClick(title, action_index); 135 manager->SimulateClick(title, action_index);
133 } 136 }
134 137
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 const base::DictionaryValue& changed_layout_test_runtime_flags) { 198 const base::DictionaryValue& changed_layout_test_runtime_flags) {
196 BlinkTestController::Get()->OnLayoutTestRuntimeFlagsChanged( 199 BlinkTestController::Get()->OnLayoutTestRuntimeFlagsChanged(
197 render_process_id_, changed_layout_test_runtime_flags); 200 render_process_id_, changed_layout_test_runtime_flags);
198 } 201 }
199 202
200 void LayoutTestMessageFilter::OnTestFinishedInSecondaryRenderer() { 203 void LayoutTestMessageFilter::OnTestFinishedInSecondaryRenderer() {
201 BlinkTestController::Get()->OnTestFinishedInSecondaryRenderer(); 204 BlinkTestController::Get()->OnTestFinishedInSecondaryRenderer();
202 } 205 }
203 206
204 } // namespace content 207 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698