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

Side by Side Diff: base/threading/platform_thread_win.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/threading/non_thread_safe_unittest.cc ('k') | base/threading/thread_checker.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/threading/platform_thread.h" 5 #include "base/threading/platform_thread.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/debug/alias.h" 9 #include "base/debug/alias.h"
10 #include "base/debug/profiler.h" 10 #include "base/debug/profiler.h"
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 break; 244 break;
245 case ThreadPriority::REALTIME_AUDIO: 245 case ThreadPriority::REALTIME_AUDIO:
246 desired_priority = THREAD_PRIORITY_TIME_CRITICAL; 246 desired_priority = THREAD_PRIORITY_TIME_CRITICAL;
247 break; 247 break;
248 default: 248 default:
249 NOTREACHED() << "Unknown priority."; 249 NOTREACHED() << "Unknown priority.";
250 break; 250 break;
251 } 251 }
252 DCHECK_NE(desired_priority, THREAD_PRIORITY_ERROR_RETURN); 252 DCHECK_NE(desired_priority, THREAD_PRIORITY_ERROR_RETURN);
253 253
254 #if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON) 254 #if DCHECK_IS_ON()
255 const BOOL success = 255 const BOOL success =
256 #endif 256 #endif
257 ::SetThreadPriority(PlatformThread::CurrentHandle().platform_handle(), 257 ::SetThreadPriority(PlatformThread::CurrentHandle().platform_handle(),
258 desired_priority); 258 desired_priority);
259 DPLOG_IF(ERROR, !success) << "Failed to set thread priority to " 259 DPLOG_IF(ERROR, !success) << "Failed to set thread priority to "
260 << desired_priority; 260 << desired_priority;
261 } 261 }
262 262
263 // static 263 // static
264 ThreadPriority PlatformThread::GetCurrentThreadPriority() { 264 ThreadPriority PlatformThread::GetCurrentThreadPriority() {
(...skipping 10 matching lines...) Expand all
275 return ThreadPriority::REALTIME_AUDIO; 275 return ThreadPriority::REALTIME_AUDIO;
276 case THREAD_PRIORITY_ERROR_RETURN: 276 case THREAD_PRIORITY_ERROR_RETURN:
277 DPCHECK(false) << "GetThreadPriority error"; // Falls through. 277 DPCHECK(false) << "GetThreadPriority error"; // Falls through.
278 default: 278 default:
279 NOTREACHED() << "Unexpected priority: " << priority; 279 NOTREACHED() << "Unexpected priority: " << priority;
280 return ThreadPriority::NORMAL; 280 return ThreadPriority::NORMAL;
281 } 281 }
282 } 282 }
283 283
284 } // namespace base 284 } // namespace base
OLDNEW
« no previous file with comments | « base/threading/non_thread_safe_unittest.cc ('k') | base/threading/thread_checker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698