diff options
Diffstat (limited to 'chrome/browser/sync/notifier')
8 files changed, 17 insertions, 12 deletions
diff --git a/chrome/browser/sync/notifier/base/async_dns_lookup.cc b/chrome/browser/sync/notifier/base/async_dns_lookup.cc index a9fcd0c..869eb23 100644 --- a/chrome/browser/sync/notifier/base/async_dns_lookup.cc +++ b/chrome/browser/sync/notifier/base/async_dns_lookup.cc @@ -4,17 +4,20 @@ #include "chrome/browser/sync/notifier/base/async_dns_lookup.h" -#ifdef POSIX +#include "build/build_config.h" + +#if defined(OS_POSIX) #include <arpa/inet.h> #include <netdb.h> #include <netinet/in.h> #include <netinet/ip.h> #include <sys/socket.h> #include <sys/types.h> -#endif // POSIX +#endif // defined(OS_POSIX) #include <vector> +#include "base/basictypes.h" #include "base/logging.h" #include "chrome/browser/sync/notifier/base/nethelpers.h" #include "chrome/browser/sync/notifier/gaia_auth/inet_aton.h" diff --git a/chrome/browser/sync/notifier/base/fastalloc.h b/chrome/browser/sync/notifier/base/fastalloc.h index ed19a53..244a1f8 100644 --- a/chrome/browser/sync/notifier/base/fastalloc.h +++ b/chrome/browser/sync/notifier/base/fastalloc.h @@ -38,7 +38,7 @@ class FastAlloc { private: void freeBuffer() { -#ifdef DEBUG +#if defined(DEBUG) memset(buffer_, 0xCC, size_ * sizeof(T)); #endif diff --git a/chrome/browser/sync/notifier/base/nethelpers.h b/chrome/browser/sync/notifier/base/nethelpers.h index 604e69df..6c859a3 100644 --- a/chrome/browser/sync/notifier/base/nethelpers.h +++ b/chrome/browser/sync/notifier/base/nethelpers.h @@ -5,10 +5,12 @@ #ifndef CHROME_BROWSER_SYNC_NOTIFIER_BASE_NETHELPERS_H_ #define CHROME_BROWSER_SYNC_NOTIFIER_BASE_NETHELPERS_H_ -#ifdef POSIX +#include "base/basictypes.h" + +#if defined(OS_POSIX) #include <cstddef> #include <netdb.h> -#elif WIN32 +#elif defined(OS_WIN) #include <winsock2.h> #endif diff --git a/chrome/browser/sync/notifier/base/time.h b/chrome/browser/sync/notifier/base/time.h index 338ad71..c6b6352 100644 --- a/chrome/browser/sync/notifier/base/time.h +++ b/chrome/browser/sync/notifier/base/time.h @@ -21,7 +21,7 @@ const time64 kMaxTime100ns = UINT64_C(9223372036854775807); // Time difference in 100NS granularity between platform-dependent starting // time and Jan 1, 1970. -#ifdef WIN32 +#if defined(OS_WIN) // On Windows time64 is seconds since Jan 1, 1601. #define kStart100NsTimeToEpoch (116444736000000000uI64) #else diff --git a/chrome/browser/sync/notifier/communicator/mailbox.cc b/chrome/browser/sync/notifier/communicator/mailbox.cc index ebb32a8..df8d7cf 100644 --- a/chrome/browser/sync/notifier/communicator/mailbox.cc +++ b/chrome/browser/sync/notifier/communicator/mailbox.cc @@ -195,7 +195,7 @@ bool MessageThread::unread() const { return (labels_->find("^u") != labels_->end()); } -#ifdef _DEBUG +#if defined(DEBUG) // Non-debug version is inline and empty. void MessageThread::AssertValid() const { assert(thread_id_ != 0); diff --git a/chrome/browser/sync/notifier/communicator/mailbox.h b/chrome/browser/sync/notifier/communicator/mailbox.h index feadc86..ae44cb3 100644 --- a/chrome/browser/sync/notifier/communicator/mailbox.h +++ b/chrome/browser/sync/notifier/communicator/mailbox.h @@ -105,7 +105,7 @@ class MessageThread { bool starred() const; bool unread() const; -#ifdef _DEBUG +#if defined(DEBUG) void AssertValid() const; #else inline void AssertValid() const {} diff --git a/chrome/browser/sync/notifier/gaia_auth/inet_aton.h b/chrome/browser/sync/notifier/gaia_auth/inet_aton.h index 6a5aee5..29e4dcb 100644 --- a/chrome/browser/sync/notifier/gaia_auth/inet_aton.h +++ b/chrome/browser/sync/notifier/gaia_auth/inet_aton.h @@ -7,7 +7,7 @@ #ifndef CHROME_BROWSER_SYNC_NOTIFIER_GAIA_AUTH_INET_ATON_H_ #define CHROME_BROWSER_SYNC_NOTIFIER_GAIA_AUTH_INET_ATON_H_ -#ifdef WIN32 +#if defined(OS_WIN) int inet_aton(const char* cp, struct in_addr* inp); #endif diff --git a/chrome/browser/sync/notifier/listener/mediator_thread_impl.cc b/chrome/browser/sync/notifier/listener/mediator_thread_impl.cc index fd25620..e4c8061 100644 --- a/chrome/browser/sync/notifier/listener/mediator_thread_impl.cc +++ b/chrome/browser/sync/notifier/listener/mediator_thread_impl.cc @@ -17,7 +17,7 @@ #include "chrome/browser/sync/notifier/listener/subscribe_task.h" #include "chrome/browser/sync/protocol/service_constants.h" #include "talk/base/thread.h" -#ifdef WIN32 +#if defined(OS_WIN) #include "talk/base/win32socketserver.h" #endif #include "talk/xmpp/xmppclient.h" @@ -41,7 +41,7 @@ void MediatorThreadImpl::Run() { PlatformThread::SetName("SyncEngine_MediatorThread"); // For win32, this sets up the win32socketserver. Note that it needs to // dispatch windows messages since that is what the win32 socket server uses. -#ifdef WIN32 +#if defined(OS_WIN) scoped_ptr<talk_base::SocketServer> socket_server( new talk_base::Win32SocketServer(this)); talk_base::SocketServer* old_socket_server = socketserver(); @@ -62,7 +62,7 @@ void MediatorThreadImpl::Run() { ProcessMessages(talk_base::kForever); -#ifdef WIN32 +#if defined(OS_WIN) set_socketserver(old_socket_server); socket_server.reset(); #endif |