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

Unified Diff: third_party/WebKit/Source/platform/scheduler/base/moveable_auto_lock.h

Issue 2590593002: Revert of [Reland] Scheduler refactoring to virtually eliminate redundant DoWorks (Closed)
Patch Set: Created 4 years 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: third_party/WebKit/Source/platform/scheduler/base/moveable_auto_lock.h
diff --git a/third_party/WebKit/Source/platform/scheduler/base/moveable_auto_lock.h b/third_party/WebKit/Source/platform/scheduler/base/moveable_auto_lock.h
deleted file mode 100644
index ac2b8a855ef34198be31f46406b891e334dc08fc..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/platform/scheduler/base/moveable_auto_lock.h
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2016 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 THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_MOVEABLE_AUTO_LOCK_H_
-#define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_MOVEABLE_AUTO_LOCK_H_
-
-#include "base/synchronization/lock.h"
-
-namespace blink {
-namespace scheduler {
-
-class MoveableAutoLock {
- public:
- explicit MoveableAutoLock(base::Lock& lock) : lock_(lock), moved_(false) {
- lock_.Acquire();
- }
-
- explicit MoveableAutoLock(MoveableAutoLock&& other)
- : lock_(other.lock_), moved_(other.moved_) {
- lock_.AssertAcquired();
- other.moved_ = true;
- }
-
- ~MoveableAutoLock() {
- if (moved_)
- return;
- lock_.AssertAcquired();
- lock_.Release();
- }
-
- private:
- base::Lock& lock_;
- bool moved_;
- DISALLOW_COPY_AND_ASSIGN(MoveableAutoLock);
-};
-
-} // namespace scheduler
-} // namespace blink
-
-#endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_MOVEABLE_AUTO_LOCK_H_
« no previous file with comments | « third_party/WebKit/Source/platform/BUILD.gn ('k') | third_party/WebKit/Source/platform/scheduler/base/real_time_domain.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698