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

Unified Diff: chrome/browser/notifications/notifier_state_tracker.cc

Issue 2336863003: Change more base::ListValue methods to use std::unique_ptr. (Closed)
Patch Set: . Created 4 years, 3 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
« no previous file with comments | « chrome/browser/extensions/extension_web_ui.cc ('k') | chrome/browser/permissions/chooser_context_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/notifications/notifier_state_tracker.cc
diff --git a/chrome/browser/notifications/notifier_state_tracker.cc b/chrome/browser/notifications/notifier_state_tracker.cc
index aeab48dcd2d7fbe9d7f8005daee75849e733a6e5..02ab9eabce7ca1fc3efccdbce482c7f39dcac1ee 100644
--- a/chrome/browser/notifications/notifier_state_tracker.cc
+++ b/chrome/browser/notifications/notifier_state_tracker.cc
@@ -144,11 +144,9 @@ void NotifierStateTracker::SetNotifierEnabled(
ListPrefUpdate update(profile_->GetPrefs(), pref_name);
base::ListValue* const list = update.Get();
if (add_new_item) {
- // AppendIfNotPresent will delete |adding_value| when the same value
- // already exists.
- list->AppendIfNotPresent(id.release());
+ list->AppendIfNotPresent(std::move(id));
} else {
- list->Remove(*id, NULL);
+ list->Remove(*id, nullptr);
}
}
« no previous file with comments | « chrome/browser/extensions/extension_web_ui.cc ('k') | chrome/browser/permissions/chooser_context_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698