| Index: chrome/browser/extensions/convert_web_app.cc
|
| diff --git a/chrome/browser/extensions/convert_web_app.cc b/chrome/browser/extensions/convert_web_app.cc
|
| index 500f56974e003ee04e7f9963525bf170fe5d8105..ab31930124fce684aa881662d905f392469a907b 100644
|
| --- a/chrome/browser/extensions/convert_web_app.cc
|
| +++ b/chrome/browser/extensions/convert_web_app.cc
|
| @@ -20,6 +20,7 @@
|
| #include "base/files/scoped_temp_dir.h"
|
| #include "base/json/json_file_value_serializer.h"
|
| #include "base/logging.h"
|
| +#include "base/memory/ptr_util.h"
|
| #include "base/numerics/safe_conversions.h"
|
| #include "base/strings/stringprintf.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| @@ -116,10 +117,8 @@ scoped_refptr<Extension> ConvertWebAppToExtension(
|
| }
|
|
|
| // Add the icons and linked icon information.
|
| - base::DictionaryValue* icons = new base::DictionaryValue();
|
| - root->Set(keys::kIcons, icons);
|
| - base::ListValue* linked_icons = new base::ListValue();
|
| - root->Set(keys::kLinkedAppIcons, linked_icons);
|
| + auto icons = base::MakeUnique<base::DictionaryValue>();
|
| + auto linked_icons = base::MakeUnique<base::ListValue>();
|
| for (const auto& icon : web_app.icons) {
|
| std::string size = base::StringPrintf("%i", icon.width);
|
| std::string icon_path = base::StringPrintf("%s/%s.png", kIconsDirName,
|
| @@ -134,6 +133,8 @@ scoped_refptr<Extension> ConvertWebAppToExtension(
|
| linked_icons->Append(std::move(linked_icon));
|
| }
|
| }
|
| + root->Set(keys::kIcons, std::move(icons));
|
| + root->Set(keys::kLinkedAppIcons, std::move(linked_icons));
|
|
|
| // Write the manifest.
|
| base::FilePath manifest_path = temp_dir.GetPath().Append(kManifestFilename);
|
|
|