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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 } | 196 } |
197 | 197 |
198 // Initialize statistical testing infrastructure. We set client_id to the | 198 // Initialize statistical testing infrastructure. We set client_id to the |
199 // empty string to disallow the renderer process from creating its own | 199 // empty string to disallow the renderer process from creating its own |
200 // one-time randomized trials; they should be created in the browser process. | 200 // one-time randomized trials; they should be created in the browser process. |
201 base::FieldTrialList field_trial(EmptyString()); | 201 base::FieldTrialList field_trial(EmptyString()); |
202 // Ensure any field trials in browser are reflected into renderer. | 202 // Ensure any field trials in browser are reflected into renderer. |
203 if (parsed_command_line.HasSwitch(switches::kForceFieldTestNameAndValue)) { | 203 if (parsed_command_line.HasSwitch(switches::kForceFieldTestNameAndValue)) { |
204 std::string persistent = parsed_command_line.GetSwitchValueASCII( | 204 std::string persistent = parsed_command_line.GetSwitchValueASCII( |
205 switches::kForceFieldTestNameAndValue); | 205 switches::kForceFieldTestNameAndValue); |
206 bool ret = field_trial.CreateTrialsInChildProcess(persistent); | 206 bool ret = base::FieldTrialList::CreateTrialsFromString(persistent); |
207 DCHECK(ret); | 207 DCHECK(ret); |
208 } | 208 } |
209 | 209 |
210 // Load pepper plugins before engaging the sandbox. | 210 // Load pepper plugins before engaging the sandbox. |
211 PepperPluginRegistry::GetInstance(); | 211 PepperPluginRegistry::GetInstance(); |
212 | 212 |
213 { | 213 { |
214 #if defined(OS_WIN) || defined(OS_MACOSX) | 214 #if defined(OS_WIN) || defined(OS_MACOSX) |
215 // TODO(markus): Check if it is OK to unconditionally move this | 215 // TODO(markus): Check if it is OK to unconditionally move this |
216 // instruction down. | 216 // instruction down. |
(...skipping 22 matching lines...) Expand all Loading... |
239 #endif | 239 #endif |
240 TRACE_EVENT_BEGIN_ETW("RendererMain.START_MSG_LOOP", 0, 0); | 240 TRACE_EVENT_BEGIN_ETW("RendererMain.START_MSG_LOOP", 0, 0); |
241 MessageLoop::current()->Run(); | 241 MessageLoop::current()->Run(); |
242 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0); | 242 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0); |
243 } | 243 } |
244 } | 244 } |
245 platform.PlatformUninitialize(); | 245 platform.PlatformUninitialize(); |
246 TRACE_EVENT_END_ETW("RendererMain", 0, ""); | 246 TRACE_EVENT_END_ETW("RendererMain", 0, ""); |
247 return 0; | 247 return 0; |
248 } | 248 } |
OLD | NEW |