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

Unified Diff: base/threading/thread_checker_impl.cc

Issue 1647803004: Move base to DEPS (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « base/threading/thread_checker_impl.h ('k') | base/threading/thread_checker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/thread_checker_impl.cc
diff --git a/base/threading/thread_checker_impl.cc b/base/threading/thread_checker_impl.cc
deleted file mode 100644
index eb87bae772cbbf9be35ccddad88ed886b1b1052a..0000000000000000000000000000000000000000
--- a/base/threading/thread_checker_impl.cc
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/threading/thread_checker_impl.h"
-
-namespace base {
-
-ThreadCheckerImpl::ThreadCheckerImpl()
- : valid_thread_id_() {
- EnsureThreadIdAssigned();
-}
-
-ThreadCheckerImpl::~ThreadCheckerImpl() {}
-
-bool ThreadCheckerImpl::CalledOnValidThread() const {
- EnsureThreadIdAssigned();
- AutoLock auto_lock(lock_);
- return valid_thread_id_ == PlatformThread::CurrentRef();
-}
-
-void ThreadCheckerImpl::DetachFromThread() {
- AutoLock auto_lock(lock_);
- valid_thread_id_ = PlatformThreadRef();
-}
-
-void ThreadCheckerImpl::EnsureThreadIdAssigned() const {
- AutoLock auto_lock(lock_);
- if (valid_thread_id_.is_null()) {
- valid_thread_id_ = PlatformThread::CurrentRef();
- }
-}
-
-} // namespace base
« no previous file with comments | « base/threading/thread_checker_impl.h ('k') | base/threading/thread_checker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698