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

Side by Side Diff: base/threading/platform_thread.h

Issue 1164713007: base/threading: minor cleanups to remove friend class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove debug code Created 5 years, 6 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
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 // WARNING: You should *NOT* be using this class directly. PlatformThread is 5 // WARNING: You should *NOT* be using this class directly. PlatformThread is
6 // the low-level platform-specific abstraction to the OS's threading interface. 6 // the low-level platform-specific abstraction to the OS's threading interface.
7 // You should instead be using a message-loop driven Thread, see thread.h. 7 // You should instead be using a message-loop driven Thread, see thread.h.
8 8
9 #ifndef BASE_THREADING_PLATFORM_THREAD_H_ 9 #ifndef BASE_THREADING_PLATFORM_THREAD_H_
10 #define BASE_THREADING_PLATFORM_THREAD_H_ 10 #define BASE_THREADING_PLATFORM_THREAD_H_
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 bool is_null() const { 100 bool is_null() const {
101 return !handle_; 101 return !handle_;
102 } 102 }
103 103
104 Handle platform_handle() const { 104 Handle platform_handle() const {
105 return handle_; 105 return handle_;
106 } 106 }
107 107
108 private: 108 private:
109 friend class PlatformThread;
110
111 Handle handle_; 109 Handle handle_;
112 PlatformThreadId id_; 110 PlatformThreadId id_;
113 }; 111 };
114 112
115 const PlatformThreadId kInvalidThreadId(0); 113 const PlatformThreadId kInvalidThreadId(0);
116 114
117 // Valid values for SetThreadPriority(), listed in increasing order of 115 // Valid values for SetThreadPriority(), listed in increasing order of
118 // importance. 116 // importance.
119 enum class ThreadPriority { 117 enum class ThreadPriority {
120 // Suitable for threads that shouldn't disrupt high priority work. 118 // Suitable for threads that shouldn't disrupt high priority work.
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 197
200 static ThreadPriority GetThreadPriority(PlatformThreadHandle handle); 198 static ThreadPriority GetThreadPriority(PlatformThreadHandle handle);
201 199
202 private: 200 private:
203 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformThread); 201 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformThread);
204 }; 202 };
205 203
206 } // namespace base 204 } // namespace base
207 205
208 #endif // BASE_THREADING_PLATFORM_THREAD_H_ 206 #endif // BASE_THREADING_PLATFORM_THREAD_H_
OLDNEW
« no previous file with comments | « no previous file | base/threading/platform_thread_mac.mm » ('j') | base/threading/platform_thread_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698