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

Unified Diff: chrome/browser/background/background_contents_service.cc

Issue 2777063003: Stop passing raw pointers to base::Value API in c/b/chromeos and c/b/extensions (Closed)
Patch Set: Fix SupervisedUserWhitelistInstaller Created 3 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/background/background_contents_service.cc
diff --git a/chrome/browser/background/background_contents_service.cc b/chrome/browser/background/background_contents_service.cc
index ae384a895717fb16c3ce55ef883fb18400d4c149..a828dfe80c63f95c5b4d45940a435b02fbeed9ca 100644
--- a/chrome/browser/background/background_contents_service.cc
+++ b/chrome/browser/background/background_contents_service.cc
@@ -763,10 +763,10 @@ void BackgroundContentsService::RegisterBackgroundContents(
}
// No entry for this application yet, so add one.
- base::DictionaryValue* dict = new base::DictionaryValue();
+ auto dict = base::MakeUnique<base::DictionaryValue>();
dict->SetString(kUrlKey, background_contents->GetURL().spec());
dict->SetString(kFrameNameKey, contents_map_[appid].frame_name);
- pref->SetWithoutPathExpansion(base::UTF16ToUTF8(appid), dict);
+ pref->SetWithoutPathExpansion(base::UTF16ToUTF8(appid), std::move(dict));
}
bool BackgroundContentsService::HasRegisteredBackgroundContents(

Powered by Google App Engine
This is Rietveld 408576698