summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2011-08-11 15:55:04 +0100
committerKristian Monsen <kristianm@google.com>2011-08-11 16:01:02 +0100
commit9639f9bb6f038fcff8d26463ba0ac698357eee46 (patch)
treebbe695f579fd299eceb382dc2640c57f5f33d532 /base
parent677d221f3db65a09edadef370b3cc360e71dd0ae (diff)
downloadexternal_chromium-9639f9bb6f038fcff8d26463ba0ac698357eee46.zip
external_chromium-9639f9bb6f038fcff8d26463ba0ac698357eee46.tar.gz
external_chromium-9639f9bb6f038fcff8d26463ba0ac698357eee46.tar.bz2
Part of fix for bug 5152544 Reduce the number of warning
Change-Id: I960864ea02e41fda180544a5d077f63c3c3119b9
Diffstat (limited to 'base')
-rw-r--r--base/message_loop.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/base/message_loop.h b/base/message_loop.h
index 519e4a3..2264c6e 100644
--- a/base/message_loop.h
+++ b/base/message_loop.h
@@ -516,7 +516,12 @@ class BASE_API MessageLoopForUI : public MessageLoop {
// Returns the MessageLoopForUI of the current thread.
static MessageLoopForUI* current() {
MessageLoop* loop = MessageLoop::current();
+#ifdef ANDROID
+ DCHECK_EQ(static_cast<int>(MessageLoop::TYPE_UI),
+ static_cast<int>(loop->type()));
+#else
DCHECK_EQ(MessageLoop::TYPE_UI, loop->type());
+#endif
return static_cast<MessageLoopForUI*>(loop);
}
@@ -590,7 +595,12 @@ class BASE_API MessageLoopForIO : public MessageLoop {
// Returns the MessageLoopForIO of the current thread.
static MessageLoopForIO* current() {
MessageLoop* loop = MessageLoop::current();
+#ifdef ANDROID
+ DCHECK_EQ(static_cast<int>(MessageLoop::TYPE_IO),
+ static_cast<int>(loop->type()));
+#else
DCHECK_EQ(MessageLoop::TYPE_IO, loop->type());
+#endif
return static_cast<MessageLoopForIO*>(loop);
}