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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 // If we have a pending chromium android linker histogram, record it. | 166 // If we have a pending chromium android linker histogram, record it. |
167 base::android::RecordChromiumAndroidLinkerRendererHistogram(); | 167 base::android::RecordChromiumAndroidLinkerRendererHistogram(); |
168 #endif | 168 #endif |
169 | 169 |
170 // Initialize statistical testing infrastructure. We set the entropy provider | 170 // Initialize statistical testing infrastructure. We set the entropy provider |
171 // to NULL to disallow the renderer process from creating its own one-time | 171 // to NULL to disallow the renderer process from creating its own one-time |
172 // randomized trials; they should be created in the browser process. | 172 // randomized trials; they should be created in the browser process. |
173 base::FieldTrialList field_trial_list(NULL); | 173 base::FieldTrialList field_trial_list(NULL); |
174 // Ensure any field trials in browser are reflected into renderer. | 174 // Ensure any field trials in browser are reflected into renderer. |
175 if (parsed_command_line.HasSwitch(switches::kForceFieldTrials)) { | 175 if (parsed_command_line.HasSwitch(switches::kForceFieldTrials)) { |
176 // Field trials are created in an "activated" state to ensure they get | |
177 // reported in crash reports. | |
178 bool result = base::FieldTrialList::CreateTrialsFromString( | 176 bool result = base::FieldTrialList::CreateTrialsFromString( |
179 parsed_command_line.GetSwitchValueASCII(switches::kForceFieldTrials), | 177 parsed_command_line.GetSwitchValueASCII(switches::kForceFieldTrials), |
180 base::FieldTrialList::ACTIVATE_TRIALS, | 178 base::FieldTrialList::DONT_ACTIVATE_TRIALS, |
181 std::set<std::string>()); | 179 std::set<std::string>()); |
182 DCHECK(result); | 180 DCHECK(result); |
183 } | 181 } |
184 | 182 |
185 // PlatformInitialize uses FieldTrials, so this must happen later. | 183 // PlatformInitialize uses FieldTrials, so this must happen later. |
186 platform.PlatformInitialize(); | 184 platform.PlatformInitialize(); |
187 | 185 |
188 #if defined(ENABLE_PLUGINS) | 186 #if defined(ENABLE_PLUGINS) |
189 // Load pepper plugins before engaging the sandbox. | 187 // Load pepper plugins before engaging the sandbox. |
190 PepperPluginRegistry::GetInstance(); | 188 PepperPluginRegistry::GetInstance(); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 base::MessageLoop::current()->Run(); | 232 base::MessageLoop::current()->Run(); |
235 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0); | 233 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0); |
236 } | 234 } |
237 } | 235 } |
238 platform.PlatformUninitialize(); | 236 platform.PlatformUninitialize(); |
239 TRACE_EVENT_END_ETW("RendererMain", 0, ""); | 237 TRACE_EVENT_END_ETW("RendererMain", 0, ""); |
240 return 0; | 238 return 0; |
241 } | 239 } |
242 | 240 |
243 } // namespace content | 241 } // namespace content |
OLD | NEW |