| OLD | NEW |
| 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2008 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 <Cocoa/Cocoa.h> | |
| 6 | |
| 7 #include "base/at_exit.h" | |
| 8 #include "base/process_util.h" | |
| 9 #import "chrome/app/breakpad_mac.h" | |
| 10 | |
| 11 // The entry point for all invocations of Chromium, browser and renderer. On | 5 // The entry point for all invocations of Chromium, browser and renderer. On |
| 12 // windows, this does nothing but load chrome.dll and invoke its entry point | 6 // windows, this does nothing but load chrome.dll and invoke its entry point |
| 13 // in order to make it easy to update the app from GoogleUpdate. We don't need | 7 // in order to make it easy to update the app from GoogleUpdate. We don't need |
| 14 // that extra layer with Keystone on the Mac, though we may run into issues | 8 // that extra layer with Keystone on the Mac, though we may run into issues |
| 15 // with Keychain prompts unless we sign the application. That shouldn't be | 9 // with Keychain prompts unless we sign the application. That shouldn't be |
| 16 // too hard, we just need infrastructure support to do it. | 10 // too hard, we just need infrastructure support to do it. |
| 17 | 11 |
| 18 extern "C" { | 12 extern "C" { |
| 19 int ChromeMain(int argc, const char** argv); | 13 int ChromeMain(int argc, const char** argv); |
| 20 } | 14 } |
| 21 | 15 |
| 22 int main(int argc, const char** argv) { | 16 int main(int argc, const char** argv) { |
| 23 base::EnableTerminationOnHeapCorruption(); | 17 return ChromeMain(argc, argv); |
| 24 | |
| 25 // The exit manager is in charge of calling the dtors of singletons. | |
| 26 // Win has one here, but we assert with multiples from BrowserMain() if we | |
| 27 // keep it. | |
| 28 // base::AtExitManager exit_manager; | |
| 29 | |
| 30 #if defined(GOOGLE_CHROME_BUILD) | |
| 31 InitCrashReporter(); | |
| 32 #endif | |
| 33 | |
| 34 int ret = ChromeMain(argc, argv); | |
| 35 | |
| 36 #if defined(GOOGLE_CHROME_BUILD) | |
| 37 DestructCrashReporter(); | |
| 38 #endif | |
| 39 | |
| 40 return ret; | |
| 41 } | 18 } |
| OLD | NEW |