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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 // randomized trials; they should be created in the browser process. | 194 // randomized trials; they should be created in the browser process. |
195 base::FieldTrialList field_trial_list(NULL); | 195 base::FieldTrialList field_trial_list(NULL); |
196 // Ensure any field trials in browser are reflected into renderer. | 196 // Ensure any field trials in browser are reflected into renderer. |
197 if (parsed_command_line.HasSwitch(switches::kForceFieldTrials)) { | 197 if (parsed_command_line.HasSwitch(switches::kForceFieldTrials)) { |
198 std::string persistent = parsed_command_line.GetSwitchValueASCII( | 198 std::string persistent = parsed_command_line.GetSwitchValueASCII( |
199 switches::kForceFieldTrials); | 199 switches::kForceFieldTrials); |
200 bool ret = base::FieldTrialList::CreateTrialsFromString(persistent); | 200 bool ret = base::FieldTrialList::CreateTrialsFromString(persistent); |
201 DCHECK(ret); | 201 DCHECK(ret); |
202 } | 202 } |
203 | 203 |
| 204 #if defined(ENABLE_PLUGINS) |
204 // Load pepper plugins before engaging the sandbox. | 205 // Load pepper plugins before engaging the sandbox. |
205 PepperPluginRegistry::GetInstance(); | 206 PepperPluginRegistry::GetInstance(); |
| 207 #endif |
206 | 208 |
207 { | 209 { |
208 #if defined(OS_WIN) || defined(OS_MACOSX) | 210 #if defined(OS_WIN) || defined(OS_MACOSX) |
209 // TODO(markus): Check if it is OK to unconditionally move this | 211 // TODO(markus): Check if it is OK to unconditionally move this |
210 // instruction down. | 212 // instruction down. |
211 RenderProcessImpl render_process; | 213 RenderProcessImpl render_process; |
212 new RenderThreadImpl(); | 214 new RenderThreadImpl(); |
213 #endif | 215 #endif |
214 bool run_loop = true; | 216 bool run_loop = true; |
215 if (!no_sandbox) { | 217 if (!no_sandbox) { |
(...skipping 25 matching lines...) Expand all Loading... |
241 MessageLoop::current()->Run(); | 243 MessageLoop::current()->Run(); |
242 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0); | 244 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0); |
243 } | 245 } |
244 } | 246 } |
245 platform.PlatformUninitialize(); | 247 platform.PlatformUninitialize(); |
246 TRACE_EVENT_END_ETW("RendererMain", 0, ""); | 248 TRACE_EVENT_END_ETW("RendererMain", 0, ""); |
247 return 0; | 249 return 0; |
248 } | 250 } |
249 | 251 |
250 } // namespace content | 252 } // namespace content |
OLD | NEW |