Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(636)

Side by Side Diff: base/message_loop/incoming_task_queue.cc

Issue 2163023002: Unify usage of logging/assert macros in base/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix base/android/build_info.cc compile Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/memory/singleton.h ('k') | base/numerics/safe_numerics_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/message_loop/incoming_task_queue.h" 5 #include "base/message_loop/incoming_task_queue.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/synchronization/waitable_event.h" 11 #include "base/synchronization/waitable_event.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "build/build_config.h" 13 #include "build/build_config.h"
14 14
15 namespace base { 15 namespace base {
16 namespace internal { 16 namespace internal {
17 17
18 namespace { 18 namespace {
19 19
20 #if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON) 20 #if DCHECK_IS_ON()
21 // Delays larger than this are often bogus, and a warning should be emitted in 21 // Delays larger than this are often bogus, and a warning should be emitted in
22 // debug builds to warn developers. http://crbug.com/450045 22 // debug builds to warn developers. http://crbug.com/450045
23 const int kTaskDelayWarningThresholdInSeconds = 23 const int kTaskDelayWarningThresholdInSeconds =
24 14 * 24 * 60 * 60; // 14 days. 24 14 * 24 * 60 * 60; // 14 days.
25 #endif 25 #endif
26 26
27 // Returns true if MessagePump::ScheduleWork() must be called one 27 // Returns true if MessagePump::ScheduleWork() must be called one
28 // time for every task that is added to the MessageLoop incoming queue. 28 // time for every task that is added to the MessageLoop incoming queue.
29 bool AlwaysNotifyPump(MessageLoop::Type type) { 29 bool AlwaysNotifyPump(MessageLoop::Type type) {
30 #if defined(OS_ANDROID) 30 #if defined(OS_ANDROID)
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 // that wants to post a task will be blocked until this thread switches back 190 // that wants to post a task will be blocked until this thread switches back
191 // in and releases |incoming_queue_lock_|. 191 // in and releases |incoming_queue_lock_|.
192 if (schedule_work) 192 if (schedule_work)
193 message_loop_->ScheduleWork(); 193 message_loop_->ScheduleWork();
194 194
195 return true; 195 return true;
196 } 196 }
197 197
198 } // namespace internal 198 } // namespace internal
199 } // namespace base 199 } // namespace base
OLDNEW
« no previous file with comments | « base/memory/singleton.h ('k') | base/numerics/safe_numerics_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698