diff options
author | pvalchev@google.com <pvalchev@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-03 20:13:06 +0000 |
---|---|---|
committer | pvalchev@google.com <pvalchev@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-03 20:13:06 +0000 |
commit | 25d47c7bbed2e0dd27aeceb815505fe450dcd6ad (patch) | |
tree | 53baddd19eca207d2abf2d4fe4cc929cb028f519 /chrome/browser/download | |
parent | 2083180a0fe0e7b32022f409c7549097f15e5757 (diff) | |
download | chromium_src-25d47c7bbed2e0dd27aeceb815505fe450dcd6ad.zip chromium_src-25d47c7bbed2e0dd27aeceb815505fe450dcd6ad.tar.gz chromium_src-25d47c7bbed2e0dd27aeceb815505fe450dcd6ad.tar.bz2 |
BSD port: another chunk of chrome/browser ifdef cleaning
Review URL: http://codereview.chromium.org/553153
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38004 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download')
-rw-r--r-- | chrome/browser/download/download_exe.cc | 8 | ||||
-rw-r--r-- | chrome/browser/download/download_manager_unittest.cc | 14 |
2 files changed, 11 insertions, 11 deletions
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) |