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