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

Unified Diff: content/browser/browser_main_loop.cc

Issue 8341052: share all the needed linux code with OpenBSD in chrome and content (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: remove unused header Created 9 years, 2 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
Index: content/browser/browser_main_loop.cc
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index 944d40c7e34f010b711dc38cc96fe6abcb2b953d..20dc513f6d832c905d6e1f0e6529883926c1a61d 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -36,7 +36,7 @@
#include "net/base/winsock_init.h"
#endif
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_OPENBSD)
#include <glib-object.h>
#endif
@@ -69,7 +69,7 @@ void SetupSandbox(const CommandLine& parsed_command_line) {
if (stat("/proc/self/exe", &st) == 0 && st.st_uid == getuid())
sandbox_binary = getenv("CHROME_DEVEL_SANDBOX");
-#if defined(LINUX_SANDBOX_PATH)
+#if defined(OS_LINUX)
if (!sandbox_binary)
sandbox_binary = LINUX_SANDBOX_PATH;
#endif
@@ -86,7 +86,7 @@ void SetupSandbox(const CommandLine& parsed_command_line) {
}
#endif
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_OPENBSD)
static void GLibLogHandler(const gchar* log_domain,
GLogLevelFlags log_level,
const gchar* message,
@@ -305,7 +305,7 @@ void BrowserMainLoop::InitializeToolkit() {
// are no #else branches on any #ifs.
// TODO(stevenjb): Move platform specific code into platform specific Parts
// (Need to add InitializeToolkit stage to BrowserParts).
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_OPENBSD)
// We want to call g_thread_init(), but in some codepaths (tests) it
// is possible it has already been called. In older versions of
// GTK, it is an error to call g_thread_init twice; unfortunately,

Powered by Google App Engine
This is Rietveld 408576698