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 #if defined(OS_MACOSX) | 5 #if defined(OS_MACOSX) |
6 #include <signal.h> | 6 #include <signal.h> |
7 #include <unistd.h> | 7 #include <unistd.h> |
8 #endif // OS_MACOSX | 8 #endif // OS_MACOSX |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 bool no_sandbox = parsed_command_line.HasSwitch(switches::kNoSandbox); | 184 bool no_sandbox = parsed_command_line.HasSwitch(switches::kNoSandbox); |
185 platform.InitSandboxTests(no_sandbox); | 185 platform.InitSandboxTests(no_sandbox); |
186 | 186 |
187 // Initialize histogram statistics gathering system. | 187 // Initialize histogram statistics gathering system. |
188 // Don't create StatisticsRecorder in the single process mode. | 188 // Don't create StatisticsRecorder in the single process mode. |
189 scoped_ptr<base::StatisticsRecorder> statistics; | 189 scoped_ptr<base::StatisticsRecorder> statistics; |
190 if (!base::StatisticsRecorder::IsActive()) { | 190 if (!base::StatisticsRecorder::IsActive()) { |
191 statistics.reset(new base::StatisticsRecorder()); | 191 statistics.reset(new base::StatisticsRecorder()); |
192 } | 192 } |
193 | 193 |
194 // Initialize statistical testing infrastructure. We set client_id to the | 194 // Initialize statistical testing infrastructure. |
195 // empty string to disallow the renderer process from creating its own | 195 base::FieldTrialList field_trial; |
196 // one-time randomized trials; they should be created in the browser process. | |
197 base::FieldTrialList field_trial(EmptyString()); | |
198 // Ensure any field trials in browser are reflected into renderer. | 196 // Ensure any field trials in browser are reflected into renderer. |
199 if (parsed_command_line.HasSwitch(switches::kForceFieldTestNameAndValue)) { | 197 if (parsed_command_line.HasSwitch(switches::kForceFieldTestNameAndValue)) { |
200 std::string persistent = parsed_command_line.GetSwitchValueASCII( | 198 std::string persistent = parsed_command_line.GetSwitchValueASCII( |
201 switches::kForceFieldTestNameAndValue); | 199 switches::kForceFieldTestNameAndValue); |
202 bool ret = field_trial.CreateTrialsInChildProcess(persistent); | 200 bool ret = field_trial.CreateTrialsInChildProcess(persistent); |
203 DCHECK(ret); | 201 DCHECK(ret); |
204 } | 202 } |
205 | 203 |
206 // Load pepper plugins before engaging the sandbox. | 204 // Load pepper plugins before engaging the sandbox. |
207 PepperPluginRegistry::GetInstance(); | 205 PepperPluginRegistry::GetInstance(); |
(...skipping 25 matching lines...) Expand all Loading... |
233 pool->Recycle(); | 231 pool->Recycle(); |
234 TRACE_EVENT_BEGIN("RendererMain.START_MSG_LOOP", 0, 0); | 232 TRACE_EVENT_BEGIN("RendererMain.START_MSG_LOOP", 0, 0); |
235 MessageLoop::current()->Run(); | 233 MessageLoop::current()->Run(); |
236 TRACE_EVENT_END("RendererMain.START_MSG_LOOP", 0, 0); | 234 TRACE_EVENT_END("RendererMain.START_MSG_LOOP", 0, 0); |
237 } | 235 } |
238 } | 236 } |
239 platform.PlatformUninitialize(); | 237 platform.PlatformUninitialize(); |
240 TRACE_EVENT_END("RendererMain", 0, ""); | 238 TRACE_EVENT_END("RendererMain", 0, ""); |
241 return 0; | 239 return 0; |
242 } | 240 } |
OLD | NEW |