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/hi_res_timer_manager.h" | 10 #include "base/hi_res_timer_manager.h" |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 base::StatisticsRecorder::Initialize(); | 176 base::StatisticsRecorder::Initialize(); |
177 | 177 |
178 // Initialize statistical testing infrastructure. We set the entropy provider | 178 // Initialize statistical testing infrastructure. We set the entropy provider |
179 // to NULL to disallow the renderer process from creating its own one-time | 179 // to NULL to disallow the renderer process from creating its own one-time |
180 // randomized trials; they should be created in the browser process. | 180 // randomized trials; they should be created in the browser process. |
181 base::FieldTrialList field_trial_list(NULL); | 181 base::FieldTrialList field_trial_list(NULL); |
182 // Ensure any field trials in browser are reflected into renderer. | 182 // Ensure any field trials in browser are reflected into renderer. |
183 if (parsed_command_line.HasSwitch(switches::kForceFieldTrials)) { | 183 if (parsed_command_line.HasSwitch(switches::kForceFieldTrials)) { |
184 std::string persistent = parsed_command_line.GetSwitchValueASCII( | 184 std::string persistent = parsed_command_line.GetSwitchValueASCII( |
185 switches::kForceFieldTrials); | 185 switches::kForceFieldTrials); |
186 bool ret = base::FieldTrialList::CreateTrialsFromString(persistent); | 186 // Field trials are created in an "activated" state to ensure they get |
| 187 // reported in crash reports. |
| 188 bool ret = base::FieldTrialList::CreateTrialsFromString(persistent, true); |
187 DCHECK(ret); | 189 DCHECK(ret); |
188 } | 190 } |
189 | 191 |
190 #if defined(ENABLE_PLUGINS) | 192 #if defined(ENABLE_PLUGINS) |
191 // Load pepper plugins before engaging the sandbox. | 193 // Load pepper plugins before engaging the sandbox. |
192 PepperPluginRegistry::GetInstance(); | 194 PepperPluginRegistry::GetInstance(); |
193 #endif | 195 #endif |
194 #if defined(ENABLE_WEBRTC) | 196 #if defined(ENABLE_WEBRTC) |
195 // Initialize WebRTC before engaging the sandbox. | 197 // Initialize WebRTC before engaging the sandbox. |
196 // NOTE: On linux, this call could already have been made from | 198 // NOTE: On linux, this call could already have been made from |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 base::MessageLoop::current()->Run(); | 238 base::MessageLoop::current()->Run(); |
237 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0); | 239 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0); |
238 } | 240 } |
239 } | 241 } |
240 platform.PlatformUninitialize(); | 242 platform.PlatformUninitialize(); |
241 TRACE_EVENT_END_ETW("RendererMain", 0, ""); | 243 TRACE_EVENT_END_ETW("RendererMain", 0, ""); |
242 return 0; | 244 return 0; |
243 } | 245 } |
244 | 246 |
245 } // namespace content | 247 } // namespace content |
OLD | NEW |