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

Unified Diff: base/sequence_checker.h

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/security_unittest.cc ('k') | base/sequence_checker_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/sequence_checker.h
diff --git a/base/sequence_checker.h b/base/sequence_checker.h
deleted file mode 100644
index ad0182825c24805548f05972c7c04e6813688bc7..0000000000000000000000000000000000000000
--- a/base/sequence_checker.h
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright (c) 2012 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.
-
-#ifndef BASE_SEQUENCE_CHECKER_H_
-#define BASE_SEQUENCE_CHECKER_H_
-
-// See comments for the similar block in thread_checker.h.
-#if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON))
-#define ENABLE_SEQUENCE_CHECKER 1
-#else
-#define ENABLE_SEQUENCE_CHECKER 0
-#endif
-
-#include "base/sequence_checker_impl.h"
-
-namespace base {
-
-// Do nothing implementation, for use in release mode.
-//
-// Note: You should almost always use the SequenceChecker class to get
-// the right version for your build configuration.
-class SequenceCheckerDoNothing {
- public:
- bool CalledOnValidSequencedThread() const {
- return true;
- }
-
- void DetachFromSequence() {}
-};
-
-// SequenceChecker is a helper class used to help verify that some
-// methods of a class are called in sequence -- that is, called from
-// the same SequencedTaskRunner. It is a generalization of
-// ThreadChecker; see comments in sequence_checker_impl.h for details.
-//
-// Example:
-// class MyClass {
-// public:
-// void Foo() {
-// DCHECK(sequence_checker_.CalledOnValidSequencedThread());
-// ... (do stuff) ...
-// }
-//
-// private:
-// SequenceChecker sequence_checker_;
-// }
-//
-// In Release mode, CalledOnValidSequencedThread() will always return true.
-#if ENABLE_SEQUENCE_CHECKER
-class SequenceChecker : public SequenceCheckerImpl {
-};
-#else
-class SequenceChecker : public SequenceCheckerDoNothing {
-};
-#endif // ENABLE_SEQUENCE_CHECKER
-
-#undef ENABLE_SEQUENCE_CHECKER
-
-} // namespace base
-
-#endif // BASE_SEQUENCE_CHECKER_H_
« no previous file with comments | « base/security_unittest.cc ('k') | base/sequence_checker_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698