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

Unified Diff: chromecast/browser/cast_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 | « chrome/test/chromedriver/server/http_handler.cc ('k') | chromeos/dbus/fake_shill_service_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/browser/cast_net_log.cc
diff --git a/chromecast/browser/cast_net_log.cc b/chromecast/browser/cast_net_log.cc
index 927986f0a20007e92abfaf54b7c7745b7240e7c4..bd06582273fdb6552048ee6d4281866cc805feef 100644
--- a/chromecast/browser/cast_net_log.cc
+++ b/chromecast/browser/cast_net_log.cc
@@ -5,11 +5,13 @@
#include "chromecast/browser/cast_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 "content/public/common/content_switches.h"
#include "net/log/net_log_util.h"
@@ -19,21 +21,21 @@ namespace chromecast {
namespace {
-base::DictionaryValue* GetShellConstants() {
+std::unique_ptr<base::DictionaryValue> GetShellConstants() {
std::unique_ptr<base::DictionaryValue> constants_dict =
net::GetNetConstants();
// Add a dictionary with client information
- base::DictionaryValue* dict = new base::DictionaryValue();
+ auto dict = base::MakeUnique<base::DictionaryValue>();
dict->SetString("name", "cast_shell");
dict->SetString(
"command_line",
base::CommandLine::ForCurrentProcess()->GetCommandLineString());
- constants_dict->Set("clientInfo", dict);
+ constants_dict->Set("clientInfo", std::move(dict));
- return constants_dict.release();
+ return constants_dict;
}
} // namespace
« no previous file with comments | « chrome/test/chromedriver/server/http_handler.cc ('k') | chromeos/dbus/fake_shill_service_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698