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 11 matching lines...) Expand all Loading... |
22 #include <unistd.h> | 22 #include <unistd.h> |
23 #endif | 23 #endif |
24 | 24 |
25 #if defined(OS_LINUX) | 25 #if defined(OS_LINUX) |
26 #include <gdk/gdk.h> | 26 #include <gdk/gdk.h> |
27 #include <glib.h> | 27 #include <glib.h> |
28 #include <gtk/gtk.h> | 28 #include <gtk/gtk.h> |
29 #include <string.h> | 29 #include <string.h> |
30 #endif | 30 #endif |
31 | 31 |
| 32 #include "app/app_paths.h" |
32 #include "app/resource_bundle.h" | 33 #include "app/resource_bundle.h" |
33 #include "base/at_exit.h" | 34 #include "base/at_exit.h" |
34 #include "base/command_line.h" | 35 #include "base/command_line.h" |
35 #include "base/debug_util.h" | 36 #include "base/debug_util.h" |
36 #include "base/icu_util.h" | 37 #include "base/icu_util.h" |
37 #include "base/message_loop.h" | 38 #include "base/message_loop.h" |
38 #include "base/path_service.h" | 39 #include "base/path_service.h" |
39 #include "base/process_util.h" | 40 #include "base/process_util.h" |
40 #include "base/scoped_nsautorelease_pool.h" | 41 #include "base/scoped_nsautorelease_pool.h" |
41 #include "base/stats_counters.h" | 42 #include "base/stats_counters.h" |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 // on their own when the browser process goes away. | 325 // on their own when the browser process goes away. |
325 // Note that we *can't* rely on DebugUtil::BeingDebugged to catch this | 326 // Note that we *can't* rely on DebugUtil::BeingDebugged to catch this |
326 // case because we are the child process, which is not being debugged. | 327 // case because we are the child process, which is not being debugged. |
327 if (!DebugUtil::BeingDebugged()) | 328 if (!DebugUtil::BeingDebugged()) |
328 signal(SIGINT, SIG_IGN); | 329 signal(SIGINT, SIG_IGN); |
329 #endif | 330 #endif |
330 } | 331 } |
331 SetupCRT(parsed_command_line); | 332 SetupCRT(parsed_command_line); |
332 | 333 |
333 // Initialize the Chrome path provider. | 334 // Initialize the Chrome path provider. |
| 335 app::RegisterPathProvider(); |
334 chrome::RegisterPathProvider(); | 336 chrome::RegisterPathProvider(); |
335 | 337 |
336 // Initialize the Stats Counters table. With this initialized, | 338 // Initialize the Stats Counters table. With this initialized, |
337 // the StatsViewer can be utilized to read counters outside of | 339 // the StatsViewer can be utilized to read counters outside of |
338 // Chrome. These lines can be commented out to effectively turn | 340 // Chrome. These lines can be commented out to effectively turn |
339 // counters 'off'. The table is created and exists for the life | 341 // counters 'off'. The table is created and exists for the life |
340 // of the process. It is not cleaned up. | 342 // of the process. It is not cleaned up. |
341 // TODO(port): we probably need to shut this down correctly to avoid | 343 // TODO(port): we probably need to shut this down correctly to avoid |
342 // leaking shared memory regions on posix platforms. | 344 // leaking shared memory regions on posix platforms. |
343 if (parsed_command_line.HasSwitch(switches::kEnableStatsTable)) { | 345 if (parsed_command_line.HasSwitch(switches::kEnableStatsTable)) { |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 _CrtDumpMemoryLeaks(); | 486 _CrtDumpMemoryLeaks(); |
485 #endif // _CRTDBG_MAP_ALLOC | 487 #endif // _CRTDBG_MAP_ALLOC |
486 | 488 |
487 _Module.Term(); | 489 _Module.Term(); |
488 #endif | 490 #endif |
489 | 491 |
490 logging::CleanupChromeLogging(); | 492 logging::CleanupChromeLogging(); |
491 | 493 |
492 return rv; | 494 return rv; |
493 } | 495 } |
OLD | NEW |