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

Unified Diff: chrome/browser/ui/webui/extensions/extension_loader_handler.cc

Issue 2812953002: Stop passing raw pointers to base::Value API in c/b/ui (Closed)
Patch Set: No ListValue::SetDouble 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
« no previous file with comments | « chrome/browser/ui/webui/cookies_tree_model_util.cc ('k') | chrome/browser/ui/webui/flags_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/extensions/extension_loader_handler.cc
diff --git a/chrome/browser/ui/webui/extensions/extension_loader_handler.cc b/chrome/browser/ui/webui/extensions/extension_loader_handler.cc
index f85d09dcae0c8da2418ede3428ef9248f182f48b..846123f953910177c741faf0ed8c5e77cb1be6fd 100644
--- a/chrome/browser/ui/webui/extensions/extension_loader_handler.cc
+++ b/chrome/browser/ui/webui/extensions/extension_loader_handler.cc
@@ -4,17 +4,20 @@
#include "chrome/browser/ui/webui/extensions/extension_loader_handler.h"
+#include <memory>
#include <utility>
#include "base/bind.h"
#include "base/files/file_util.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h"
#include "base/strings/string16.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task_scheduler/post_task.h"
+#include "base/values.h"
#include "chrome/browser/extensions/path_util.h"
#include "chrome/browser/extensions/unpacked_installer.h"
#include "chrome/browser/profiles/profile.h"
@@ -205,9 +208,9 @@ void ExtensionLoaderHandler::AddFailure(
highlighter.SetHighlightedRegions(manifest_value.get());
std::unique_ptr<base::DictionaryValue> failure(new base::DictionaryValue());
- failure->Set("path", new base::Value(prettified_path.LossyDisplayName()));
- failure->Set("error", new base::Value(base::UTF8ToUTF16(error)));
- failure->Set("manifest", manifest_value.release());
+ failure->SetString("path", prettified_path.LossyDisplayName());
+ failure->SetString("error", error);
+ failure->Set("manifest", std::move(manifest_value));
failures_.Append(std::move(failure));
// Only notify the frontend if the frontend UI is ready.
« no previous file with comments | « chrome/browser/ui/webui/cookies_tree_model_util.cc ('k') | chrome/browser/ui/webui/flags_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698