OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 CommandLine* cmd_line = new CommandLine(exe_path); | 153 CommandLine* cmd_line = new CommandLine(exe_path); |
154 cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kWorkerProcess); | 154 cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kWorkerProcess); |
155 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id); | 155 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id); |
156 std::string locale = | 156 std::string locale = |
157 content::GetContentClient()->browser()->GetApplicationLocale(); | 157 content::GetContentClient()->browser()->GetApplicationLocale(); |
158 cmd_line->AppendSwitchASCII(switches::kLang, locale); | 158 cmd_line->AppendSwitchASCII(switches::kLang, locale); |
159 | 159 |
160 static const char* const kSwitchNames[] = { | 160 static const char* const kSwitchNames[] = { |
161 switches::kDisableApplicationCache, | 161 switches::kDisableApplicationCache, |
162 switches::kDisableDatabases, | 162 switches::kDisableDatabases, |
163 switches::kEnableLogging, | |
164 switches::kLoggingLevel, | |
165 switches::kDisableWebSockets, | |
166 #if defined(OS_WIN) | 163 #if defined(OS_WIN) |
167 switches::kDisableDesktopNotifications, | 164 switches::kDisableDesktopNotifications, |
168 #endif | 165 #endif |
169 switches::kDisableFileSystem, | 166 switches::kDisableFileSystem, |
170 switches::kDisableSeccompFilterSandbox, | 167 switches::kDisableSeccompFilterSandbox, |
| 168 switches::kDisableWebSockets, |
| 169 switches::kEnableLogging, |
| 170 #if defined(OS_MACOSX) |
| 171 switches::kEnableSandboxLogging, |
| 172 #endif |
| 173 switches::kLoggingLevel, |
171 }; | 174 }; |
172 cmd_line->CopySwitchesFrom(*CommandLine::ForCurrentProcess(), kSwitchNames, | 175 cmd_line->CopySwitchesFrom(*CommandLine::ForCurrentProcess(), kSwitchNames, |
173 arraysize(kSwitchNames)); | 176 arraysize(kSwitchNames)); |
174 | 177 |
175 #if defined(OS_POSIX) | 178 #if defined(OS_POSIX) |
176 bool use_zygote = true; | 179 bool use_zygote = true; |
177 | 180 |
178 if (CommandLine::ForCurrentProcess()->HasSwitch( | 181 if (CommandLine::ForCurrentProcess()->HasSwitch( |
179 switches::kWaitForDebuggerChildren)) { | 182 switches::kWaitForDebuggerChildren)) { |
180 // Look to pass-on the kWaitForDebugger flag. | 183 // Look to pass-on the kWaitForDebugger flag. |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
716 } | 719 } |
717 } | 720 } |
718 return false; | 721 return false; |
719 } | 722 } |
720 | 723 |
721 WorkerProcessHost::WorkerInstance::FilterInfo | 724 WorkerProcessHost::WorkerInstance::FilterInfo |
722 WorkerProcessHost::WorkerInstance::GetFilter() const { | 725 WorkerProcessHost::WorkerInstance::GetFilter() const { |
723 DCHECK(NumFilters() == 1); | 726 DCHECK(NumFilters() == 1); |
724 return *filters_.begin(); | 727 return *filters_.begin(); |
725 } | 728 } |
OLD | NEW |