OLD | NEW |
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 Loading... |
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 quota_manager_->SetQuotaSettings(storage::GetHardCodedSettings(quota)); |
123 quota * storage::QuotaManager::kPerHostTemporaryPortion, | |
124 storage::QuotaCallback()); | |
125 } | 123 } |
126 | 124 |
127 void LayoutTestMessageFilter::OnSimulateWebNotificationClick( | 125 void LayoutTestMessageFilter::OnSimulateWebNotificationClick( |
128 const std::string& title, | 126 const std::string& title, |
129 int action_index, | 127 int action_index, |
130 const base::NullableString16& reply) { | 128 const base::NullableString16& reply) { |
131 LayoutTestNotificationManager* manager = | 129 LayoutTestNotificationManager* manager = |
132 LayoutTestContentBrowserClient::Get()->GetLayoutTestNotificationManager(); | 130 LayoutTestContentBrowserClient::Get()->GetLayoutTestNotificationManager(); |
133 if (manager) | 131 if (manager) |
134 manager->SimulateClick(title, action_index, reply); | 132 manager->SimulateClick(title, action_index, reply); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 const base::DictionaryValue& changed_layout_test_runtime_flags) { | 195 const base::DictionaryValue& changed_layout_test_runtime_flags) { |
198 BlinkTestController::Get()->OnLayoutTestRuntimeFlagsChanged( | 196 BlinkTestController::Get()->OnLayoutTestRuntimeFlagsChanged( |
199 render_process_id_, changed_layout_test_runtime_flags); | 197 render_process_id_, changed_layout_test_runtime_flags); |
200 } | 198 } |
201 | 199 |
202 void LayoutTestMessageFilter::OnTestFinishedInSecondaryRenderer() { | 200 void LayoutTestMessageFilter::OnTestFinishedInSecondaryRenderer() { |
203 BlinkTestController::Get()->OnTestFinishedInSecondaryRenderer(); | 201 BlinkTestController::Get()->OnTestFinishedInSecondaryRenderer(); |
204 } | 202 } |
205 | 203 |
206 } // namespace content | 204 } // namespace content |
OLD | NEW |