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

Unified Diff: base/prefs/testing_pref_store.cc

Issue 1479473002: base: Use std::move() instead of Pass() for real movable types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: basepass: missing-include Created 5 years, 1 month 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 | « base/prefs/pref_value_map.cc ('k') | base/prefs/value_map_pref_store.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/prefs/testing_pref_store.cc
diff --git a/base/prefs/testing_pref_store.cc b/base/prefs/testing_pref_store.cc
index 2322f4e4768460abfe9309c3f21eca78f49467f2..a3a7ab5199ce3a55c60462ecc499702da2f7cb31 100644
--- a/base/prefs/testing_pref_store.cc
+++ b/base/prefs/testing_pref_store.cc
@@ -4,6 +4,8 @@
#include "base/prefs/testing_pref_store.h"
+#include <utility>
+
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
@@ -45,7 +47,7 @@ bool TestingPrefStore::IsInitializationComplete() const {
void TestingPrefStore::SetValue(const std::string& key,
scoped_ptr<base::Value> value,
uint32 flags) {
- if (prefs_.SetValue(key, value.Pass())) {
+ if (prefs_.SetValue(key, std::move(value))) {
committed_ = false;
NotifyPrefValueChanged(key);
}
@@ -54,7 +56,7 @@ void TestingPrefStore::SetValue(const std::string& key,
void TestingPrefStore::SetValueSilently(const std::string& key,
scoped_ptr<base::Value> value,
uint32 flags) {
- if (prefs_.SetValue(key, value.Pass()))
+ if (prefs_.SetValue(key, std::move(value)))
committed_ = false;
}
« no previous file with comments | « base/prefs/pref_value_map.cc ('k') | base/prefs/value_map_pref_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698