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 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 command_line.GetSwitchValueASCII(switches::kProcessType); | 601 command_line.GetSwitchValueASCII(switches::kProcessType); |
602 | 602 |
603 // If we are in diagnostics mode this is the end of the line. After the | 603 // If we are in diagnostics mode this is the end of the line. After the |
604 // diagnostics are run the process will invariably exit. | 604 // diagnostics are run the process will invariably exit. |
605 if (command_line.HasSwitch(switches::kDiagnostics)) { | 605 if (command_line.HasSwitch(switches::kDiagnostics)) { |
606 return DiagnosticsMain(command_line); | 606 return DiagnosticsMain(command_line); |
607 } | 607 } |
608 | 608 |
609 #if defined(OS_WIN) | 609 #if defined(OS_WIN) |
610 // Must do this before any other usage of command line! | 610 // Must do this before any other usage of command line! |
611 if (HasDeprecatedArguments(command_line.command_line_string())) | 611 if (HasDeprecatedArguments(command_line.GetCommandLineString())) |
612 return 1; | 612 return 1; |
613 #endif | 613 #endif |
614 | 614 |
615 base::ProcessId browser_pid = base::GetCurrentProcId(); | 615 base::ProcessId browser_pid = base::GetCurrentProcId(); |
616 if (SubprocessIsBrowserChild(process_type)) { | 616 if (SubprocessIsBrowserChild(process_type)) { |
617 #if defined(OS_WIN) || defined(OS_MACOSX) | 617 #if defined(OS_WIN) || defined(OS_MACOSX) |
618 std::string channel_name = | 618 std::string channel_name = |
619 command_line.GetSwitchValueASCII(switches::kProcessChannelID); | 619 command_line.GetSwitchValueASCII(switches::kProcessChannelID); |
620 | 620 |
621 int browser_pid_int; | 621 int browser_pid_int; |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
872 | 872 |
873 if (SubprocessNeedsResourceBundle(process_type)) | 873 if (SubprocessNeedsResourceBundle(process_type)) |
874 ResourceBundle::CleanupSharedInstance(); | 874 ResourceBundle::CleanupSharedInstance(); |
875 | 875 |
876 logging::CleanupChromeLogging(); | 876 logging::CleanupChromeLogging(); |
877 | 877 |
878 chrome_main::LowLevelShutdown(); | 878 chrome_main::LowLevelShutdown(); |
879 | 879 |
880 return exit_code; | 880 return exit_code; |
881 } | 881 } |
OLD | NEW |