| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 if (!base::StatisticsRecorder::IsActive()) { | 254 if (!base::StatisticsRecorder::IsActive()) { |
| 255 statistics.reset(new base::StatisticsRecorder()); | 255 statistics.reset(new base::StatisticsRecorder()); |
| 256 } | 256 } |
| 257 | 257 |
| 258 // Initialize statistical testing infrastructure. | 258 // Initialize statistical testing infrastructure. |
| 259 base::FieldTrialList field_trial; | 259 base::FieldTrialList field_trial; |
| 260 // Ensure any field trials in browser are reflected into renderer. | 260 // Ensure any field trials in browser are reflected into renderer. |
| 261 if (parsed_command_line.HasSwitch(switches::kForceFieldTestNameAndValue)) { | 261 if (parsed_command_line.HasSwitch(switches::kForceFieldTestNameAndValue)) { |
| 262 std::string persistent = parsed_command_line.GetSwitchValueASCII( | 262 std::string persistent = parsed_command_line.GetSwitchValueASCII( |
| 263 switches::kForceFieldTestNameAndValue); | 263 switches::kForceFieldTestNameAndValue); |
| 264 bool ret = field_trial.StringAugmentsState(persistent); | 264 bool ret = field_trial.CreateTrialsInChildProcess(persistent); |
| 265 DCHECK(ret); | 265 DCHECK(ret); |
| 266 } | 266 } |
| 267 | 267 |
| 268 // Load pepper plugins before engaging the sandbox. | 268 // Load pepper plugins before engaging the sandbox. |
| 269 PepperPluginRegistry::GetInstance(); | 269 PepperPluginRegistry::GetInstance(); |
| 270 | 270 |
| 271 { | 271 { |
| 272 #if !defined(OS_LINUX) | 272 #if !defined(OS_LINUX) |
| 273 // TODO(markus): Check if it is OK to unconditionally move this | 273 // TODO(markus): Check if it is OK to unconditionally move this |
| 274 // instruction down. | 274 // instruction down. |
| (...skipping 20 matching lines...) Expand all Loading... |
| 295 pool->Recycle(); | 295 pool->Recycle(); |
| 296 TRACE_EVENT_BEGIN("RendererMain.START_MSG_LOOP", 0, 0); | 296 TRACE_EVENT_BEGIN("RendererMain.START_MSG_LOOP", 0, 0); |
| 297 MessageLoop::current()->Run(); | 297 MessageLoop::current()->Run(); |
| 298 TRACE_EVENT_END("RendererMain.START_MSG_LOOP", 0, 0); | 298 TRACE_EVENT_END("RendererMain.START_MSG_LOOP", 0, 0); |
| 299 } | 299 } |
| 300 } | 300 } |
| 301 platform.PlatformUninitialize(); | 301 platform.PlatformUninitialize(); |
| 302 TRACE_EVENT_END("RendererMain", 0, ""); | 302 TRACE_EVENT_END("RendererMain", 0, ""); |
| 303 return 0; | 303 return 0; |
| 304 } | 304 } |
| OLD | NEW |