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/stack_trace.h" | 8 #include "base/debug/stack_trace.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 base::StatisticsRecorder::Initialize(); | 179 base::StatisticsRecorder::Initialize(); |
180 | 180 |
181 // Initialize statistical testing infrastructure. We set the entropy provider | 181 // Initialize statistical testing infrastructure. We set the entropy provider |
182 // to NULL to disallow the renderer process from creating its own one-time | 182 // to NULL to disallow the renderer process from creating its own one-time |
183 // randomized trials; they should be created in the browser process. | 183 // randomized trials; they should be created in the browser process. |
184 base::FieldTrialList field_trial_list(NULL); | 184 base::FieldTrialList field_trial_list(NULL); |
185 // Ensure any field trials in browser are reflected into renderer. | 185 // Ensure any field trials in browser are reflected into renderer. |
186 if (parsed_command_line.HasSwitch(switches::kForceFieldTrials)) { | 186 if (parsed_command_line.HasSwitch(switches::kForceFieldTrials)) { |
187 std::string persistent = parsed_command_line.GetSwitchValueASCII( | 187 std::string persistent = parsed_command_line.GetSwitchValueASCII( |
188 switches::kForceFieldTrials); | 188 switches::kForceFieldTrials); |
189 bool ret = base::FieldTrialList::CreateTrialsFromString(persistent); | 189 // Field trials are created in an "activated" state to ensure they get |
190 DCHECK(ret); | 190 // reported in crash reports. |
| 191 bool result = base::FieldTrialList::CreateTrialsFromString( |
| 192 parsed_command_line.GetSwitchValueASCII(switches::kForceFieldTrials), |
| 193 base::FieldTrialList::ACTIVATE_TRIALS); |
| 194 DCHECK(result); |
191 } | 195 } |
192 | 196 |
193 #if defined(ENABLE_PLUGINS) | 197 #if defined(ENABLE_PLUGINS) |
194 // Load pepper plugins before engaging the sandbox. | 198 // Load pepper plugins before engaging the sandbox. |
195 PepperPluginRegistry::GetInstance(); | 199 PepperPluginRegistry::GetInstance(); |
196 #endif | 200 #endif |
197 #if defined(ENABLE_WEBRTC) | 201 #if defined(ENABLE_WEBRTC) |
198 // Initialize WebRTC before engaging the sandbox. | 202 // Initialize WebRTC before engaging the sandbox. |
199 // NOTE: On linux, this call could already have been made from | 203 // NOTE: On linux, this call could already have been made from |
200 // zygote_main_linux.cc. However, calling multiple times from the same thread | 204 // zygote_main_linux.cc. However, calling multiple times from the same thread |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 base::MessageLoop::current()->Run(); | 243 base::MessageLoop::current()->Run(); |
240 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0); | 244 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0); |
241 } | 245 } |
242 } | 246 } |
243 platform.PlatformUninitialize(); | 247 platform.PlatformUninitialize(); |
244 TRACE_EVENT_END_ETW("RendererMain", 0, ""); | 248 TRACE_EVENT_END_ETW("RendererMain", 0, ""); |
245 return 0; | 249 return 0; |
246 } | 250 } |
247 | 251 |
248 } // namespace content | 252 } // namespace content |
OLD | NEW |