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

Unified Diff: base/threading/thread_id_name_manager.cc

Issue 1207823004: PlatformThreadHandle: remove public id() interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: (rebase to show diff from 1193303002) 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 side-by-side diff with in-line comments
Download patch
Index: base/threading/thread_id_name_manager.cc
diff --git a/base/threading/thread_id_name_manager.cc b/base/threading/thread_id_name_manager.cc
index 56cfa273a87d72df8ed3163bed0348e1d09203dc..e326535e0a9dbefce0104ca6cd55eb2de1124a30 100644
--- a/base/threading/thread_id_name_manager.cc
+++ b/base/threading/thread_id_name_manager.cc
@@ -40,11 +40,11 @@ const char* ThreadIdNameManager::GetDefaultInternedString() {
return g_default_name->c_str();
}
-void ThreadIdNameManager::RegisterThread(PlatformThreadHandle::Handle handle,
+void ThreadIdNameManager::RegisterThread(PlatformThreadHandle handle,
PlatformThreadId id) {
AutoLock locked(lock_);
- thread_id_to_handle_[id] = handle;
- thread_handle_to_interned_name_[handle] =
+ thread_id_to_handle_[id] = handle.handle_;
+ thread_handle_to_interned_name_[handle.handle_] =
name_to_interned_name_[kDefaultName];
}
@@ -89,11 +89,11 @@ const char* ThreadIdNameManager::GetName(PlatformThreadId id) {
return handle_to_name_iter->second->c_str();
}
-void ThreadIdNameManager::RemoveName(PlatformThreadHandle::Handle handle,
+void ThreadIdNameManager::RemoveName(PlatformThreadHandle handle,
PlatformThreadId id) {
AutoLock locked(lock_);
ThreadHandleToInternedNameMap::iterator handle_to_name_iter =
- thread_handle_to_interned_name_.find(handle);
+ thread_handle_to_interned_name_.find(handle.handle_);
DCHECK(handle_to_name_iter != thread_handle_to_interned_name_.end());
thread_handle_to_interned_name_.erase(handle_to_name_iter);
@@ -103,7 +103,7 @@ void ThreadIdNameManager::RemoveName(PlatformThreadHandle::Handle handle,
DCHECK((id_to_handle_iter!= thread_id_to_handle_.end()));
// The given |id| may have been re-used by the system. Make sure the
// mapping points to the provided |handle| before removal.
- if (id_to_handle_iter->second != handle)
+ if (id_to_handle_iter->second != handle.handle_)
return;
thread_id_to_handle_.erase(id_to_handle_iter);

Powered by Google App Engine
This is Rietveld 408576698