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

Unified Diff: chrome/browser/extensions/convert_web_app.cc

Issue 2806283002: Revert of Stop passing raw pointers to base::Value API in c/b/chromeos and c/b/extensions (Closed)
Patch Set: 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/extensions/convert_web_app.cc
diff --git a/chrome/browser/extensions/convert_web_app.cc b/chrome/browser/extensions/convert_web_app.cc
index e8304f2eb4f1b02f48e44d509ead28c1c9573886..500f56974e003ee04e7f9963525bf170fe5d8105 100644
--- a/chrome/browser/extensions/convert_web_app.cc
+++ b/chrome/browser/extensions/convert_web_app.cc
@@ -20,12 +20,10 @@
#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"
#include "base/time/time.h"
-#include "base/values.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/web_application_info.h"
#include "crypto/sha2.h"
@@ -118,8 +116,10 @@
}
// Add the icons and linked icon information.
- auto icons = base::MakeUnique<base::DictionaryValue>();
- auto linked_icons = base::MakeUnique<base::ListValue>();
+ base::DictionaryValue* icons = new base::DictionaryValue();
+ root->Set(keys::kIcons, icons);
+ base::ListValue* linked_icons = new base::ListValue();
+ root->Set(keys::kLinkedAppIcons, linked_icons);
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,8 +134,6 @@
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);
« no previous file with comments | « chrome/browser/extensions/convert_user_script.cc ('k') | chrome/browser/extensions/extension_assets_manager_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698