| 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 "base/base_switches.h" | 5 #include "base/base_switches.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/debug/debugger.h" | 7 #include "base/debug/debugger.h" |
| 8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 scoped_ptr<base::StatisticsRecorder> statistics; | 229 scoped_ptr<base::StatisticsRecorder> statistics; |
| 230 if (!base::StatisticsRecorder::IsActive()) { | 230 if (!base::StatisticsRecorder::IsActive()) { |
| 231 statistics.reset(new base::StatisticsRecorder()); | 231 statistics.reset(new base::StatisticsRecorder()); |
| 232 } | 232 } |
| 233 | 233 |
| 234 // Initialize statistical testing infrastructure. We set client_id to the | 234 // Initialize statistical testing infrastructure. We set client_id to the |
| 235 // empty string to disallow the renderer process from creating its own | 235 // empty string to disallow the renderer process from creating its own |
| 236 // one-time randomized trials; they should be created in the browser process. | 236 // one-time randomized trials; they should be created in the browser process. |
| 237 base::FieldTrialList field_trial(EmptyString()); | 237 base::FieldTrialList field_trial(EmptyString()); |
| 238 // Ensure any field trials in browser are reflected into renderer. | 238 // Ensure any field trials in browser are reflected into renderer. |
| 239 if (parsed_command_line.HasSwitch(switches::kForceFieldTestNameAndValue)) { | 239 if (parsed_command_line.HasSwitch(switches::kForceFieldTrials)) { |
| 240 std::string persistent = parsed_command_line.GetSwitchValueASCII( | 240 std::string persistent = parsed_command_line.GetSwitchValueASCII( |
| 241 switches::kForceFieldTestNameAndValue); | 241 switches::kForceFieldTrials); |
| 242 bool ret = field_trial.CreateTrialsInChildProcess(persistent); | 242 bool ret = base::FieldTrialList::CreateTrialsFromString(persistent); |
| 243 DCHECK(ret); | 243 DCHECK(ret); |
| 244 } | 244 } |
| 245 | 245 |
| 246 // Load pepper plugins before engaging the sandbox. | 246 // Load pepper plugins before engaging the sandbox. |
| 247 PepperPluginRegistry::GetInstance(); | 247 PepperPluginRegistry::GetInstance(); |
| 248 | 248 |
| 249 { | 249 { |
| 250 #if defined(OS_WIN) || defined(OS_MACOSX) | 250 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 251 // TODO(markus): Check if it is OK to unconditionally move this | 251 // TODO(markus): Check if it is OK to unconditionally move this |
| 252 // instruction down. | 252 // instruction down. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 279 #endif | 279 #endif |
| 280 TRACE_EVENT_BEGIN_ETW("RendererMain.START_MSG_LOOP", 0, 0); | 280 TRACE_EVENT_BEGIN_ETW("RendererMain.START_MSG_LOOP", 0, 0); |
| 281 MessageLoop::current()->Run(); | 281 MessageLoop::current()->Run(); |
| 282 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0); | 282 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0); |
| 283 } | 283 } |
| 284 } | 284 } |
| 285 platform.PlatformUninitialize(); | 285 platform.PlatformUninitialize(); |
| 286 TRACE_EVENT_END_ETW("RendererMain", 0, ""); | 286 TRACE_EVENT_END_ETW("RendererMain", 0, ""); |
| 287 return 0; | 287 return 0; |
| 288 } | 288 } |
| OLD | NEW |