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

Unified Diff: components/user_prefs/tracked/tracked_preferences_migration_unittest.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/tracked_preferences_migration_unittest.cc
diff --git a/components/user_prefs/tracked/tracked_preferences_migration_unittest.cc b/components/user_prefs/tracked/tracked_preferences_migration_unittest.cc
index fc134aa97c7229f64432065c94a8fd79a2b9972b..4c837f99dfbba1f671733026a39d570e24823d97 100644
--- a/components/user_prefs/tracked/tracked_preferences_migration_unittest.cc
+++ b/components/user_prefs/tracked/tracked_preferences_migration_unittest.cc
@@ -6,6 +6,7 @@
#include <set>
#include <string>
+#include <utility>
#include <vector>
#include "base/bind.h"
@@ -58,7 +59,8 @@ class SimpleInterceptablePrefFilter : public InterceptablePrefFilter {
const PostFilterOnLoadCallback& post_filter_on_load_callback,
scoped_ptr<base::DictionaryValue> pref_store_contents,
bool prefs_altered) override {
- 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);
}
};
@@ -276,16 +278,14 @@ class TrackedPreferencesMigrationTest : public testing::Test {
case MOCK_UNPROTECTED_PREF_STORE:
mock_unprotected_pref_filter_.FilterOnLoad(
base::Bind(&TrackedPreferencesMigrationTest::GetPrefsBack,
- base::Unretained(this),
- MOCK_UNPROTECTED_PREF_STORE),
- unprotected_prefs_.Pass());
+ base::Unretained(this), MOCK_UNPROTECTED_PREF_STORE),
+ std::move(unprotected_prefs_));
break;
case MOCK_PROTECTED_PREF_STORE:
mock_protected_pref_filter_.FilterOnLoad(
base::Bind(&TrackedPreferencesMigrationTest::GetPrefsBack,
- base::Unretained(this),
- MOCK_PROTECTED_PREF_STORE),
- protected_prefs_.Pass());
+ base::Unretained(this), MOCK_PROTECTED_PREF_STORE),
+ std::move(protected_prefs_));
break;
}
}
@@ -356,13 +356,13 @@ class TrackedPreferencesMigrationTest : public testing::Test {
switch (store_id) {
case MOCK_UNPROTECTED_PREF_STORE:
EXPECT_FALSE(unprotected_prefs_);
- unprotected_prefs_ = prefs.Pass();
+ unprotected_prefs_ = std::move(prefs);
migration_modified_unprotected_store_ = prefs_altered;
unprotected_store_migration_complete_ = true;
break;
case MOCK_PROTECTED_PREF_STORE:
EXPECT_FALSE(protected_prefs_);
- protected_prefs_ = prefs.Pass();
+ protected_prefs_ = std::move(prefs);
migration_modified_protected_store_ = prefs_altered;
protected_store_migration_complete_ = true;
break;
« no previous file with comments | « components/user_prefs/tracked/tracked_preferences_migration.cc ('k') | components/variations/service/variations_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698