OLD | NEW |
---|---|
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
wtc
2009/09/02 01:17:17
Should be 2006-2009.
| |
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" |
11 | 11 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
48 #include "base/string_util.h" | 48 #include "base/string_util.h" |
49 #if defined(OS_WIN) | 49 #if defined(OS_WIN) |
50 #include "base/win_util.h" | 50 #include "base/win_util.h" |
51 #endif | 51 #endif |
52 #if defined(OS_MACOSX) | 52 #if defined(OS_MACOSX) |
53 #include "base/mac_util.h" | 53 #include "base/mac_util.h" |
54 #include "chrome/common/chrome_paths_internal.h" | 54 #include "chrome/common/chrome_paths_internal.h" |
55 #include "chrome/app/breakpad_mac.h" | 55 #include "chrome/app/breakpad_mac.h" |
56 #endif | 56 #endif |
57 #if defined(OS_LINUX) | 57 #if defined(OS_LINUX) |
58 #include "base/nss_init.h" | |
58 #include "chrome/app/breakpad_linux.h" | 59 #include "chrome/app/breakpad_linux.h" |
59 #endif | 60 #endif |
60 #include "chrome/app/scoped_ole_initializer.h" | 61 #include "chrome/app/scoped_ole_initializer.h" |
61 #include "chrome/browser/renderer_host/render_process_host.h" | 62 #include "chrome/browser/renderer_host/render_process_host.h" |
62 #include "chrome/common/chrome_constants.h" | 63 #include "chrome/common/chrome_constants.h" |
63 #include "chrome/common/chrome_counters.h" | 64 #include "chrome/common/chrome_counters.h" |
64 #include "chrome/common/chrome_descriptors.h" | 65 #include "chrome/common/chrome_descriptors.h" |
65 #include "chrome/common/chrome_paths.h" | 66 #include "chrome/common/chrome_paths.h" |
66 #include "chrome/common/chrome_switches.h" | 67 #include "chrome/common/chrome_switches.h" |
67 #include "chrome/common/logging_chrome.h" | 68 #include "chrome/common/logging_chrome.h" |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
540 | 541 |
541 #ifdef NDEBUG | 542 #ifdef NDEBUG |
542 if (parsed_command_line.HasSwitch(switches::kSilentDumpOnDCHECK) && | 543 if (parsed_command_line.HasSwitch(switches::kSilentDumpOnDCHECK) && |
543 parsed_command_line.HasSwitch(switches::kEnableDCHECK)) { | 544 parsed_command_line.HasSwitch(switches::kEnableDCHECK)) { |
544 #if defined(OS_WIN) | 545 #if defined(OS_WIN) |
545 logging::SetLogReportHandler(ChromeAssert); | 546 logging::SetLogReportHandler(ChromeAssert); |
546 #endif | 547 #endif |
547 } | 548 } |
548 #endif // NDEBUG | 549 #endif // NDEBUG |
549 | 550 |
551 #if defined(OS_LINUX) | |
552 // We want to be sure to init NSPR on the main thread. | |
553 base::EnsureNSPRInit(); | |
wtc
2009/09/02 01:17:17
Are we using NSS/NSPR in the renderer processes, t
| |
554 #endif | |
555 | |
550 if (!process_type.empty()) | 556 if (!process_type.empty()) |
551 CommonSubprocessInit(); | 557 CommonSubprocessInit(); |
552 | 558 |
553 startup_timer.Stop(); // End of Startup Time Measurement. | 559 startup_timer.Stop(); // End of Startup Time Measurement. |
554 | 560 |
555 MainFunctionParams main_params(parsed_command_line, sandbox_wrapper, | 561 MainFunctionParams main_params(parsed_command_line, sandbox_wrapper, |
556 &autorelease_pool); | 562 &autorelease_pool); |
557 | 563 |
558 // TODO(port): turn on these main() functions as they've been de-winified. | 564 // TODO(port): turn on these main() functions as they've been de-winified. |
559 int rv = -1; | 565 int rv = -1; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
615 | 621 |
616 logging::CleanupChromeLogging(); | 622 logging::CleanupChromeLogging(); |
617 | 623 |
618 #if defined(OS_MACOSX) && defined(GOOGLE_CHROME_BUILD) | 624 #if defined(OS_MACOSX) && defined(GOOGLE_CHROME_BUILD) |
619 // TODO(mark): See the TODO(mark) above at InitCrashReporter. | 625 // TODO(mark): See the TODO(mark) above at InitCrashReporter. |
620 DestructCrashReporter(); | 626 DestructCrashReporter(); |
621 #endif // OS_MACOSX && GOOGLE_CHROME_BUILD | 627 #endif // OS_MACOSX && GOOGLE_CHROME_BUILD |
622 | 628 |
623 return rv; | 629 return rv; |
624 } | 630 } |
OLD | NEW |