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

Unified Diff: chrome/app/chrome_main.cc

Issue 190853004: Convert ContentMain to take a struct instead of parameters that vary depending on the platform. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shell/shell_main.cc ('k') | content/app/android/content_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_main.cc
===================================================================
--- chrome/app/chrome_main.cc (revision 255743)
+++ chrome/app/chrome_main.cc (working copy)
@@ -26,16 +26,28 @@
#if defined(OS_WIN)
DLLEXPORT int __cdecl ChromeMain(HINSTANCE instance,
sandbox::SandboxInterfaceInfo* sandbox_info) {
+#elif defined(OS_POSIX)
+int ChromeMain(int argc, const char** argv) {
+#endif
+ ChromeMainDelegate chrome_main_delegate;
+ content::ContentMainParams params(&chrome_main_delegate);
+
+#if defined(OS_WIN)
// The process should crash when going through abnormal termination.
base::win::SetShouldCrashOnProcessDetach(true);
base::win::SetAbortBehaviorForCrashReporting();
- ChromeMainDelegate chrome_main_delegate;
- int rv = content::ContentMain(instance, sandbox_info, &chrome_main_delegate);
+ params.instance = instance;
+ params.sandbox_info = sandbox_info;
+#else
+ params.argc = argc;
+ params.argv = argv;
+#endif
+
+ int rv = content::ContentMain(params);
+
+#if defined(OS_WIN)
base::win::SetShouldCrashOnProcessDetach(false);
+#endif
+
return rv;
-#elif defined(OS_POSIX)
-int ChromeMain(int argc, const char** argv) {
- ChromeMainDelegate chrome_main_delegate;
- return content::ContentMain(argc, argv, &chrome_main_delegate);
-#endif
}
« no previous file with comments | « ash/shell/shell_main.cc ('k') | content/app/android/content_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698