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

Unified Diff: chrome/browser/extensions/api/messaging/native_messaging_policy_handler.cc

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header Created 4 years, 8 months 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/api/messaging/native_messaging_policy_handler.cc
diff --git a/chrome/browser/extensions/api/messaging/native_messaging_policy_handler.cc b/chrome/browser/extensions/api/messaging/native_messaging_policy_handler.cc
index 91dc7c36275910c069254bd4f933d5cc3dd3903f..129798f776c27fc557d0ab8881da436a90723d75 100644
--- a/chrome/browser/extensions/api/messaging/native_messaging_policy_handler.cc
+++ b/chrome/browser/extensions/api/messaging/native_messaging_policy_handler.cc
@@ -36,7 +36,7 @@ bool NativeMessagingHostListPolicyHandler::CheckPolicySettings(
void NativeMessagingHostListPolicyHandler::ApplyPolicySettings(
const policy::PolicyMap& policies,
PrefValueMap* prefs) {
- scoped_ptr<base::ListValue> list;
+ std::unique_ptr<base::ListValue> list;
policy::PolicyErrorMap errors;
if (CheckAndGetList(policies, &errors, &list) && list)
prefs->SetValue(pref_path(), std::move(list));
@@ -49,7 +49,7 @@ const char* NativeMessagingHostListPolicyHandler::pref_path() const {
bool NativeMessagingHostListPolicyHandler::CheckAndGetList(
const policy::PolicyMap& policies,
policy::PolicyErrorMap* errors,
- scoped_ptr<base::ListValue>* names) {
+ std::unique_ptr<base::ListValue>* names) {
const base::Value* value = NULL;
if (!CheckAndGetValue(policies, errors, &value))
return false;
@@ -64,7 +64,7 @@ bool NativeMessagingHostListPolicyHandler::CheckAndGetList(
}
// Filter the list, rejecting any invalid native messaging host names.
- scoped_ptr<base::ListValue> filtered_list(new base::ListValue());
+ std::unique_ptr<base::ListValue> filtered_list(new base::ListValue());
for (base::ListValue::const_iterator entry(list_value->begin());
entry != list_value->end(); ++entry) {
std::string name;

Powered by Google App Engine
This is Rietveld 408576698