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

Unified Diff: chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.cc

Issue 2765363004: Stop passing raw pointers to DictionaryValue::Set, part 2 (Closed)
Patch Set: Fix comments Created 3 years, 9 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/chromeos/login/users/avatar/user_image_manager_impl.cc
diff --git a/chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.cc b/chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.cc
index e5e4cd2605d7f70400e0b11dd2306ccfd84d5f27..9c740c705fecbb7e906efa5b8af5ae6d8dfce091 100644
--- a/chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.cc
+++ b/chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.cc
@@ -544,10 +544,12 @@ void UserImageManagerImpl::Job::UpdateLocalState() {
return;
std::unique_ptr<base::DictionaryValue> entry(new base::DictionaryValue);
- entry->Set(kImagePathNodeName, new base::Value(image_path_.value()));
- entry->Set(kImageIndexNodeName, new base::Value(image_index_));
+ entry->Set(kImagePathNodeName,
+ base::MakeUnique<base::Value>(image_path_.value()));
+ entry->Set(kImageIndexNodeName, base::MakeUnique<base::Value>(image_index_));
if (!image_url_.is_empty())
- entry->Set(kImageURLNodeName, new base::Value(image_url_.spec()));
+ entry->Set(kImageURLNodeName,
+ base::MakeUnique<base::Value>(image_url_.spec()));
DictionaryPrefUpdate update(g_browser_process->local_state(),
kUserImageProperties);
update->SetWithoutPathExpansion(user_id(), entry.release());

Powered by Google App Engine
This is Rietveld 408576698