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); |
} |