Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(860)

Side by Side Diff: chrome/app/chrome_main.cc

Issue 6250070: Added command line switches and UI (controlled via a build option) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review concerns Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/app/chrome_command_ids.h ('k') | chrome/app/generated_resources.grd » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "app/app_paths.h" 5 #include "app/app_paths.h"
6 #include "app/app_switches.h" 6 #include "app/app_switches.h"
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 13 matching lines...) Expand all
24 #include "chrome/browser/platform_util.h" 24 #include "chrome/browser/platform_util.h"
25 #include "chrome/browser/renderer_host/render_process_host.h" 25 #include "chrome/browser/renderer_host/render_process_host.h"
26 #include "chrome/common/chrome_constants.h" 26 #include "chrome/common/chrome_constants.h"
27 #include "chrome/common/chrome_counters.h" 27 #include "chrome/common/chrome_counters.h"
28 #include "chrome/common/chrome_descriptors.h" 28 #include "chrome/common/chrome_descriptors.h"
29 #include "chrome/common/chrome_paths.h" 29 #include "chrome/common/chrome_paths.h"
30 #include "chrome/common/chrome_switches.h" 30 #include "chrome/common/chrome_switches.h"
31 #include "chrome/common/chrome_version_info.h" 31 #include "chrome/common/chrome_version_info.h"
32 #include "chrome/common/logging_chrome.h" 32 #include "chrome/common/logging_chrome.h"
33 #include "chrome/common/main_function_params.h" 33 #include "chrome/common/main_function_params.h"
34 #include "chrome/common/profiling.h"
34 #include "chrome/common/sandbox_init_wrapper.h" 35 #include "chrome/common/sandbox_init_wrapper.h"
35 #include "chrome/common/set_process_title.h" 36 #include "chrome/common/set_process_title.h"
36 #include "chrome/common/url_constants.h" 37 #include "chrome/common/url_constants.h"
37 #include "ipc/ipc_switches.h" 38 #include "ipc/ipc_switches.h"
38 #include "ui/base/resource/resource_bundle.h" 39 #include "ui/base/resource/resource_bundle.h"
39 #include "ui/base/ui_base_paths.h" 40 #include "ui/base/ui_base_paths.h"
40 #include "ui/base/ui_base_switches.h" 41 #include "ui/base/ui_base_switches.h"
41 42
42 #if defined(OS_WIN) 43 #if defined(OS_WIN)
43 #include <algorithm> 44 #include <algorithm>
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 629
629 // Initialize the command line. 630 // Initialize the command line.
630 #if defined(OS_WIN) 631 #if defined(OS_WIN)
631 CommandLine::Init(0, NULL); 632 CommandLine::Init(0, NULL);
632 #else 633 #else
633 CommandLine::Init(argc, argv); 634 CommandLine::Init(argc, argv);
634 #endif 635 #endif
635 636
636 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 637 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
637 638
639 Profiling::ProcessStarted();
640
638 #if defined(OS_POSIX) 641 #if defined(OS_POSIX)
639 if (HandleVersionSwitches(command_line)) 642 if (HandleVersionSwitches(command_line))
640 return 0; // Got a --version switch; exit with a success error code. 643 return 0; // Got a --version switch; exit with a success error code.
641 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) 644 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
642 // This will directly exit if the user asked for help. 645 // This will directly exit if the user asked for help.
643 HandleHelpSwitches(command_line); 646 HandleHelpSwitches(command_line);
644 #endif 647 #endif
645 #endif // OS_POSIX 648 #endif // OS_POSIX
646 649
647 std::string process_type = 650 std::string process_type =
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
923 926
924 int exit_code = RunNamedProcessTypeMain(process_type, main_params); 927 int exit_code = RunNamedProcessTypeMain(process_type, main_params);
925 928
926 if (SubprocessNeedsResourceBundle(process_type)) 929 if (SubprocessNeedsResourceBundle(process_type))
927 ResourceBundle::CleanupSharedInstance(); 930 ResourceBundle::CleanupSharedInstance();
928 931
929 LowLevelShutdown(); 932 LowLevelShutdown();
930 933
931 return exit_code; 934 return exit_code;
932 } 935 }
OLDNEW
« no previous file with comments | « chrome/app/chrome_command_ids.h ('k') | chrome/app/generated_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698