summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/browser_about_handler.cc4
-rw-r--r--chrome/browser/browser_browsertest.cc2
-rw-r--r--chrome/browser/browser_main.cc10
-rw-r--r--chrome/browser/browser_process_impl.h4
-rw-r--r--chrome/browser/browser_resources.grd4
-rw-r--r--chrome/browser/chrome_thread.h2
-rw-r--r--chrome/browser/debugger/devtools_remote_listen_socket_unittest.cc3
-rw-r--r--chrome/browser/dom_ui/ntp_resource_cache.cc8
-rw-r--r--chrome/browser/download/download_exe.cc8
-rw-r--r--chrome/browser/download/download_manager_unittest.cc14
10 files changed, 30 insertions, 29 deletions
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc
index d0e5bd4..9b1e706 100644
--- a/chrome/browser/browser_about_handler.cc
+++ b/chrome/browser/browser_about_handler.cc
@@ -962,9 +962,7 @@ bool HandleNonNavigationAboutURL(const GURL& url) {
AboutNetworkDialog::RunDialog();
return true;
}
-#endif
-
-#if !defined(OS_LINUX) && defined(IPC_MESSAGE_LOG_ENABLED)
+#elif defined(OS_MACOSX) && defined(IPC_MESSAGE_LOG_ENABLED)
if (LowerCaseEqualsASCII(url.spec(), chrome::kChromeUIIPCURL)) {
// Run the dialog. This will re-use the existing one if it's already up.
AboutIPCDialog::RunDialog();
diff --git a/chrome/browser/browser_browsertest.cc b/chrome/browser/browser_browsertest.cc
index 89f9359..aa048f6 100644
--- a/chrome/browser/browser_browsertest.cc
+++ b/chrome/browser/browser_browsertest.cc
@@ -39,7 +39,7 @@ std::wstring WindowCaptionFromPageTitle(std::wstring page_title) {
if (page_title.empty())
return l10n_util::GetString(IDS_BROWSER_WINDOW_MAC_TAB_UNTITLED);
return page_title;
-#elif defined(OS_WIN) || defined(OS_LINUX)
+#else
if (page_title.empty())
return l10n_util::GetString(IDS_PRODUCT_NAME);
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index 38588ff..5627652 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -82,7 +82,7 @@
#include "chrome/app/breakpad_linux.h"
#endif
-#if defined(OS_LINUX)
+#if defined(OS_POSIX) && !defined(OS_MACOSX)
#include "chrome/common/gtk_util.h"
#endif
@@ -160,7 +160,7 @@ void RunUIMessageLoop(BrowserProcess* browser_process) {
#if defined(TOOLKIT_VIEWS)
views::AcceleratorHandler accelerator_handler;
MessageLoopForUI::current()->Run(&accelerator_handler);
-#elif defined(OS_LINUX)
+#elif defined(USE_X11)
MessageLoopForUI::current()->Run(NULL);
#elif defined(OS_POSIX)
MessageLoopForUI::current()->Run();
@@ -582,7 +582,7 @@ int BrowserMain(const MainFunctionParams& parameters) {
}
#endif // OS_CHROMEOS
-#if defined(OS_LINUX)
+#if defined(OS_POSIX) && !defined(OS_MACOSX)
gtk_util::SetDefaultWindowIcon();
#endif
@@ -781,7 +781,7 @@ int BrowserMain(const MainFunctionParams& parameters) {
break;
case ProcessSingleton::PROCESS_NOTIFIED:
-#if defined(OS_LINUX)
+#if defined(OS_POSIX) && !defined(OS_MACOSX)
printf("%s\n", base::SysWideToNativeMB(
l10n_util::GetString(IDS_USED_EXISTING_BROWSER)).c_str());
#endif
@@ -928,7 +928,7 @@ int BrowserMain(const MainFunctionParams& parameters) {
#if defined(OS_WIN)
if (InstallUtil::IsChromeFrameProcess())
MetricsLog::set_version_extension("-F");
-#elif defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)
+#elif defined(ARCH_CPU_64_BITS)
MetricsLog::set_version_extension("-64");
#endif // defined(OS_WIN)
diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_process_impl.h
index ec03c2f..166b0bb 100644
--- a/chrome/browser/browser_process_impl.h
+++ b/chrome/browser/browser_process_impl.h
@@ -79,7 +79,7 @@ class BrowserProcessImpl : public BrowserProcess, public NonThreadSafe {
return process_launcher_thread_.get();
}
-#if defined(OS_LINUX)
+#if defined(USE_X11)
virtual base::Thread* background_x11_thread() {
DCHECK(CalledOnValidThread());
// The BACKGROUND_X11 thread is created when the IO thread is created.
@@ -250,7 +250,7 @@ class BrowserProcessImpl : public BrowserProcess, public NonThreadSafe {
bool created_io_thread_;
scoped_ptr<IOThread> io_thread_;
-#if defined(OS_LINUX)
+#if defined(USE_X11)
// This shares a created flag with the IO thread.
scoped_ptr<base::Thread> background_x11_thread_;
#endif
diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resources.grd
index 4f18842..ab8f6c2 100644
--- a/chrome/browser/browser_resources.grd
+++ b/chrome/browser/browser_resources.grd
@@ -14,13 +14,13 @@ without changes to the corresponding grd file. dhg eyuuuuuuuww -->
<include name="IDR_ABOUT_PLUGINS_HTML" file="resources\about_plugins.html" type="BINDATA" />
<include name="IDR_ABOUT_VERSION_HTML" file="resources\about_version.html" flattenhtml="true" type="BINDATA" />
- <if expr="os == 'linux2'">
+ <if expr="os == 'linux2' or os == 'freebsd7' or os == 'openbsd4'">
<include name="IDR_ABOUT_MEMORY_HTML" file="resources\about_memory_linux.html" flattenhtml="true" type="BINDATA" />
</if>
<if expr="os == 'darwin'">
<include name="IDR_ABOUT_MEMORY_HTML" file="resources\about_memory_mac.html" flattenhtml="true" type="BINDATA" />
</if>
- <if expr="os != 'linux2' and os != 'darwin'">
+ <if expr="os != 'linux2' and os != 'darwin' and os != 'freebsd' and os != 'openbsd'">
<include name="IDR_ABOUT_MEMORY_HTML" file="resources\about_memory.html" flattenhtml="true" type="BINDATA" />
</if>
diff --git a/chrome/browser/chrome_thread.h b/chrome/browser/chrome_thread.h
index a8fe44b..9628e2f 100644
--- a/chrome/browser/chrome_thread.h
+++ b/chrome/browser/chrome_thread.h
@@ -54,7 +54,7 @@ class ChromeThread : public base::Thread {
// This is the thread that processes IPC and network messages.
IO,
-#if defined(OS_LINUX)
+#if defined(USE_X11)
// This thread has a second connection to the X server and is used to
// process UI requests when routing the request to the UI thread would risk
// deadlock.
diff --git a/chrome/browser/debugger/devtools_remote_listen_socket_unittest.cc b/chrome/browser/debugger/devtools_remote_listen_socket_unittest.cc
index c1db965..79755e9 100644
--- a/chrome/browser/debugger/devtools_remote_listen_socket_unittest.cc
+++ b/chrome/browser/debugger/devtools_remote_listen_socket_unittest.cc
@@ -5,6 +5,9 @@
#include "chrome/browser/debugger/devtools_remote_listen_socket_unittest.h"
#include <fcntl.h>
+#if defined(OS_POSIX)
+#include <netinet/in.h>
+#endif
#include "base/eintr_wrapper.h"
#include "net/base/net_util.h"
diff --git a/chrome/browser/dom_ui/ntp_resource_cache.cc b/chrome/browser/dom_ui/ntp_resource_cache.cc
index dde351b..9ff8799 100644
--- a/chrome/browser/dom_ui/ntp_resource_cache.cc
+++ b/chrome/browser/dom_ui/ntp_resource_cache.cc
@@ -36,10 +36,10 @@
#if defined(OS_WIN) || defined(TOOLKIT_VIEWS)
#include "chrome/browser/views/bookmark_bar_view.h"
-#elif defined(OS_LINUX)
-#include "chrome/browser/gtk/bookmark_bar_gtk.h"
#elif defined(OS_MACOSX)
#include "chrome/browser/cocoa/bookmark_bar_constants.h"
+#elif defined(OS_POSIX)
+#include "chrome/browser/gtk/bookmark_bar_gtk.h"
#endif
namespace {
@@ -108,10 +108,10 @@ std::string GetNewTabBackgroundCSS(const ThemeProvider* theme_provider,
// if it's a top-aligned bar.
#if defined(OS_WIN) || defined(TOOLKIT_VIEWS)
int offset = BookmarkBarView::kNewtabBarHeight;
-#elif defined(OS_LINUX)
- int offset = BookmarkBarGtk::kBookmarkBarNTPHeight;
#elif defined(OS_MACOSX)
int offset = bookmarks::kNTPBookmarkBarHeight;
+#elif defined(OS_POSIX)
+ int offset = BookmarkBarGtk::kBookmarkBarNTPHeight;
#else
int offset = 0;
#endif
diff --git a/chrome/browser/download/download_exe.cc b/chrome/browser/download/download_exe.cc
index 4e12022..5b37406 100644
--- a/chrome/browser/download/download_exe.cc
+++ b/chrome/browser/download/download_exe.cc
@@ -146,16 +146,16 @@ static const char* const g_executables[] = {
"xml",
"xsl",
"xslt",
-#elif defined(OS_LINUX)
+#elif defined(OS_MACOSX)
+ // TODO(thakis): Figure out what makes sense here -- crbug.com/19096
+ "dmg",
+#elif defined(OS_POSIX)
// TODO(estade): lengthen this list.
"exe",
"pl",
"py",
"rb",
"sh",
-#elif defined(OS_MACOSX)
- // TODO(thakis): Figure out what makes sense here -- crbug.com/19096
- "dmg",
#endif
};
diff --git a/chrome/browser/download/download_manager_unittest.cc b/chrome/browser/download/download_manager_unittest.cc
index 7c839f4..7e8f186 100644
--- a/chrome/browser/download/download_manager_unittest.cc
+++ b/chrome/browser/download/download_manager_unittest.cc
@@ -9,7 +9,7 @@
#include "chrome/browser/download/download_manager.h"
#include "testing/gtest/include/gtest/gtest.h"
-#if defined(OS_LINUX)
+#if defined(OS_POSIX) && !defined(OS_MACOSX)
#include <locale.h>
#endif
@@ -101,7 +101,7 @@ const struct {
// This block tests whether we append extensions based on MIME types;
// we don't do this on Linux, so we skip the tests rather than #ifdef
// them up.
-#if !defined(OS_LINUX)
+#if !defined(OS_POSIX) || defined(OS_MACOSX)
{"filename=my-cat",
"http://www.example.com/my-cat",
"image/jpeg",
@@ -123,7 +123,7 @@ const struct {
"http://www.example.com/my-cat",
"dance/party",
L"my-cat"},
-#endif // defined(OS_LINUX)
+#endif // !defined(OS_POSIX) || defined(OS_MACOSX)
{"filename=my-cat.jpg",
"http://www.example.com/my-cat.jpg",
@@ -449,7 +449,7 @@ const struct {
// Tests to ensure that the file names we generate from hints from the server
// (content-disposition, URL name, etc) don't cause security holes.
TEST_F(DownloadManagerTest, TestDownloadFilename) {
-#if defined(OS_LINUX)
+#if defined(OS_POSIX) && !defined(OS_MACOSX)
// This test doesn't run when the locale is not UTF-8 becuase some of the
// string conversions fail. This is OK (we have the default value) but they
// don't match our expectations.
@@ -572,8 +572,8 @@ const struct {
} // namespace
-#if !defined(OS_LINUX)
-// TODO(port): port to Linux.
+#if defined(OS_WIN) || defined(OS_MACOSX)
+// TODO(port): port to Linux/BSD.
TEST_F(DownloadManagerTest, GetSafeFilename) {
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kSafeFilenameCases); ++i) {
FilePath path(kSafeFilenameCases[i].path);
@@ -582,4 +582,4 @@ TEST_F(DownloadManagerTest, GetSafeFilename) {
EXPECT_EQ(kSafeFilenameCases[i].expected_path, path.value());
}
}
-#endif // OS_LINUX
+#endif // defined(OS_WIN) || defined(OS_MACOSX)