Index: chrome/app/chrome_dll_main.cc |
=================================================================== |
--- chrome/app/chrome_dll_main.cc (revision 49446) |
+++ chrome/app/chrome_dll_main.cc (working copy) |
@@ -23,7 +23,7 @@ |
#include <unistd.h> |
#endif |
-#if defined(OS_POSIX) && !defined(OS_MACOSX) |
+#if defined(USE_X11) |
#include <gdk/gdk.h> |
#include <glib.h> |
#include <gtk/gtk.h> |
@@ -64,6 +64,10 @@ |
#include "base/nss_util.h" |
#endif |
+#if defined(USE_X11) |
+#include "app/x11_util.h" |
+#endif |
+ |
#if defined(OS_LINUX) |
#include "chrome/browser/renderer_host/render_sandbox_host_linux.h" |
#include "chrome/browser/zygote_host_linux.h" |
@@ -202,9 +206,9 @@ |
return (pos != std::wstring::npos); |
} |
-#endif // OS_WIN |
+#endif // defined(OS_WIN) |
-#if defined(OS_POSIX) && !defined(OS_MACOSX) |
+#if defined(USE_X11) |
static void GLibLogHandler(const gchar* log_domain, |
GLogLevelFlags log_level, |
const gchar* message, |
@@ -259,7 +263,9 @@ |
NULL); |
} |
} |
+#endif // defined(USE_X11) |
+#if defined(OS_LINUX) |
static void AdjustLinuxOOMScore(const std::string& process_type) { |
const int kMiscScore = 7; |
const int kPluginScore = 10; |
@@ -293,7 +299,7 @@ |
if (score > -1) |
base::AdjustOOMScore(base::GetCurrentProcId(), score); |
} |
-#endif // defined(OS_POSIX) && !defined(OS_MACOSX) |
+#endif // defined(OS_LINUX) |
// Register the invalid param handler and pure call handler to be able to |
// notify breakpad when it happens. |
@@ -704,8 +710,7 @@ |
// Update the process name (need resources to get the strings, so |
// only do this when ResourcesBundle has been initialized). |
SetMacProcessName(process_type); |
-#endif // defined(OS_MACOSX) |
- |
+#endif // defined(OS_MACOSX) |
} |
if (!process_type.empty()) |
@@ -836,6 +841,8 @@ |
// gtk_init() can change |argc| and |argv|. |
gtk_init(&argc, &argv); |
SetUpGLibLogHandler(); |
+ |
+ x11_util::SetX11ErrorHandlers(); |
#endif // defined(OS_LINUX) |
rv = BrowserMain(main_params); |