OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/app/chrome_main.h" | 5 #include "chrome/app/chrome_main.h" |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/debugger.h" | 9 #include "base/debug/debugger.h" |
10 #include "base/i18n/icu_util.h" | 10 #include "base/i18n/icu_util.h" |
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 command_line.GetSwitchValueASCII(switches::kProcessType); | 593 command_line.GetSwitchValueASCII(switches::kProcessType); |
594 | 594 |
595 // If we are in diagnostics mode this is the end of the line. After the | 595 // If we are in diagnostics mode this is the end of the line. After the |
596 // diagnostics are run the process will invariably exit. | 596 // diagnostics are run the process will invariably exit. |
597 if (command_line.HasSwitch(switches::kDiagnostics)) { | 597 if (command_line.HasSwitch(switches::kDiagnostics)) { |
598 return DiagnosticsMain(command_line); | 598 return DiagnosticsMain(command_line); |
599 } | 599 } |
600 | 600 |
601 #if defined(OS_WIN) | 601 #if defined(OS_WIN) |
602 // Must do this before any other usage of command line! | 602 // Must do this before any other usage of command line! |
603 if (HasDeprecatedArguments(command_line.command_line_string())) | 603 if (HasDeprecatedArguments(command_line.GetCommandLineString())) |
604 return 1; | 604 return 1; |
605 #endif | 605 #endif |
606 | 606 |
607 base::ProcessId browser_pid = base::GetCurrentProcId(); | 607 base::ProcessId browser_pid = base::GetCurrentProcId(); |
608 if (SubprocessIsBrowserChild(process_type)) { | 608 if (SubprocessIsBrowserChild(process_type)) { |
609 #if defined(OS_WIN) || defined(OS_MACOSX) | 609 #if defined(OS_WIN) || defined(OS_MACOSX) |
610 std::string channel_name = | 610 std::string channel_name = |
611 command_line.GetSwitchValueASCII(switches::kProcessChannelID); | 611 command_line.GetSwitchValueASCII(switches::kProcessChannelID); |
612 | 612 |
613 int browser_pid_int; | 613 int browser_pid_int; |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 | 859 |
860 if (SubprocessNeedsResourceBundle(process_type)) | 860 if (SubprocessNeedsResourceBundle(process_type)) |
861 ResourceBundle::CleanupSharedInstance(); | 861 ResourceBundle::CleanupSharedInstance(); |
862 | 862 |
863 logging::CleanupChromeLogging(); | 863 logging::CleanupChromeLogging(); |
864 | 864 |
865 chrome_main::LowLevelShutdown(); | 865 chrome_main::LowLevelShutdown(); |
866 | 866 |
867 return exit_code; | 867 return exit_code; |
868 } | 868 } |
OLD | NEW |