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

Unified Diff: base/prefs/value_map_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/testing_pref_store.cc ('k') | base/process/process_metrics.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/prefs/value_map_pref_store.cc
diff --git a/base/prefs/value_map_pref_store.cc b/base/prefs/value_map_pref_store.cc
index f22f93aed6946901f06cc6bdea51b32e290e8f51..078ab28a510a297fe173b64aca05371e7b7f4c3a 100644
--- a/base/prefs/value_map_pref_store.cc
+++ b/base/prefs/value_map_pref_store.cc
@@ -5,6 +5,7 @@
#include "base/prefs/value_map_pref_store.h"
#include <algorithm>
+#include <utility>
#include "base/stl_util.h"
#include "base/values.h"
@@ -31,7 +32,7 @@ bool ValueMapPrefStore::HasObservers() const {
void ValueMapPrefStore::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)))
FOR_EACH_OBSERVER(Observer, observers_, OnPrefValueChanged(key));
}
@@ -53,7 +54,7 @@ void ValueMapPrefStore::ReportValueChanged(const std::string& key,
void ValueMapPrefStore::SetValueSilently(const std::string& key,
scoped_ptr<base::Value> value,
uint32 flags) {
- prefs_.SetValue(key, value.Pass());
+ prefs_.SetValue(key, std::move(value));
}
ValueMapPrefStore::~ValueMapPrefStore() {}
« no previous file with comments | « base/prefs/testing_pref_store.cc ('k') | base/process/process_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698