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

Unified Diff: net/disk_cache/blockfile/backend_impl.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/backend_unittest.cc ('k') | net/disk_cache/blockfile/file_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/blockfile/backend_impl.cc
diff --git a/net/disk_cache/blockfile/backend_impl.cc b/net/disk_cache/blockfile/backend_impl.cc
index f54128fece8f9a16acd07734cb4f57eaf16c01ba..980ddc73a53fff7f782f8da201f21951cae28e56 100644
--- a/net/disk_cache/blockfile/backend_impl.cc
+++ b/net/disk_cache/blockfile/backend_impl.cc
@@ -5,6 +5,7 @@
#include "net/disk_cache/blockfile/backend_impl.h"
#include <limits>
+#include <utility>
#include "base/bind.h"
#include "base/bind_helpers.h"
@@ -402,7 +403,7 @@ int BackendImpl::SyncDoomEntriesBetween(const base::Time initial_time,
if (next)
next->Release();
next = NULL;
- SyncEndEnumeration(iterator.Pass());
+ SyncEndEnumeration(std::move(iterator));
}
node->Release();
@@ -435,13 +436,14 @@ int BackendImpl::SyncDoomEntriesSince(const base::Time initial_time) {
if (initial_time > entry->GetLastUsed()) {
entry->Release();
- SyncEndEnumeration(iterator.Pass());
+ SyncEndEnumeration(std::move(iterator));
return net::OK;
}
entry->DoomImpl();
entry->Release();
- SyncEndEnumeration(iterator.Pass()); // The doom invalidated the iterator.
+ SyncEndEnumeration(
+ std::move(iterator)); // The doom invalidated the iterator.
}
}
@@ -1281,7 +1283,7 @@ class BackendImpl::IteratorImpl : public Backend::Iterator {
~IteratorImpl() override {
if (background_queue_)
- background_queue_->EndEnumeration(iterator_.Pass());
+ background_queue_->EndEnumeration(std::move(iterator_));
}
int OpenNextEntry(Entry** next_entry,
@@ -1371,7 +1373,8 @@ bool BackendImpl::InitBackingStore(bool* file_created) {
bool ret = true;
*file_created = base_file.created();
- scoped_refptr<disk_cache::File> file(new disk_cache::File(base_file.Pass()));
+ scoped_refptr<disk_cache::File> file(
+ new disk_cache::File(std::move(base_file)));
if (*file_created)
ret = CreateBackingStore(file.get());
« no previous file with comments | « net/disk_cache/backend_unittest.cc ('k') | net/disk_cache/blockfile/file_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698