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

Unified Diff: net/disk_cache/entry_unittest.cc

Issue 1545233002: Convert Pass()→std::move() in //net (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 | « net/disk_cache/disk_cache_test_base.cc ('k') | net/disk_cache/memory/mem_backend_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/entry_unittest.cc
diff --git a/net/disk_cache/entry_unittest.cc b/net/disk_cache/entry_unittest.cc
index 7806da8adb1b10264144166c0fc3b9767582fc1e..ea5804930e4af043573389b10081ac4d8f9d43d0 100644
--- a/net/disk_cache/entry_unittest.cc
+++ b/net/disk_cache/entry_unittest.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <utility>
+
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/files/file.h"
@@ -2184,8 +2186,7 @@ TEST_F(DiskCacheEntryTest, MemoryOnlyDoomSparseEntry) {
class SparseTestCompletionCallback: public net::TestCompletionCallback {
public:
explicit SparseTestCompletionCallback(scoped_ptr<disk_cache::Backend> cache)
- : cache_(cache.Pass()) {
- }
+ : cache_(std::move(cache)) {}
private:
void SetResult(int result) override {
@@ -2222,7 +2223,7 @@ TEST_F(DiskCacheEntryTest, DoomSparseEntry2) {
entry->Close();
disk_cache::Backend* cache = cache_.get();
- SparseTestCompletionCallback cb(cache_.Pass());
+ SparseTestCompletionCallback cb(std::move(cache_));
int rv = cache->DoomEntry(key, cb.callback());
EXPECT_EQ(net::ERR_IO_PENDING, rv);
EXPECT_EQ(net::OK, cb.WaitForResult());
« no previous file with comments | « net/disk_cache/disk_cache_test_base.cc ('k') | net/disk_cache/memory/mem_backend_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698