summaryrefslogtreecommitdiffstats
path: root/base/platform_thread.h
diff options
context:
space:
mode:
authorbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-07 18:31:40 +0000
committerbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-07 18:31:40 +0000
commit39be42426e89c7739555e45099c5326a3c525b8c (patch)
tree6a81b59079a58ba7f9c79c8253194a1fdf3901b0 /base/platform_thread.h
parenta6b4a185656b7b16d965e5ff0e469658c424e85d (diff)
downloadchromium_src-39be42426e89c7739555e45099c5326a3c525b8c.zip
chromium_src-39be42426e89c7739555e45099c5326a3c525b8c.tar.gz
chromium_src-39be42426e89c7739555e45099c5326a3c525b8c.tar.bz2
Add defines for the size of wchar_t to build_config.h. Use this in places where we currently have an OS-specific check.
Remove all WIN32 ifdefs from base and replace them with proper defined(OS...). I also fixed random style bits when I encountered them. I made major style fixes to string16. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@524 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/platform_thread.h')
-rw-r--r--base/platform_thread.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/base/platform_thread.h b/base/platform_thread.h
index 7f887d2..2dca402 100644
--- a/base/platform_thread.h
+++ b/base/platform_thread.h
@@ -27,16 +27,22 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#ifndef BASE_PLATFORM_THREAD_H__
-#define BASE_PLATFORM_THREAD_H__
+#ifndef BASE_PLATFORM_THREAD_H_
+#define BASE_PLATFORM_THREAD_H_
+
+#include "build/build_config.h"
+
+#if defined(OS_WIN)
-#ifdef WIN32
#include <windows.h>
typedef HANDLE PlatformThreadHandle;
-#else
+
+#elif defined(OS_POSIX)
+
#include <pthread.h>
typedef pthread_t PlatformThreadHandle;
-#endif
+
+#endif // defined(OS_POSIX)
class PlatformThread {
public:
@@ -49,8 +55,7 @@ class PlatformThread {
bool operator==(const PlatformThread& other_thread);
private:
-
PlatformThreadHandle thread_;
};
-#endif // BASE_PLATFORM_THREAD_H__
+#endif // BASE_PLATFORM_THREAD_H_