OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "app/l10n_util.h" | 5 #include "app/l10n_util.h" |
6 #include "app/resource_bundle.h" | 6 #include "app/resource_bundle.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/field_trial.h" | 8 #include "base/field_trial.h" |
9 #include "base/histogram.h" | 9 #include "base/histogram.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 FieldTrialList field_trial; | 130 FieldTrialList field_trial; |
131 // Ensure any field trials in browser are reflected into renderer. | 131 // Ensure any field trials in browser are reflected into renderer. |
132 if (parsed_command_line.HasSwitch(switches::kForceFieldTestNameAndValue)) { | 132 if (parsed_command_line.HasSwitch(switches::kForceFieldTestNameAndValue)) { |
133 std::string persistent(WideToASCII(parsed_command_line.GetSwitchValue( | 133 std::string persistent(WideToASCII(parsed_command_line.GetSwitchValue( |
134 switches::kForceFieldTestNameAndValue))); | 134 switches::kForceFieldTestNameAndValue))); |
135 bool ret = field_trial.StringAugmentsState(persistent); | 135 bool ret = field_trial.StringAugmentsState(persistent); |
136 DCHECK(ret); | 136 DCHECK(ret); |
137 } | 137 } |
138 | 138 |
139 { | 139 { |
140 #if !defined(OS_LINUX) | 140 #if !defined(OS_LINUX) && !defined(OS_FREEBSD) |
141 // TODO(markus): Check if it is OK to unconditionally move this | 141 // TODO(markus): Check if it is OK to unconditionally move this |
142 // instruction down. | 142 // instruction down. |
143 RenderProcess render_process; | 143 RenderProcess render_process; |
144 render_process.set_main_thread(new RenderThread()); | 144 render_process.set_main_thread(new RenderThread()); |
145 #endif | 145 #endif |
146 bool run_loop = true; | 146 bool run_loop = true; |
147 if (!no_sandbox) { | 147 if (!no_sandbox) { |
148 run_loop = platform.EnableSandbox(); | 148 run_loop = platform.EnableSandbox(); |
149 } | 149 } |
150 #if defined(OS_LINUX) | 150 #if defined(OS_LINUX) || defined(OS_FREEBSD) |
151 RenderProcess render_process; | 151 RenderProcess render_process; |
152 render_process.set_main_thread(new RenderThread()); | 152 render_process.set_main_thread(new RenderThread()); |
153 #endif | 153 #endif |
154 | 154 |
155 platform.RunSandboxTests(); | 155 platform.RunSandboxTests(); |
156 | 156 |
157 startup_timer.Stop(); // End of Startup Time Measurement. | 157 startup_timer.Stop(); // End of Startup Time Measurement. |
158 | 158 |
159 if (run_loop) { | 159 if (run_loop) { |
160 if (pool) | 160 if (pool) |
161 pool->Recycle(); | 161 pool->Recycle(); |
162 MessageLoop::current()->Run(); | 162 MessageLoop::current()->Run(); |
163 } | 163 } |
164 } | 164 } |
165 platform.PlatformUninitialize(); | 165 platform.PlatformUninitialize(); |
166 return 0; | 166 return 0; |
167 } | 167 } |
OLD | NEW |