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

Unified Diff: base/prefs/overlay_user_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/json_pref_store_unittest.cc ('k') | base/prefs/pref_member.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/prefs/overlay_user_pref_store.cc
diff --git a/base/prefs/overlay_user_pref_store.cc b/base/prefs/overlay_user_pref_store.cc
index d76b537ce62244c5b28294c3792873c3b37e32f5..f386ceff6f6f1152a88ea5bf45741f22697ede29 100644
--- a/base/prefs/overlay_user_pref_store.cc
+++ b/base/prefs/overlay_user_pref_store.cc
@@ -4,6 +4,8 @@
#include "base/prefs/overlay_user_pref_store.h"
+#include <utility>
+
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
@@ -66,11 +68,11 @@ void OverlayUserPrefStore::SetValue(const std::string& key,
scoped_ptr<base::Value> value,
uint32 flags) {
if (!ShallBeStoredInOverlay(key)) {
- underlay_->SetValue(GetUnderlayKey(key), value.Pass(), flags);
+ underlay_->SetValue(GetUnderlayKey(key), std::move(value), flags);
return;
}
- if (overlay_.SetValue(key, value.Pass()))
+ if (overlay_.SetValue(key, std::move(value)))
ReportValueChanged(key, flags);
}
@@ -78,11 +80,11 @@ void OverlayUserPrefStore::SetValueSilently(const std::string& key,
scoped_ptr<base::Value> value,
uint32 flags) {
if (!ShallBeStoredInOverlay(key)) {
- underlay_->SetValueSilently(GetUnderlayKey(key), value.Pass(), flags);
+ underlay_->SetValueSilently(GetUnderlayKey(key), std::move(value), flags);
return;
}
- overlay_.SetValue(key, value.Pass());
+ overlay_.SetValue(key, std::move(value));
}
void OverlayUserPrefStore::RemoveValue(const std::string& key, uint32 flags) {
« no previous file with comments | « base/prefs/json_pref_store_unittest.cc ('k') | base/prefs/pref_member.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698