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

Unified Diff: net/disk_cache/simple/simple_index_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/simple/simple_index_file.cc ('k') | net/disk_cache/simple/simple_net_log_parameters.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/simple/simple_index_unittest.cc
diff --git a/net/disk_cache/simple/simple_index_unittest.cc b/net/disk_cache/simple/simple_index_unittest.cc
index ee0ddbe7e2fff7fccba13d9666db7fb6f2215bbc..649d48f538c2f74701109d73237d11e63149ec27 100644
--- a/net/disk_cache/simple/simple_index_unittest.cc
+++ b/net/disk_cache/simple/simple_index_unittest.cc
@@ -2,8 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "net/disk_cache/simple/simple_index.h"
+
#include <algorithm>
#include <functional>
+#include <utility>
#include "base/files/scoped_temp_dir.h"
#include "base/hash.h"
@@ -16,7 +19,6 @@
#include "base/threading/platform_thread.h"
#include "base/time/time.h"
#include "net/base/cache_type.h"
-#include "net/disk_cache/simple/simple_index.h"
#include "net/disk_cache/simple/simple_index_delegate.h"
#include "net/disk_cache/simple/simple_index_file.h"
#include "net/disk_cache/simple/simple_test_util.h"
@@ -106,7 +108,7 @@ class SimpleIndexTest : public testing::Test, public SimpleIndexDelegate {
scoped_ptr<MockSimpleIndexFile> index_file(new MockSimpleIndexFile());
index_file_ = index_file->AsWeakPtr();
index_.reset(
- new SimpleIndex(NULL, this, net::DISK_CACHE, index_file.Pass()));
+ new SimpleIndex(NULL, this, net::DISK_CACHE, std::move(index_file)));
index_->Initialize(base::Time());
}
@@ -207,7 +209,7 @@ TEST_F(SimpleIndexTest, IndexSizeCorrectOnMerge) {
{
scoped_ptr<SimpleIndexLoadResult> result(new SimpleIndexLoadResult());
result->did_load = true;
- index()->MergeInitializingSet(result.Pass());
+ index()->MergeInitializingSet(std::move(result));
}
EXPECT_EQ(9U, index()->cache_size_);
{
@@ -219,7 +221,7 @@ TEST_F(SimpleIndexTest, IndexSizeCorrectOnMerge) {
const uint64_t redundant_hash_key = hashes_.at<4>();
result->entries.insert(std::make_pair(redundant_hash_key,
EntryMetadata(base::Time::Now(), 4)));
- index()->MergeInitializingSet(result.Pass());
+ index()->MergeInitializingSet(std::move(result));
}
EXPECT_EQ(2U + 3U + 4U + 11U, index()->cache_size_);
}
« no previous file with comments | « net/disk_cache/simple/simple_index_file.cc ('k') | net/disk_cache/simple/simple_net_log_parameters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698