Home
last modified time | relevance | path

Searched refs:TaskToken (Results 1 – 5 of 5) sorted by relevance

/external/libchrome/base/
Dsequence_token.cc23 LazyInstance<ThreadLocalPointer<const TaskToken>>::Leaky
54 bool TaskToken::operator==(const TaskToken& other) const { in operator ==()
58 bool TaskToken::operator!=(const TaskToken& other) const { in operator !=()
62 bool TaskToken::IsValid() const { in IsValid()
66 TaskToken TaskToken::Create() { in Create()
67 return TaskToken(g_task_token_generator.GetNext()); in Create()
70 TaskToken TaskToken::GetForCurrentThread() { in GetForCurrentThread()
71 const TaskToken* current_task_token = tls_current_task_token.Get().Get(); in GetForCurrentThread()
72 return current_task_token ? *current_task_token : TaskToken(); in GetForCurrentThread()
77 : sequence_token_(sequence_token), task_token_(TaskToken::Create()) { in ScopedSetSequenceTokenForCurrentThread()
Dsequence_token.h58 class BASE_EXPORT TaskToken {
61 TaskToken() = default;
64 TaskToken(const TaskToken& other) = default;
65 TaskToken& operator=(const TaskToken& other) = default;
69 bool operator==(const TaskToken& other) const;
70 bool operator!=(const TaskToken& other) const;
79 static TaskToken GetForCurrentThread();
84 explicit TaskToken(int token) : token_(token) {} in TaskToken() function
89 static TaskToken Create();
108 const TaskToken task_token_;
Dsequence_token_unittest.cc76 EXPECT_FALSE(TaskToken().IsValid()); in TEST()
77 EXPECT_NE(TaskToken(), TaskToken()); in TEST()
83 EXPECT_FALSE(TaskToken::GetForCurrentThread().IsValid()); in TEST()
90 TaskToken valid = TaskToken::GetForCurrentThread(); in TEST()
91 TaskToken invalid; in TEST()
102 const TaskToken token_a = TaskToken::GetForCurrentThread(); in TEST()
103 const TaskToken token_b = TaskToken::GetForCurrentThread(); in TEST()
114 TaskToken token_a; in TEST()
115 TaskToken token_b; in TEST()
120 token_a = TaskToken::GetForCurrentThread(); in TEST()
[all …]
/external/libchrome/base/threading/
Dthread_checker_impl.cc24 if (task_token_ == TaskToken::GetForCurrentThread()) in CalledOnValidThread()
43 task_token_ = TaskToken(); in DetachFromThread()
53 task_token_ = TaskToken::GetForCurrentThread(); in EnsureAssigned()
Dthread_checker_impl.h51 mutable TaskToken task_token_;