OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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" |
11 | 11 |
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 } | 517 } |
518 | 518 |
519 base::ProcessId browser_pid = base::GetCurrentProcId(); | 519 base::ProcessId browser_pid = base::GetCurrentProcId(); |
520 if (SubprocessIsBrowserChild(process_type)) { | 520 if (SubprocessIsBrowserChild(process_type)) { |
521 #if defined(OS_WIN) | 521 #if defined(OS_WIN) |
522 std::wstring channel_name = | 522 std::wstring channel_name = |
523 parsed_command_line.GetSwitchValue(switches::kProcessChannelID); | 523 parsed_command_line.GetSwitchValue(switches::kProcessChannelID); |
524 | 524 |
525 browser_pid = | 525 browser_pid = |
526 static_cast<base::ProcessId>(StringToInt(WideToASCII(channel_name))); | 526 static_cast<base::ProcessId>(StringToInt(WideToASCII(channel_name))); |
527 DCHECK_NE(browser_pid, 0u); | 527 DCHECK_NE(browser_pid, 0); |
528 #else | 528 #else |
529 browser_pid = base::GetCurrentProcId(); | 529 browser_pid = base::GetCurrentProcId(); |
530 #endif | 530 #endif |
531 | 531 |
532 #if defined(OS_POSIX) | 532 #if defined(OS_POSIX) |
533 // When you hit Ctrl-C in a terminal running the browser | 533 // When you hit Ctrl-C in a terminal running the browser |
534 // process, a SIGINT is delivered to the entire process group. | 534 // process, a SIGINT is delivered to the entire process group. |
535 // When debugging the browser process via gdb, gdb catches the | 535 // When debugging the browser process via gdb, gdb catches the |
536 // SIGINT for the browser process (and dumps you back to the gdb | 536 // SIGINT for the browser process (and dumps you back to the gdb |
537 // console) but doesn't for the child processes, killing them. | 537 // console) but doesn't for the child processes, killing them. |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 | 845 |
846 logging::CleanupChromeLogging(); | 846 logging::CleanupChromeLogging(); |
847 | 847 |
848 #if defined(OS_MACOSX) && defined(GOOGLE_CHROME_BUILD) | 848 #if defined(OS_MACOSX) && defined(GOOGLE_CHROME_BUILD) |
849 // TODO(mark): See the TODO(mark) above at InitCrashReporter. | 849 // TODO(mark): See the TODO(mark) above at InitCrashReporter. |
850 DestructCrashReporter(); | 850 DestructCrashReporter(); |
851 #endif // OS_MACOSX && GOOGLE_CHROME_BUILD | 851 #endif // OS_MACOSX && GOOGLE_CHROME_BUILD |
852 | 852 |
853 return rv; | 853 return rv; |
854 } | 854 } |
OLD | NEW |