| 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 "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
| 8 #include "base/threading/thread_restrictions.h" | 8 #include "base/threading/thread_restrictions.h" |
| 9 #include "content/public/browser/child_process_security_policy.h" | 9 #include "content/public/browser/child_process_security_policy.h" |
| 10 #include "content/shell/browser/layout_test/layout_test_browser_context.h" | 10 #include "content/shell/browser/layout_test/layout_test_browser_context.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 files.AddPath(absolute_filenames[i], NULL); | 93 files.AddPath(absolute_filenames[i], NULL); |
| 94 if (!policy->CanReadFile(render_process_id_, absolute_filenames[i])) | 94 if (!policy->CanReadFile(render_process_id_, absolute_filenames[i])) |
| 95 policy->GrantReadFile(render_process_id_, absolute_filenames[i]); | 95 policy->GrantReadFile(render_process_id_, absolute_filenames[i]); |
| 96 } | 96 } |
| 97 *filesystem_id = | 97 *filesystem_id = |
| 98 storage::IsolatedContext::GetInstance()->RegisterDraggedFileSystem(files); | 98 storage::IsolatedContext::GetInstance()->RegisterDraggedFileSystem(files); |
| 99 policy->GrantReadFileSystem(render_process_id_, *filesystem_id); | 99 policy->GrantReadFileSystem(render_process_id_, *filesystem_id); |
| 100 } | 100 } |
| 101 | 101 |
| 102 void LayoutTestMessageFilter::OnClearAllDatabases() { | 102 void LayoutTestMessageFilter::OnClearAllDatabases() { |
| 103 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 103 DCHECK_CURRENTLY_ON(BrowserThread::FILE); |
| 104 database_tracker_->DeleteDataModifiedSince( | 104 database_tracker_->DeleteDataModifiedSince( |
| 105 base::Time(), net::CompletionCallback()); | 105 base::Time(), net::CompletionCallback()); |
| 106 } | 106 } |
| 107 | 107 |
| 108 void LayoutTestMessageFilter::OnSetDatabaseQuota(int quota) { | 108 void LayoutTestMessageFilter::OnSetDatabaseQuota(int quota) { |
| 109 quota_manager_->SetTemporaryGlobalOverrideQuota( | 109 quota_manager_->SetTemporaryGlobalOverrideQuota( |
| 110 quota * storage::QuotaManager::kPerHostTemporaryPortion, | 110 quota * storage::QuotaManager::kPerHostTemporaryPortion, |
| 111 storage::QuotaCallback()); | 111 storage::QuotaCallback()); |
| 112 } | 112 } |
| 113 | 113 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 ShellNetworkDelegate::SetAcceptAllCookies(accept); | 158 ShellNetworkDelegate::SetAcceptAllCookies(accept); |
| 159 } | 159 } |
| 160 | 160 |
| 161 void LayoutTestMessageFilter::OnDeleteAllCookies() { | 161 void LayoutTestMessageFilter::OnDeleteAllCookies() { |
| 162 request_context_getter_->GetURLRequestContext()->cookie_store() | 162 request_context_getter_->GetURLRequestContext()->cookie_store() |
| 163 ->GetCookieMonster() | 163 ->GetCookieMonster() |
| 164 ->DeleteAllAsync(net::CookieMonster::DeleteCallback()); | 164 ->DeleteAllAsync(net::CookieMonster::DeleteCallback()); |
| 165 } | 165 } |
| 166 | 166 |
| 167 } // namespace content | 167 } // namespace content |
| OLD | NEW |