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

Side by Side Diff: content/browser/worker_host/worker_process_host.cc

Issue 6912001: Merge 83754 - blob_storage_controller.cc assert from this bug was caused by the fact that worker ... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/742/src/
Patch Set: Created 9 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/child_process_security_policy_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 168
169 Launch( 169 Launch(
170 #if defined(OS_WIN) 170 #if defined(OS_WIN)
171 FilePath(), 171 FilePath(),
172 #elif defined(OS_POSIX) 172 #elif defined(OS_POSIX)
173 use_zygote, 173 use_zygote,
174 base::environment_vector(), 174 base::environment_vector(),
175 #endif 175 #endif
176 cmd_line); 176 cmd_line);
177 177
178 ChildProcessSecurityPolicy::GetInstance()->Add(id()); 178 ChildProcessSecurityPolicy::GetInstance()->AddWorker(
179 id(), render_process_id);
179 if (!CommandLine::ForCurrentProcess()->HasSwitch( 180 if (!CommandLine::ForCurrentProcess()->HasSwitch(
180 switches::kDisableFileSystem)) { 181 switches::kDisableFileSystem)) {
181 // Grant most file permissions to this worker. 182 // Grant most file permissions to this worker.
182 // PLATFORM_FILE_TEMPORARY, PLATFORM_FILE_HIDDEN and 183 // PLATFORM_FILE_TEMPORARY, PLATFORM_FILE_HIDDEN and
183 // PLATFORM_FILE_DELETE_ON_CLOSE are not granted, because no existing API 184 // PLATFORM_FILE_DELETE_ON_CLOSE are not granted, because no existing API
184 // requests them. 185 // requests them.
185 ChildProcessSecurityPolicy::GetInstance()->GrantPermissionsForFile( 186 ChildProcessSecurityPolicy::GetInstance()->GrantPermissionsForFile(
186 id(), 187 id(),
187 GetChromeURLRequestContext()->file_system_context()-> 188 GetChromeURLRequestContext()->file_system_context()->
188 path_manager()->sandbox_provider()->base_path(), 189 path_manager()->sandbox_provider()->base_path(),
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 } 632 }
632 } 633 }
633 return false; 634 return false;
634 } 635 }
635 636
636 WorkerProcessHost::WorkerInstance::FilterInfo 637 WorkerProcessHost::WorkerInstance::FilterInfo
637 WorkerProcessHost::WorkerInstance::GetFilter() const { 638 WorkerProcessHost::WorkerInstance::GetFilter() const {
638 DCHECK(NumFilters() == 1); 639 DCHECK(NumFilters() == 1);
639 return *filters_.begin(); 640 return *filters_.begin();
640 } 641 }
OLDNEW
« no previous file with comments | « content/browser/child_process_security_policy_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698