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 "base/process_util.h" | 5 #include "base/process_util.h" |
6 #include "build/build_config.h" | 6 #include "build/build_config.h" |
7 #include "chrome/browser/first_run/upgrade_util.h" | 7 #include "chrome/browser/first_run/upgrade_util.h" |
8 | 8 |
9 // The entry point for all invocations of Chromium, browser and renderer. On | 9 // The entry point for all invocations of Chromium, browser and renderer. On |
10 // windows, this does nothing but load chrome.dll and invoke its entry point in | 10 // windows, this does nothing but load chrome.dll and invoke its entry point in |
11 // order to make it easy to update the app from GoogleUpdate. We don't need | 11 // order to make it easy to update the app from GoogleUpdate. We don't need |
12 // that extra layer with on linux. | 12 // that extra layer with on linux. |
13 // | 13 // |
14 // TODO(tc): This is similar to chrome_exe_main_mac.mm. After it's | 14 // TODO(tc): This is similar to chrome_exe_main_mac.cc. After it's |
15 // more clear what needs to go here, we should evaluate whether or not | 15 // more clear what needs to go here, we should evaluate whether or not |
16 // to merge this file with chrome_exe_main_mac.mm. | 16 // to merge this file with chrome_exe_main_mac.cc. |
17 | 17 |
18 extern "C" { | 18 extern "C" { |
19 int ChromeMain(int argc, const char** argv); | 19 int ChromeMain(int argc, const char** argv); |
20 | 20 |
21 #if defined(OS_POSIX) && !defined(OS_MACOSX) && defined(USE_TCMALLOC) | 21 #if defined(OS_POSIX) && !defined(OS_MACOSX) && defined(USE_TCMALLOC) |
22 int tc_set_new_mode(int mode); | 22 int tc_set_new_mode(int mode); |
23 #endif | 23 #endif |
24 } | 24 } |
25 | 25 |
26 int main(int argc, const char** argv) { | 26 int main(int argc, const char** argv) { |
(...skipping 19 matching lines...) Expand all Loading... |
46 int return_code = ChromeMain(argc, argv); | 46 int return_code = ChromeMain(argc, argv); |
47 | 47 |
48 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 48 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
49 // Launch a new instance if we're shutting down because we detected an | 49 // Launch a new instance if we're shutting down because we detected an |
50 // upgrade in the persistent mode. | 50 // upgrade in the persistent mode. |
51 upgrade_util::RelaunchChromeBrowserWithNewCommandLineIfNeeded(); | 51 upgrade_util::RelaunchChromeBrowserWithNewCommandLineIfNeeded(); |
52 #endif | 52 #endif |
53 | 53 |
54 return return_code; | 54 return return_code; |
55 } | 55 } |
OLD | NEW |