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

Unified Diff: chrome/browser/extensions/api/debugger/debugger_api.cc

Issue 2323993004: Remove use of deprecated base::ListValue::Append(Value*) overload in extensions. (Closed)
Patch Set: ... I hate C++ Created 4 years, 3 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/api/debugger/debugger_api.cc
diff --git a/chrome/browser/extensions/api/debugger/debugger_api.cc b/chrome/browser/extensions/api/debugger/debugger_api.cc
index a64ff5b36bbae2716df31b287e059517c8e3df3d..6242e561ef4bb41a73bc399d57319b696b8d2bf9 100644
--- a/chrome/browser/extensions/api/debugger/debugger_api.cc
+++ b/chrome/browser/extensions/api/debugger/debugger_api.cc
@@ -677,8 +677,10 @@ const char kTargetTabIdField[] = "tabId";
const char kTargetExtensionIdField[] = "extensionId";
const char kTargetTypeWorker[] = "worker";
-base::Value* SerializeTarget(scoped_refptr<DevToolsAgentHost> host) {
- base::DictionaryValue* dictionary = new base::DictionaryValue();
+std::unique_ptr<base::DictionaryValue> SerializeTarget(
+ scoped_refptr<DevToolsAgentHost> host) {
+ std::unique_ptr<base::DictionaryValue> dictionary(
+ new base::DictionaryValue());
dictionary->SetString(kTargetIdField, host->GetId());
dictionary->SetString(kTargetTitleField, host->GetTitle());
dictionary->SetBoolean(kTargetAttachedField, host->IsAttached());

Powered by Google App Engine
This is Rietveld 408576698