summaryrefslogtreecommitdiffstats
path: root/chrome/app
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-05 19:26:07 +0000
committermark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-05 19:26:07 +0000
commite14a9f93c4ca927334008eb83127e1fb7598fe1c (patch)
treefa724e9008c20f9734084f6758625045e6f59452 /chrome/app
parent7fa319410e5dbc1739e476f317a33e0ab276a94a (diff)
downloadchromium_src-e14a9f93c4ca927334008eb83127e1fb7598fe1c.zip
chromium_src-e14a9f93c4ca927334008eb83127e1fb7598fe1c.tar.gz
chromium_src-e14a9f93c4ca927334008eb83127e1fb7598fe1c.tar.bz2
Move the entire application into a dylib (framework)
Review URL: http://codereview.chromium.org/160538 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22506 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app')
-rw-r--r--chrome/app/chrome_dll_main.cc25
-rw-r--r--chrome/app/chrome_exe_main.mm25
2 files changed, 25 insertions, 25 deletions
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc
index 43c22cf..7576dfd 100644
--- a/chrome/app/chrome_dll_main.cc
+++ b/chrome/app/chrome_dll_main.cc
@@ -92,6 +92,7 @@ DLLEXPORT int __cdecl ChromeMain(HINSTANCE instance,
}
#elif defined(OS_POSIX)
extern "C" {
+__attribute__((visibility("default")))
int ChromeMain(int argc, const char** argv);
}
#endif
@@ -295,12 +296,29 @@ int ChromeMain(int argc, const char** argv) {
#endif
#if defined(OS_MACOSX)
+ // TODO(mark): Some of these things ought to be handled in chrome_exe_main.mm,
+ // such as Breakpad initialization. Under the current architecture, nothing
+ // in chrome_exe_main can rely directly on chrome_dll code on the Mac,
+ // though, so until some of this code is refactored to avoid such a
+ // dependency, it lives here. See also the TODO(mark) below at
+ // DestructCrashReporter().
+ base::EnableTerminationOnHeapCorruption();
+
+ // The exit manager is in charge of calling the dtors of singletons.
+ // Win has one here, but we assert with multiples from BrowserMain() if we
+ // keep it.
+ // base::AtExitManager exit_manager;
+
+#if defined(GOOGLE_CHROME_BUILD)
+ InitCrashReporter();
+#endif
+
// If Breakpad is not present then turn off os crash dumps so we don't have
// to wait eons for Apple's Crash Reporter to generate a dump.
if (IsCrashReporterDisabled()) {
DebugUtil::DisableOSCrashDumps();
}
-#endif
+#endif // OS_MACOSX
RegisterInvalidParamHandler();
// The exit manager is in charge of calling the dtors of singleton objects.
@@ -556,5 +574,10 @@ int ChromeMain(int argc, const char** argv) {
logging::CleanupChromeLogging();
+#if defined(OS_MACOSX) && defined(GOOGLE_CHROME_BUILD)
+ // TODO(mark): See the TODO(mark) above at InitCrashReporter.
+ DestructCrashReporter();
+#endif // OS_MACOSX && GOOGLE_CHROME_BUILD
+
return rv;
}
diff --git a/chrome/app/chrome_exe_main.mm b/chrome/app/chrome_exe_main.mm
index e762067..53b546e 100644
--- a/chrome/app/chrome_exe_main.mm
+++ b/chrome/app/chrome_exe_main.mm
@@ -2,12 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include <Cocoa/Cocoa.h>
-
-#include "base/at_exit.h"
-#include "base/process_util.h"
-#import "chrome/app/breakpad_mac.h"
-
// The entry point for all invocations of Chromium, browser and renderer. On
// windows, this does nothing but load chrome.dll and invoke its entry point
// in order to make it easy to update the app from GoogleUpdate. We don't need
@@ -20,22 +14,5 @@ int ChromeMain(int argc, const char** argv);
}
int main(int argc, const char** argv) {
- base::EnableTerminationOnHeapCorruption();
-
- // The exit manager is in charge of calling the dtors of singletons.
- // Win has one here, but we assert with multiples from BrowserMain() if we
- // keep it.
- // base::AtExitManager exit_manager;
-
-#if defined(GOOGLE_CHROME_BUILD)
- InitCrashReporter();
-#endif
-
- int ret = ChromeMain(argc, argv);
-
-#if defined(GOOGLE_CHROME_BUILD)
- DestructCrashReporter();
-#endif
-
- return ret;
+ return ChromeMain(argc, argv);
}