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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 // PLATFORM_FILE_DELETE_ON_CLOSE are not granted, because no existing API | 185 // PLATFORM_FILE_DELETE_ON_CLOSE are not granted, because no existing API |
186 // requests them. | 186 // requests them. |
187 ChildProcessSecurityPolicy::GetInstance()->GrantPermissionsForFile( | 187 ChildProcessSecurityPolicy::GetInstance()->GrantPermissionsForFile( |
188 id(), | 188 id(), |
189 resource_context_->file_system_context()-> | 189 resource_context_->file_system_context()-> |
190 path_manager()->sandbox_provider()->base_path(), | 190 path_manager()->sandbox_provider()->base_path(), |
191 base::PLATFORM_FILE_OPEN | | 191 base::PLATFORM_FILE_OPEN | |
192 base::PLATFORM_FILE_CREATE | | 192 base::PLATFORM_FILE_CREATE | |
193 base::PLATFORM_FILE_OPEN_ALWAYS | | 193 base::PLATFORM_FILE_OPEN_ALWAYS | |
194 base::PLATFORM_FILE_CREATE_ALWAYS | | 194 base::PLATFORM_FILE_CREATE_ALWAYS | |
| 195 base::PLATFORM_FILE_OPEN_TRUNCATED | |
195 base::PLATFORM_FILE_READ | | 196 base::PLATFORM_FILE_READ | |
196 base::PLATFORM_FILE_WRITE | | 197 base::PLATFORM_FILE_WRITE | |
197 base::PLATFORM_FILE_EXCLUSIVE_READ | | 198 base::PLATFORM_FILE_EXCLUSIVE_READ | |
198 base::PLATFORM_FILE_EXCLUSIVE_WRITE | | 199 base::PLATFORM_FILE_EXCLUSIVE_WRITE | |
199 base::PLATFORM_FILE_ASYNC | | 200 base::PLATFORM_FILE_ASYNC | |
200 base::PLATFORM_FILE_TRUNCATE | | |
201 base::PLATFORM_FILE_WRITE_ATTRIBUTES); | 201 base::PLATFORM_FILE_WRITE_ATTRIBUTES); |
202 } | 202 } |
203 | 203 |
204 // Call the embedder first so that their IPC filters have priority. | 204 // Call the embedder first so that their IPC filters have priority. |
205 content::GetContentClient()->browser()->WorkerProcessHostCreated(this); | 205 content::GetContentClient()->browser()->WorkerProcessHostCreated(this); |
206 CreateMessageFilters(render_process_id); | 206 CreateMessageFilters(render_process_id); |
207 | 207 |
208 return true; | 208 return true; |
209 } | 209 } |
210 | 210 |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 } | 616 } |
617 } | 617 } |
618 return false; | 618 return false; |
619 } | 619 } |
620 | 620 |
621 WorkerProcessHost::WorkerInstance::FilterInfo | 621 WorkerProcessHost::WorkerInstance::FilterInfo |
622 WorkerProcessHost::WorkerInstance::GetFilter() const { | 622 WorkerProcessHost::WorkerInstance::GetFilter() const { |
623 DCHECK(NumFilters() == 1); | 623 DCHECK(NumFilters() == 1); |
624 return *filters_.begin(); | 624 return *filters_.begin(); |
625 } | 625 } |
OLD | NEW |