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

Unified Diff: chrome/browser/extensions/policy_handlers.cc

Issue 1549233002: Convert Pass()→std::move() in //chrome/browser/extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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: chrome/browser/extensions/policy_handlers.cc
diff --git a/chrome/browser/extensions/policy_handlers.cc b/chrome/browser/extensions/policy_handlers.cc
index 5b65f24c31fcf8068cc5c7838f2b744d2e1d5ab3..042d1cfc9c215d3d81cfb26095d478e5a9d2fe1f 100644
--- a/chrome/browser/extensions/policy_handlers.cc
+++ b/chrome/browser/extensions/policy_handlers.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/extensions/policy_handlers.h"
#include <stddef.h>
+#include <utility>
#include "base/logging.h"
#include "base/prefs/pref_value_map.h"
@@ -45,7 +46,7 @@ void ExtensionListPolicyHandler::ApplyPolicySettings(
scoped_ptr<base::ListValue> list;
policy::PolicyErrorMap errors;
if (CheckAndGetList(policies, &errors, &list) && list)
- prefs->SetValue(pref_path(), list.Pass());
+ prefs->SetValue(pref_path(), std::move(list));
}
const char* ExtensionListPolicyHandler::pref_path() const {
@@ -94,7 +95,7 @@ bool ExtensionListPolicyHandler::CheckAndGetList(
}
if (extension_ids)
- *extension_ids = filtered_list.Pass();
+ *extension_ids = std::move(filtered_list);
return true;
}
@@ -124,7 +125,7 @@ void ExtensionInstallForcelistPolicyHandler::ApplyPolicySettings(
if (CheckAndGetValue(policies, NULL, &value) &&
value &&
ParseList(value, dict.get(), NULL)) {
- prefs->SetValue(pref_names::kInstallForceList, dict.Pass());
+ prefs->SetValue(pref_names::kInstallForceList, std::move(dict));
}
}
@@ -322,7 +323,7 @@ void ExtensionSettingsPolicyHandler::ApplyPolicySettings(
scoped_ptr<base::Value> policy_value;
if (!CheckAndGetValue(policies, NULL, &policy_value) || !policy_value)
return;
- prefs->SetValue(pref_names::kExtensionManagement, policy_value.Pass());
+ prefs->SetValue(pref_names::kExtensionManagement, std::move(policy_value));
}
} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/permissions_updater_unittest.cc ('k') | chrome/browser/extensions/process_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698