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 // TODO(port): the ifdefs in here are a first step towards trying to determine | 5 // TODO(port): the ifdefs in here are a first step towards trying to determine |
6 // the correct abstraction for all the OS functionality required at this | 6 // the correct abstraction for all the OS functionality required at this |
7 // stage of process initialization. It should not be taken as a final | 7 // stage of process initialization. It should not be taken as a final |
8 // abstraction. | 8 // abstraction. |
9 | 9 |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 base::AtExitManager exit_manager; | 197 base::AtExitManager exit_manager; |
198 | 198 |
199 // TODO(pinkerton): We need this pool here for all the objects created | 199 // TODO(pinkerton): We need this pool here for all the objects created |
200 // before we get to the UI event loop, but we don't want to leave them | 200 // before we get to the UI event loop, but we don't want to leave them |
201 // hanging around until the app quits. We should add a "flush" to the class | 201 // hanging around until the app quits. We should add a "flush" to the class |
202 // which just cycles the pool under the covers and then call that just | 202 // which just cycles the pool under the covers and then call that just |
203 // before we invoke the main UI loop near the bottom of this function. | 203 // before we invoke the main UI loop near the bottom of this function. |
204 base::ScopedNSAutoreleasePool autorelease_pool; | 204 base::ScopedNSAutoreleasePool autorelease_pool; |
205 | 205 |
206 // Initialize the command line. | 206 // Initialize the command line. |
207 #if defined(OS_POSIX) | 207 #if defined(OS_WIN) |
208 CommandLine::SetArgcArgv(argc, argv); | 208 CommandLine::Init(0, NULL); |
| 209 #else |
| 210 CommandLine::Init(argc, argv); |
209 #endif | 211 #endif |
210 CommandLine parsed_command_line; | 212 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); |
211 | 213 |
212 SetupCRT(parsed_command_line); | 214 SetupCRT(parsed_command_line); |
213 | 215 |
214 // Initialize the Chrome path provider. | 216 // Initialize the Chrome path provider. |
215 chrome::RegisterPathProvider(); | 217 chrome::RegisterPathProvider(); |
216 | 218 |
217 // Initialize the Stats Counters table. With this initialized, | 219 // Initialize the Stats Counters table. With this initialized, |
218 // the StatsViewer can be utilized to read counters outside of | 220 // the StatsViewer can be utilized to read counters outside of |
219 // Chrome. These lines can be commented out to effectively turn | 221 // Chrome. These lines can be commented out to effectively turn |
220 // counters 'off'. The table is created and exists for the life | 222 // counters 'off'. The table is created and exists for the life |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 | 328 |
327 _Module.Term(); | 329 _Module.Term(); |
328 #endif | 330 #endif |
329 | 331 |
330 logging::CleanupChromeLogging(); | 332 logging::CleanupChromeLogging(); |
331 | 333 |
332 return rv; | 334 return rv; |
333 } | 335 } |
334 | 336 |
335 | 337 |
OLD | NEW |