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

Unified Diff: extensions/browser/api/device_permissions_manager.cc

Issue 2051663003: base::ListValue::Append cleanup: pass unique_ptr instead of the released pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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: extensions/browser/api/device_permissions_manager.cc
diff --git a/extensions/browser/api/device_permissions_manager.cc b/extensions/browser/api/device_permissions_manager.cc
index 5737ad3ab0817568ab353a3b2069d297871837c3..9320b330b7c1d5c80aafc28421d0eccfd9026bef 100644
--- a/extensions/browser/api/device_permissions_manager.cc
+++ b/extensions/browser/api/device_permissions_manager.cc
@@ -102,7 +102,7 @@ void SaveDevicePermissionEntry(BrowserContext* context,
std::unique_ptr<base::Value> device_entry(entry->ToValue());
DCHECK(devices->Find(*device_entry.get()) == devices->end());
- devices->Append(device_entry.release());
+ devices->Append(std::move(device_entry));
}
bool MatchesDevicePermissionEntry(const base::DictionaryValue* value,

Powered by Google App Engine
This is Rietveld 408576698