Index: base/threading/platform_thread_android.cc |
diff --git a/base/threading/platform_thread_android.cc b/base/threading/platform_thread_android.cc |
index aab4c1917dc9bf1c871267dac63e680b9b935d04..a31f65918fe621849d980dadd75ba8c63237fd15 100644 |
--- a/base/threading/platform_thread_android.cc |
+++ b/base/threading/platform_thread_android.cc |
@@ -38,17 +38,17 @@ namespace internal { |
// We use -6 for display, but we may want to split this into urgent (-8) and |
// non-urgent (-4). |
const ThreadPriorityToNiceValuePair kThreadPriorityToNiceValueMap[4] = { |
- {kThreadPriority_RealtimeAudio, -16}, |
- {kThreadPriority_Background, 10}, |
- {kThreadPriority_Normal, 0}, |
- {kThreadPriority_Display, -6}, |
+ {ThreadPriority::BACKGROUND, 10}, |
+ {ThreadPriority::NORMAL, 0}, |
+ {ThreadPriority::DISPLAY, -6}, |
+ {ThreadPriority::REALTIME_AUDIO, -16}, |
}; |
-bool HandleSetThreadPriorityForPlatform(PlatformThreadHandle handle, |
- ThreadPriority priority) { |
+bool SetThreadPriorityForPlatform(PlatformThreadHandle handle, |
+ ThreadPriority priority) { |
// On Android, we set the Audio priority through JNI as Audio priority |
// will also allow the process to run while it is backgrounded. |
- if (priority == kThreadPriority_RealtimeAudio) { |
+ if (priority == ThreadPriority::REALTIME_AUDIO) { |
JNIEnv* env = base::android::AttachCurrentThread(); |
Java_ThreadUtils_setThreadPriorityAudio(env, PlatformThread::CurrentId()); |
return true; |
@@ -56,6 +56,12 @@ bool HandleSetThreadPriorityForPlatform(PlatformThreadHandle handle, |
return false; |
} |
+bool GetThreadPriorityForPlatform(PlatformThreadHandle handle, |
+ ThreadPriority* priority) { |
+ NOTIMPLEMENTED(); |
+ return false; |
+} |
+ |
} // namespace internal |
void PlatformThread::SetName(const char* name) { |
@@ -83,7 +89,7 @@ void InitOnThread() { |
// Threads on linux/android may inherit their priority from the thread |
// where they were created. This sets all new threads to the default. |
PlatformThread::SetThreadPriority(PlatformThread::CurrentHandle(), |
- kThreadPriority_Normal); |
+ ThreadPriority::NORMAL); |
} |
void TerminateOnThread() { |