diff options
author | Kristian Monsen <kristianm@google.com> | 2011-08-11 15:55:04 +0100 |
---|---|---|
committer | Kristian Monsen <kristianm@google.com> | 2011-08-11 16:01:02 +0100 |
commit | 9639f9bb6f038fcff8d26463ba0ac698357eee46 (patch) | |
tree | bbe695f579fd299eceb382dc2640c57f5f33d532 | |
parent | 677d221f3db65a09edadef370b3cc360e71dd0ae (diff) | |
download | external_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
-rw-r--r-- | base/message_loop.h | 10 | ||||
-rw-r--r-- | net/url_request/url_request.h | 5 |
2 files changed, 15 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); } diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h index b6d58ce..0c91e07 100644 --- a/net/url_request/url_request.h +++ b/net/url_request/url_request.h @@ -552,8 +552,13 @@ class URLRequest : public base::NonThreadSafe { // Returns the priority level for this request. RequestPriority priority() const { return priority_; } void set_priority(RequestPriority priority) { +#ifdef ANDROID + DCHECK_GE(static_cast<int>(priority), static_cast<int>(HIGHEST)); + DCHECK_LT(static_cast<int>(priority), static_cast<int>(NUM_PRIORITIES)); +#else DCHECK_GE(priority, HIGHEST); DCHECK_LT(priority, NUM_PRIORITIES); +#endif priority_ = priority; } |