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

Side by Side Diff: base/threading/platform_thread_internal_posix.cc

Issue 1015503002: Deduplicate PlatformThread's POSIX implementations of SetThreadPriority. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@background_threads
Patch Set: more fixes Created 5 years, 9 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
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/threading/platform_thread_internal_posix.h"
6
7 #include "base/logging.h"
8
9 namespace base {
10
11 namespace internal {
12
13 int ThreadPriorityToNiceValue(ThreadPriority priority) {
14 for (const ThreadPriorityToNiceValuePair& tnp :
rvargas (doing something else) 2015/03/17 22:15:21 nit: don't abbreviate tnp
gab 2015/03/18 19:01:05 how about "pair"? Or do you prefer something verbo
rvargas (doing something else) 2015/03/18 22:54:23 "pair" is fine
15 kThreadPriorityToNiceValueMap) {
16 if (tnp.priority == priority)
17 return tnp.nice_value;
18 }
19 NOTREACHED() << "Unknown ThreadPriority";
20 return 0;
21 }
22
23 } // namespace internal
24
25 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698