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

Unified Diff: headless/lib/browser/headless_net_log.cc

Issue 2911033002: Remove raw base::DictionaryValue::Set (Closed)
Patch Set: Proper Windows Fix Created 3 years, 6 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 | « gpu/config/gpu_control_list.cc ('k') | ios/chrome/browser/autofill/autofill_agent.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/lib/browser/headless_net_log.cc
diff --git a/headless/lib/browser/headless_net_log.cc b/headless/lib/browser/headless_net_log.cc
index a64f37ea1fa1350ea5110342707e72a6141cee56..ef733c294bccfccbe6cf3848b338f0a0e778424f 100644
--- a/headless/lib/browser/headless_net_log.cc
+++ b/headless/lib/browser/headless_net_log.cc
@@ -5,11 +5,13 @@
#include "headless/lib/browser/headless_net_log.h"
#include <stdio.h>
+
#include <utility>
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/files/scoped_file.h"
+#include "base/memory/ptr_util.h"
#include "base/values.h"
#include "build/build_config.h"
#include "content/public/common/content_switches.h"
@@ -24,14 +26,14 @@ std::unique_ptr<base::Value> GetHeadlessConstants() {
net::GetNetConstants();
// Add a dictionary with client information
- base::DictionaryValue* dict = new base::DictionaryValue();
+ auto dict = base::MakeUnique<base::DictionaryValue>();
dict->SetString("name", "headless");
dict->SetString(
"command_line",
base::CommandLine::ForCurrentProcess()->GetCommandLineString());
- constants_dict->Set("clientInfo", dict);
+ constants_dict->Set("clientInfo", std::move(dict));
return std::move(constants_dict);
}
« no previous file with comments | « gpu/config/gpu_control_list.cc ('k') | ios/chrome/browser/autofill/autofill_agent.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698