OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser/worker_host/worker_process_host.h" | 5 #include "content/browser/worker_host/worker_process_host.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 ChildProcessSecurityPolicy::GetInstance()->Add(id()); | 175 ChildProcessSecurityPolicy::GetInstance()->Add(id()); |
176 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 176 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
177 switches::kDisableFileSystem)) { | 177 switches::kDisableFileSystem)) { |
178 // Grant most file permissions to this worker. | 178 // Grant most file permissions to this worker. |
179 // PLATFORM_FILE_TEMPORARY, PLATFORM_FILE_HIDDEN and | 179 // PLATFORM_FILE_TEMPORARY, PLATFORM_FILE_HIDDEN and |
180 // PLATFORM_FILE_DELETE_ON_CLOSE are not granted, because no existing API | 180 // PLATFORM_FILE_DELETE_ON_CLOSE are not granted, because no existing API |
181 // requests them. | 181 // requests them. |
182 ChildProcessSecurityPolicy::GetInstance()->GrantPermissionsForFile( | 182 ChildProcessSecurityPolicy::GetInstance()->GrantPermissionsForFile( |
183 id(), | 183 id(), |
184 GetChromeURLRequestContext()->file_system_context()-> | 184 GetChromeURLRequestContext()->file_system_context()-> |
185 path_manager()->base_path(), | 185 path_manager()->sandbox_provider()->base_path(), |
186 base::PLATFORM_FILE_OPEN | | 186 base::PLATFORM_FILE_OPEN | |
187 base::PLATFORM_FILE_CREATE | | 187 base::PLATFORM_FILE_CREATE | |
188 base::PLATFORM_FILE_OPEN_ALWAYS | | 188 base::PLATFORM_FILE_OPEN_ALWAYS | |
189 base::PLATFORM_FILE_CREATE_ALWAYS | | 189 base::PLATFORM_FILE_CREATE_ALWAYS | |
190 base::PLATFORM_FILE_READ | | 190 base::PLATFORM_FILE_READ | |
191 base::PLATFORM_FILE_WRITE | | 191 base::PLATFORM_FILE_WRITE | |
192 base::PLATFORM_FILE_EXCLUSIVE_READ | | 192 base::PLATFORM_FILE_EXCLUSIVE_READ | |
193 base::PLATFORM_FILE_EXCLUSIVE_WRITE | | 193 base::PLATFORM_FILE_EXCLUSIVE_WRITE | |
194 base::PLATFORM_FILE_ASYNC | | 194 base::PLATFORM_FILE_ASYNC | |
195 base::PLATFORM_FILE_TRUNCATE | | 195 base::PLATFORM_FILE_TRUNCATE | |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 } | 602 } |
603 } | 603 } |
604 return false; | 604 return false; |
605 } | 605 } |
606 | 606 |
607 WorkerProcessHost::WorkerInstance::FilterInfo | 607 WorkerProcessHost::WorkerInstance::FilterInfo |
608 WorkerProcessHost::WorkerInstance::GetFilter() const { | 608 WorkerProcessHost::WorkerInstance::GetFilter() const { |
609 DCHECK(NumFilters() == 1); | 609 DCHECK(NumFilters() == 1); |
610 return *filters_.begin(); | 610 return *filters_.begin(); |
611 } | 611 } |
OLD | NEW |