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

Unified Diff: base/sequence_checker_unittest.cc

Issue 1479473002: base: Use std::move() instead of Pass() for real movable types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: basepass: missing-include Created 5 years, 1 month 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/scoped_generic_unittest.cc ('k') | base/task_runner_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/sequence_checker_unittest.cc
diff --git a/base/sequence_checker_unittest.cc b/base/sequence_checker_unittest.cc
index 0aa0f9cdbb74d8cd0711f5621c3a81067d5d6db6..f0eda25ad36ed7d6d8bec351df1a6f44979299b9 100644
--- a/base/sequence_checker_unittest.cc
+++ b/base/sequence_checker_unittest.cc
@@ -2,6 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/sequence_checker.h"
+
+#include <utility>
+
#include "base/basictypes.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
@@ -9,7 +13,6 @@
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
-#include "base/sequence_checker.h"
#include "base/single_thread_task_runner.h"
#include "base/test/sequenced_worker_pool_owner.h"
#include "base/threading/thread.h"
@@ -130,7 +133,7 @@ TEST_F(SequenceCheckerTest, DestructorAllowedOnDifferentThread) {
new SequenceCheckedObject);
// Verify the destructor doesn't assert when called on a different thread.
- PostDeleteToOtherThread(sequence_checked_object.Pass());
+ PostDeleteToOtherThread(std::move(sequence_checked_object));
other_thread()->Stop();
}
@@ -157,7 +160,7 @@ TEST_F(SequenceCheckerTest, SameSequenceTokenValid) {
PostDoStuffToWorkerPool(sequence_checked_object.get(), "A");
pool()->FlushForTesting();
- PostDeleteToOtherThread(sequence_checked_object.Pass());
+ PostDeleteToOtherThread(std::move(sequence_checked_object));
other_thread()->Stop();
}
@@ -175,7 +178,7 @@ TEST_F(SequenceCheckerTest, DetachSequenceTokenValid) {
PostDoStuffToWorkerPool(sequence_checked_object.get(), "B");
pool()->FlushForTesting();
- PostDeleteToOtherThread(sequence_checked_object.Pass());
+ PostDeleteToOtherThread(std::move(sequence_checked_object));
other_thread()->Stop();
}
@@ -245,7 +248,7 @@ void SequenceCheckerTest::DifferentSequenceTokensDeathTest() {
PostDoStuffToWorkerPool(sequence_checked_object.get(), "B");
pool()->FlushForTesting();
- PostDeleteToOtherThread(sequence_checked_object.Pass());
+ PostDeleteToOtherThread(std::move(sequence_checked_object));
other_thread()->Stop();
}
« no previous file with comments | « base/scoped_generic_unittest.cc ('k') | base/task_runner_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698