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

Unified Diff: mojo/message_pump/handle_watcher_perftest.cc

Issue 1538823002: Convert Pass()→std::move() in mojo/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « mojo/gles2/gles2_impl.cc ('k') | mojo/message_pump/handle_watcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/message_pump/handle_watcher_perftest.cc
diff --git a/mojo/message_pump/handle_watcher_perftest.cc b/mojo/message_pump/handle_watcher_perftest.cc
index 10bfd92748003db03d471f79b37df620daac8d9f..311ed37fa2c2afa5e4ae0413a98b61ec3bdd995e 100644
--- a/mojo/message_pump/handle_watcher_perftest.cc
+++ b/mojo/message_pump/handle_watcher_perftest.cc
@@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "mojo/message_pump/handle_watcher.h"
-
#include <string>
+#include <utility>
#include "base/auto_reset.h"
#include "base/bind.h"
#include "base/memory/scoped_vector.h"
#include "base/run_loop.h"
#include "base/time/time.h"
+#include "mojo/message_pump/handle_watcher.h"
#include "mojo/message_pump/message_pump_mojo.h"
#include "mojo/public/cpp/test_support/test_support.h"
#include "mojo/public/cpp/test_support/test_utils.h"
@@ -31,7 +31,7 @@ scoped_ptr<base::MessageLoop> CreateMessageLoop(MessageLoopConfig config) {
loop.reset(new base::MessageLoop());
else
loop.reset(new base::MessageLoop(MessagePumpMojo::Create()));
- return loop.Pass();
+ return loop;
}
void OnWatcherSignaled(const base::Closure& callback, MojoResult /* result */) {
@@ -116,7 +116,7 @@ TEST_P(HandleWatcherPerftest, StartAllThenStop_1000Handles) {
for (uint64_t i = 0; i < kHandles; i++) {
scoped_ptr<TestData> test_data(new TestData);
ASSERT_TRUE(test_data->pipe.handle0.is_valid());
- data_vector.push_back(test_data.Pass());
+ data_vector.push_back(std::move(test_data));
}
ScopedPerfTimer timer("StartAllThenStop_1000Handles", GetMessageLoopName(),
@@ -178,7 +178,7 @@ TEST_P(HandleWatcherPerftest, StartAndSignal_1000Waiting) {
test_data->watcher.Start(
test_data->pipe.handle0.get(), MOJO_HANDLE_SIGNAL_READABLE,
MOJO_DEADLINE_INDEFINITE, base::Bind(&NeverReached));
- data_vector.push_back(test_data.Pass());
+ data_vector.push_back(std::move(test_data));
}
ScopedPerfTimer timer("StartAndSignal_1000Waiting", GetMessageLoopName(),
« no previous file with comments | « mojo/gles2/gles2_impl.cc ('k') | mojo/message_pump/handle_watcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698