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

Unified Diff: components/visitedlink/browser/visitedlink_master.cc

Issue 1548203002: Convert Pass()→std::move() in //components/[n-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad headers 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
Index: components/visitedlink/browser/visitedlink_master.cc
diff --git a/components/visitedlink/browser/visitedlink_master.cc b/components/visitedlink/browser/visitedlink_master.cc
index c5c6490a519711d8c518e9ca5975e1e8fbee4774..4328700478440b05e488a56016c4ba7a9797275d 100644
--- a/components/visitedlink/browser/visitedlink_master.cc
+++ b/components/visitedlink/browser/visitedlink_master.cc
@@ -6,8 +6,8 @@
#include <stdio.h>
#include <string.h>
-
#include <algorithm>
+#include <utility>
#include "base/bind.h"
#include "base/bind_helpers.h"
@@ -150,8 +150,8 @@ VisitedLinkMaster::LoadFromFileResult::LoadFromFileResult(
int32_t num_entries,
int32_t used_count,
uint8_t salt[LINK_SALT_LENGTH])
- : file(file.Pass()),
- shared_memory(shared_memory.Pass()),
+ : file(std::move(file)),
+ shared_memory(std::move(shared_memory)),
hash_table(hash_table),
num_entries(num_entries),
used_count(used_count) {
@@ -672,12 +672,9 @@ bool VisitedLinkMaster::LoadApartFromFile(
return false;
}
- *load_from_file_result = new LoadFromFileResult(file_closer.Pass(),
- shared_memory.Pass(),
- hash_table,
- num_entries,
- used_count,
- salt);
+ *load_from_file_result =
+ new LoadFromFileResult(std::move(file_closer), std::move(shared_memory),
+ hash_table, num_entries, used_count, salt);
return true;
}
@@ -912,7 +909,7 @@ bool VisitedLinkMaster::CreateApartURLTable(
*hash_table = reinterpret_cast<Fingerprint*>(
static_cast<char*>(sh_mem->memory()) + sizeof(SharedHeader));
- *shared_memory = sh_mem.Pass();
+ *shared_memory = std::move(sh_mem);
return true;
}
« no previous file with comments | « components/version_ui/version_handler_helper.cc ('k') | components/web_modal/web_contents_modal_dialog_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698