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

Unified Diff: components/user_prefs/tracked/pref_hash_filter.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/user_prefs/tracked/pref_hash_filter.cc
diff --git a/components/user_prefs/tracked/pref_hash_filter.cc b/components/user_prefs/tracked/pref_hash_filter.cc
index ac27892ec4a39af7b106b3603e9b7c853dc2a0f7..f77aaedd6e5ebf787031209c7285bac68ec91354 100644
--- a/components/user_prefs/tracked/pref_hash_filter.cc
+++ b/components/user_prefs/tracked/pref_hash_filter.cc
@@ -5,8 +5,8 @@
#include "components/user_prefs/tracked/pref_hash_filter.h"
#include <stdint.h>
-
#include <algorithm>
+#include <utility>
#include "base/logging.h"
#include "base/macros.h"
@@ -54,7 +54,7 @@ PrefHashFilter::PrefHashFilter(
TrackedPreferenceValidationDelegate* delegate,
size_t reporting_ids_count,
bool report_super_mac_validity)
- : pref_hash_store_(pref_hash_store.Pass()),
+ : pref_hash_store_(std::move(pref_hash_store)),
on_reset_on_load_(on_reset_on_load),
report_super_mac_validity_(report_super_mac_validity) {
DCHECK(pref_hash_store_);
@@ -86,8 +86,8 @@ PrefHashFilter::PrefHashFilter(
}
DCHECK(tracked_preference);
- bool is_new = tracked_paths_.add(metadata.name,
- tracked_preference.Pass()).second;
+ bool is_new =
+ tracked_paths_.add(metadata.name, std::move(tracked_preference)).second;
DCHECK(is_new);
}
}
@@ -229,5 +229,6 @@ void PrefHashFilter::FinalizeFilterOnLoad(
UMA_HISTOGRAM_TIMES("Settings.FilterOnLoadTime",
base::TimeTicks::Now() - checkpoint);
- post_filter_on_load_callback.Run(pref_store_contents.Pass(), prefs_altered);
+ post_filter_on_load_callback.Run(std::move(pref_store_contents),
+ prefs_altered);
}
« no previous file with comments | « components/user_prefs/tracked/interceptable_pref_filter.cc ('k') | components/user_prefs/tracked/pref_hash_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698