| Index: base/threading/platform_thread_win.cc
 | 
| diff --git a/base/threading/platform_thread_win.cc b/base/threading/platform_thread_win.cc
 | 
| index 3df371943f5e6fdf1a91175802b7fb36f78d9aba..b9f7a5648ad3ff2350e12e728a28a7158f75bac3 100644
 | 
| --- a/base/threading/platform_thread_win.cc
 | 
| +++ b/base/threading/platform_thread_win.cc
 | 
| @@ -126,18 +126,17 @@ bool CreateThreadInternal(size_t stack_size,
 | 
|  
 | 
|  // static
 | 
|  PlatformThreadId PlatformThread::CurrentId() {
 | 
| -  return GetCurrentThreadId();
 | 
| +  return ::GetCurrentThreadId();
 | 
|  }
 | 
|  
 | 
|  // static
 | 
|  PlatformThreadRef PlatformThread::CurrentRef() {
 | 
| -  return PlatformThreadRef(GetCurrentThreadId());
 | 
| +  return PlatformThreadRef(::GetCurrentThreadId());
 | 
|  }
 | 
|  
 | 
|  // static
 | 
|  PlatformThreadHandle PlatformThread::CurrentHandle() {
 | 
| -  NOTIMPLEMENTED(); // See OpenThread()
 | 
| -  return PlatformThreadHandle();
 | 
| +  return PlatformThreadHandle(::GetCurrentThread());
 | 
|  }
 | 
|  
 | 
|  // static
 | 
| @@ -234,17 +233,56 @@ void PlatformThread::Join(PlatformThreadHandle thread_handle) {
 | 
|  // static
 | 
|  void PlatformThread::SetThreadPriority(PlatformThreadHandle handle,
 | 
|                                         ThreadPriority priority) {
 | 
| +  DCHECK(!handle.is_null());
 | 
| +
 | 
| +  int desired_priority = THREAD_PRIORITY_ERROR_RETURN;
 | 
|    switch (priority) {
 | 
| -    case kThreadPriority_Normal:
 | 
| -      ::SetThreadPriority(handle.handle_, THREAD_PRIORITY_NORMAL);
 | 
| +    case ThreadPriority::BACKGROUND:
 | 
| +      desired_priority = THREAD_PRIORITY_LOWEST;
 | 
| +      break;
 | 
| +    case ThreadPriority::NORMAL:
 | 
| +      desired_priority = THREAD_PRIORITY_NORMAL;
 | 
| +      break;
 | 
| +    case ThreadPriority::DISPLAY:
 | 
| +      desired_priority = THREAD_PRIORITY_ABOVE_NORMAL;
 | 
|        break;
 | 
| -    case kThreadPriority_RealtimeAudio:
 | 
| -      ::SetThreadPriority(handle.handle_, THREAD_PRIORITY_TIME_CRITICAL);
 | 
| +    case ThreadPriority::REALTIME_AUDIO:
 | 
| +      desired_priority = THREAD_PRIORITY_TIME_CRITICAL;
 | 
|        break;
 | 
|      default:
 | 
|        NOTREACHED() << "Unknown priority.";
 | 
|        break;
 | 
|    }
 | 
| +  DCHECK_NE(desired_priority, THREAD_PRIORITY_ERROR_RETURN);
 | 
| +
 | 
| +#ifndef NDEBUG
 | 
| +  const BOOL success =
 | 
| +#endif
 | 
| +      ::SetThreadPriority(handle.handle_, desired_priority);
 | 
| +  DPLOG_IF(ERROR, !success) << "Failed to set thread priority to "
 | 
| +                            << desired_priority;
 | 
| +}
 | 
| +
 | 
| +// static
 | 
| +ThreadPriority PlatformThread::GetThreadPriority(PlatformThreadHandle handle) {
 | 
| +  DCHECK(!handle.is_null());
 | 
| +
 | 
| +  int priority = ::GetThreadPriority(handle.handle_);
 | 
| +  switch (priority) {
 | 
| +    case THREAD_PRIORITY_LOWEST:
 | 
| +      return ThreadPriority::BACKGROUND;
 | 
| +    case THREAD_PRIORITY_NORMAL:
 | 
| +      return ThreadPriority::NORMAL;
 | 
| +    case THREAD_PRIORITY_ABOVE_NORMAL:
 | 
| +      return ThreadPriority::DISPLAY;
 | 
| +    case THREAD_PRIORITY_TIME_CRITICAL:
 | 
| +      return ThreadPriority::REALTIME_AUDIO;
 | 
| +    case THREAD_PRIORITY_ERROR_RETURN:
 | 
| +      DPCHECK(false) << "GetThreadPriority error";  // Falls through.
 | 
| +    default:
 | 
| +      NOTREACHED() << "Unexpected priority: " << priority;
 | 
| +      return ThreadPriority::NORMAL;
 | 
| +  }
 | 
|  }
 | 
|  
 | 
|  }  // namespace base
 | 
| 
 |