diff options
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | base/sys_byteorder.h | 8 | ||||
-rw-r--r-- | chrome/browser/chrome_content_browser_client.cc | 2 | ||||
-rw-r--r-- | chrome/browser/chrome_notification_types.h | 4 | ||||
-rw-r--r-- | chrome/browser/process_singleton.h | 14 | ||||
-rw-r--r-- | chrome/common/url_constants.cc | 4 | ||||
-rw-r--r-- | chrome/common/url_constants.h | 2 | ||||
-rw-r--r-- | chrome/renderer/pepper/ppb_pdf_impl.cc | 6 | ||||
-rw-r--r-- | content/browser/browser_main_loop.cc | 6 | ||||
-rw-r--r-- | content/browser/plugin_service_impl.cc | 3 | ||||
-rw-r--r-- | content/browser/web_contents/web_contents_impl.cc | 2 | ||||
-rw-r--r-- | content/renderer/pepper/pepper_plugin_instance_impl.cc | 2 | ||||
-rw-r--r-- | skia/ext/vector_platform_device_skia.cc | 2 | ||||
-rw-r--r-- | skia/ext/vector_platform_device_skia.h | 2 | ||||
-rw-r--r-- | third_party/leveldatabase/env_chromium.cc | 3 | ||||
-rwxr-xr-x | tools/clang/scripts/plugin_flags.sh | 2 | ||||
-rw-r--r-- | ui/base/l10n/l10n_util.cc | 4 |
17 files changed, 37 insertions, 30 deletions
@@ -83,6 +83,7 @@ Francois Kritzinger <francoisk777@gmail.com> Gaetano Mendola <mendola@gmail.com> Gajendra Singh <wxjg68@motorola.com> Gao Chun <gaochun.dev@gmail.com> +George Liaskos <geo.liaskos@gmail.com> Giuseppe Iuculano <giuseppe@iuculano.it> Glenn Adams <glenn@chromium.org> Goutham Jagannatha <wrm364@motorola.com> diff --git a/base/sys_byteorder.h b/base/sys_byteorder.h index 97e33ac..17b662c 100644 --- a/base/sys_byteorder.h +++ b/base/sys_byteorder.h @@ -25,7 +25,7 @@ #include <stdlib.h> #elif defined(OS_MACOSX) #include <libkern/OSByteOrder.h> -#elif defined(OS_OPENBSD) +#elif defined(OS_BSD) #include <sys/endian.h> #else #include <byteswap.h> @@ -42,6 +42,8 @@ inline uint16 ByteSwap(uint16 x) { return OSSwapInt16(x); #elif defined(OS_OPENBSD) return swap16(x); +#elif defined(OS_FREEBSD) + return bswap16(x); #else return bswap_16(x); #endif @@ -53,6 +55,8 @@ inline uint32 ByteSwap(uint32 x) { return OSSwapInt32(x); #elif defined(OS_OPENBSD) return swap32(x); +#elif defined(OS_FREEBSD) + return bswap32(x); #else return bswap_32(x); #endif @@ -64,6 +68,8 @@ inline uint64 ByteSwap(uint64 x) { return OSSwapInt64(x); #elif defined(OS_OPENBSD) return swap64(x); +#elif defined(OS_FREEBSD) + return bswap64(x); #else return bswap_64(x); #endif diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index d30780f..9f4c0db 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc @@ -169,7 +169,7 @@ #include "chrome/browser/chrome_browser_main_posix.h" #endif -#if defined(OS_LINUX) || defined(OS_OPENBSD) || defined(OS_ANDROID) +#if defined(OS_POSIX) && !defined(OS_MACOSX) #include "base/linux_util.h" #include "chrome/browser/crash_handler_host_linux.h" #endif diff --git a/chrome/browser/chrome_notification_types.h b/chrome/browser/chrome_notification_types.h index 6a0d34ae9..4f2c15e 100644 --- a/chrome/browser/chrome_notification_types.h +++ b/chrome/browser/chrome_notification_types.h @@ -47,13 +47,13 @@ enum NotificationType { // that was closed, no details are expected. NOTIFICATION_WINDOW_CLOSED, -#if defined(OS_LINUX) +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) // On Linux maximize can be an asynchronous operation. This notification // indicates that the window has been maximized. The source is // a Source<BrowserWindow> containing the BrowserWindow that was maximized. // No details are expected. NOTIFICATION_BROWSER_WINDOW_MAXIMIZED, -#endif // defined(OS_LINUX) +#endif // Sent when the language (English, French...) for a page has been detected. // The details Details<std::string> contain the ISO 639-1 language code and diff --git a/chrome/browser/process_singleton.h b/chrome/browser/process_singleton.h index 1594cd5..94d45d1 100644 --- a/chrome/browser/process_singleton.h +++ b/chrome/browser/process_singleton.h @@ -24,9 +24,9 @@ #include "base/threading/non_thread_safe.h" #include "ui/gfx/native_widget_types.h" -#if defined(OS_LINUX) || defined(OS_OPENBSD) +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) #include "base/files/scoped_temp_dir.h" -#endif // defined(OS_LINUX) || defined(OS_OPENBSD) +#endif #if defined(OS_WIN) #include "base/win/message_window.h" @@ -88,9 +88,9 @@ class ProcessSingleton : public base::NonThreadSafe { // Clear any lock state during shutdown. void Cleanup(); -#if defined(OS_LINUX) || defined(OS_OPENBSD) +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) static void DisablePromptForTesting(); -#endif // defined(OS_LINUX) || defined(OS_OPENBSD) +#endif protected: // Notify another process, if available. @@ -99,7 +99,7 @@ class ProcessSingleton : public base::NonThreadSafe { // On Windows, Create() has to be called before this. NotifyResult NotifyOtherProcess(); -#if defined(OS_LINUX) || defined(OS_OPENBSD) +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) // Exposed for testing. We use a timeout on Linux, and in tests we want // this timeout to be short. NotifyResult NotifyOtherProcessWithTimeout(const CommandLine& command_line, @@ -111,7 +111,7 @@ class ProcessSingleton : public base::NonThreadSafe { void OverrideCurrentPidForTesting(base::ProcessId pid); void OverrideKillCallbackForTesting( const base::Callback<void(int)>& callback); -#endif // defined(OS_LINUX) || defined(OS_OPENBSD) +#endif private: #if !defined(OS_MACOSX) @@ -130,7 +130,7 @@ class ProcessSingleton : public base::NonThreadSafe { bool is_virtualized_; // Stuck inside Microsoft Softricity VM environment. HANDLE lock_file_; base::FilePath user_data_dir_; -#elif defined(OS_LINUX) || defined(OS_OPENBSD) +#elif defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) // Return true if the given pid is one of our child processes. // Assumes that the current pid is the root of all pids of the current // instance. diff --git a/chrome/common/url_constants.cc b/chrome/common/url_constants.cc index 5fa5190..b1dfee8 100644 --- a/chrome/common/url_constants.cc +++ b/chrome/common/url_constants.cc @@ -235,7 +235,7 @@ const char kChromeUIThemePath[] = "theme"; const char kChromeUIWelcomeHost[] = "welcome"; #endif -#if defined(OS_LINUX) || defined(OS_OPENBSD) +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) const char kChromeUILinuxProxyConfigHost[] = "linux-proxy-config"; const char kChromeUISandboxHost[] = "sandbox"; #endif @@ -555,7 +555,7 @@ const char* const kChromeHostURLs[] = { #if defined(OS_WIN) kChromeUIConflictsHost, #endif -#if defined(OS_LINUX) || defined(OS_OPENBSD) +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) kChromeUILinuxProxyConfigHost, kChromeUISandboxHost, #endif diff --git a/chrome/common/url_constants.h b/chrome/common/url_constants.h index 7030610..8c98a53 100644 --- a/chrome/common/url_constants.h +++ b/chrome/common/url_constants.h @@ -227,7 +227,7 @@ extern const char kChromeUIThemePath[]; extern const char kChromeUIWelcomeHost[]; #endif -#if defined(OS_LINUX) || defined(OS_OPENBSD) +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) extern const char kChromeUILinuxProxyConfigHost[]; extern const char kChromeUISandboxHost[]; #endif diff --git a/chrome/renderer/pepper/ppb_pdf_impl.cc b/chrome/renderer/pepper/ppb_pdf_impl.cc index d245870..d63443e 100644 --- a/chrome/renderer/pepper/ppb_pdf_impl.cc +++ b/chrome/renderer/pepper/ppb_pdf_impl.cc @@ -44,7 +44,7 @@ using content::RenderThread; namespace { -#if defined(OS_LINUX) || defined(OS_OPENBSD) +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) class PrivateFontFile : public ppapi::Resource { public: PrivateFontFile(PP_Instance instance, int fd) @@ -192,7 +192,7 @@ PP_Resource GetFontFileWithFallback( PP_Instance instance_id, const PP_BrowserFont_Trusted_Description* description, PP_PrivateFontCharset charset) { -#if defined(OS_LINUX) || defined(OS_OPENBSD) +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) // Validate the instance before using it below. if (!content::PepperPluginInstance::Get(instance_id)) return 0; @@ -224,7 +224,7 @@ bool GetFontTableForPrivateFontFile(PP_Resource font_file, uint32_t table, void* output, uint32_t* output_length) { -#if defined(OS_LINUX) || defined(OS_OPENBSD) +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) ppapi::Resource* resource = PpapiGlobals::Get()->GetResourceTracker()->GetResource(font_file); if (!resource) diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc index d543703..14dd614 100644 --- a/content/browser/browser_main_loop.cc +++ b/content/browser/browser_main_loop.cc @@ -82,7 +82,7 @@ #include "ui/base/l10n/l10n_util_win.h" #endif -#if defined(OS_LINUX) || defined(OS_OPENBSD) +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) #include <glib-object.h> #endif @@ -175,7 +175,7 @@ void SetupSandbox(const CommandLine& parsed_command_line) { } #endif -#if defined(OS_LINUX) || defined(OS_OPENBSD) +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) static void GLibLogHandler(const gchar* log_domain, GLogLevelFlags log_level, const gchar* message, @@ -994,7 +994,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) || defined(OS_OPENBSD) +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) // g_type_init will be deprecated in 2.36. 2.35 is the development // version for 2.36, hence do not call g_type_init starting 2.35. // http://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#g-type-init diff --git a/content/browser/plugin_service_impl.cc b/content/browser/plugin_service_impl.cc index 8ffea2d..b46af4f 100644 --- a/content/browser/plugin_service_impl.cc +++ b/content/browser/plugin_service_impl.cc @@ -788,7 +788,8 @@ void PluginServiceImpl::GetInternalPlugins( } bool PluginServiceImpl::NPAPIPluginsSupported() { -#if defined(OS_WIN) || defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(USE_AURA)) +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) || \ + (defined(OS_LINUX) && !defined(USE_AURA)) return true; #else return false; diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc index 92112a7..3a9f25c 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc @@ -3767,7 +3767,7 @@ bool WebContentsImpl::CreateRenderViewForRenderManager( return false; } -#if defined(OS_LINUX) || defined(OS_OPENBSD) +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) // Force a ViewMsg_Resize to be sent, needed to make plugins show up on // linux. See crbug.com/83941. if (rwh_view) { diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc index c9d10af..f8b2cff 100644 --- a/content/renderer/pepper/pepper_plugin_instance_impl.cc +++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc @@ -1741,7 +1741,7 @@ bool PepperPluginInstanceImpl::PrintPDFOutput(PP_Resource print_output, #endif // defined(OS_WIN) bool ret = false; -#if defined(OS_LINUX) || defined(OS_MACOSX) +#if defined(OS_POSIX) && !defined(OS_ANDROID) // On Linux we just set the final bits in the native metafile // (NativeMetafile and PreviewMetafile must have compatible formats, // i.e. both PDF for this to work). diff --git a/skia/ext/vector_platform_device_skia.cc b/skia/ext/vector_platform_device_skia.cc index d8d3084..b8b5c6b 100644 --- a/skia/ext/vector_platform_device_skia.cc +++ b/skia/ext/vector_platform_device_skia.cc @@ -77,7 +77,7 @@ CGContextRef VectorPlatformDeviceSkia::GetBitmapContext() { SkASSERT(false); return NULL; } -#elif defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_OPENBSD) +#elif defined(OS_POSIX) void VectorPlatformDeviceSkia::DrawToNativeContext( PlatformSurface surface, int x, int y, const PlatformRect* src_rect) { // Should never be called on Linux. diff --git a/skia/ext/vector_platform_device_skia.h b/skia/ext/vector_platform_device_skia.h index fe71ba3..cf392c05 100644 --- a/skia/ext/vector_platform_device_skia.h +++ b/skia/ext/vector_platform_device_skia.h @@ -41,7 +41,7 @@ class VectorPlatformDeviceSkia : public SkPDFDevice, public PlatformDevice { int y, const CGRect* src_rect) OVERRIDE; virtual CGContextRef GetBitmapContext() OVERRIDE; -#elif defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_OPENBSD) +#elif defined(OS_POSIX) virtual void DrawToNativeContext(PlatformSurface surface, int x, int y, diff --git a/third_party/leveldatabase/env_chromium.cc b/third_party/leveldatabase/env_chromium.cc index 97f6c8e..ed0acfd 100644 --- a/third_party/leveldatabase/env_chromium.cc +++ b/third_party/leveldatabase/env_chromium.cc @@ -48,8 +48,7 @@ namespace leveldb_env { namespace { -#if defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_ANDROID) || \ - defined(OS_OPENBSD) +#if (defined(OS_POSIX) && !defined(OS_LINUX)) || defined(OS_WIN) // The following are glibc-specific size_t fread_wrapper(void *ptr, size_t size, size_t n, FILE *file) { diff --git a/tools/clang/scripts/plugin_flags.sh b/tools/clang/scripts/plugin_flags.sh index 0d8dea5..ac941d7 100755 --- a/tools/clang/scripts/plugin_flags.sh +++ b/tools/clang/scripts/plugin_flags.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/ui/base/l10n/l10n_util.cc b/ui/base/l10n/l10n_util.cc index 513a615..e0929dc 100644 --- a/ui/base/l10n/l10n_util.cc +++ b/ui/base/l10n/l10n_util.cc @@ -35,7 +35,7 @@ #include "ui/base/l10n/l10n_util_android.h" #endif -#if defined(OS_LINUX) +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) #include <glib.h> #endif @@ -452,7 +452,7 @@ std::string GetApplicationLocale(const std::string& pref_locale) { // On Android, query java.util.Locale for the default locale. candidates.push_back(GetDefaultLocale()); -#elif defined(OS_LINUX) +#elif defined(OS_POSIX) // If we're on a different Linux system, we have glib. // GLib implements correct environment variable parsing with |