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

Unified Diff: base/prefs/pref_service.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_member.cc ('k') | base/prefs/pref_service_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/prefs/pref_service.cc
diff --git a/base/prefs/pref_service.cc b/base/prefs/pref_service.cc
index c53b8966b347c02134967d6c8d932eb024d1decb..7741306b2ee4b50c33075871d6a6b6e2fbc19f99 100644
--- a/base/prefs/pref_service.cc
+++ b/base/prefs/pref_service.cc
@@ -5,6 +5,7 @@
#include "base/prefs/pref_service.h"
#include <algorithm>
+#include <utility>
#include "base/bind.h"
#include "base/files/file_path.h"
@@ -197,7 +198,7 @@ scoped_ptr<base::DictionaryValue> PrefService::GetPreferenceValues() const {
for (const auto& it : *pref_registry_) {
out->Set(it.first, GetPreferenceValue(it.first)->CreateDeepCopy());
}
- return out.Pass();
+ return out;
}
scoped_ptr<base::DictionaryValue> PrefService::GetPreferenceValuesOmitDefaults()
@@ -210,7 +211,7 @@ scoped_ptr<base::DictionaryValue> PrefService::GetPreferenceValuesOmitDefaults()
continue;
out->Set(it.first, pref->GetValue()->CreateDeepCopy());
}
- return out.Pass();
+ return out;
}
scoped_ptr<base::DictionaryValue>
@@ -222,7 +223,7 @@ PrefService::GetPreferenceValuesWithoutPathExpansion() const {
DCHECK(value);
out->SetWithoutPathExpansion(it.first, value->CreateDeepCopy());
}
- return out.Pass();
+ return out;
}
const PrefService::Preference* PrefService::FindPreference(
@@ -499,7 +500,7 @@ void PrefService::SetUserPrefValue(const std::string& path,
return;
}
- user_pref_store_->SetValue(path, owned_value.Pass(), GetWriteFlags(pref));
+ user_pref_store_->SetValue(path, std::move(owned_value), GetWriteFlags(pref));
}
void PrefService::UpdateCommandLinePrefStore(PrefStore* command_line_store) {
« no previous file with comments | « base/prefs/pref_member.cc ('k') | base/prefs/pref_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698