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..1be0bc75dd43da998dccc0a4859b75cc2d1dd92b 100644 |
--- a/chrome/browser/background/background_contents_service.cc |
+++ b/chrome/browser/background/background_contents_service.cc |
@@ -11,6 +11,7 @@ |
#include "base/compiler_specific.h" |
#include "base/location.h" |
#include "base/macros.h" |
+#include "base/memory/ptr_util.h" |
#include "base/metrics/histogram_macros.h" |
#include "base/single_thread_task_runner.h" |
#include "base/strings/string_util.h" |
@@ -763,10 +764,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( |