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

Unified Diff: remoting/client/plugin/chromoting_instance.cc

Issue 1131113004: Convert JsonWriter::Write to taking a const ref for the in-param (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another rebase Created 5 years, 7 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 | « remoting/base/vlog_net_log.cc ('k') | remoting/host/cast_extension_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/plugin/chromoting_instance.cc
diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc
index 3faab96508cb0a30d58ea19e0c8a17d3bba03919..a3544aa9fcbbbd5c0942a44d58875e7a3ca13983 100644
--- a/remoting/client/plugin/chromoting_instance.cc
+++ b/remoting/client/plugin/chromoting_instance.cc
@@ -1016,12 +1016,12 @@ void ChromotingInstance::PostChromotingMessage(const std::string& method,
void ChromotingInstance::PostLegacyJsonMessage(
const std::string& method,
scoped_ptr<base::DictionaryValue> data) {
- scoped_ptr<base::DictionaryValue> message(new base::DictionaryValue());
- message->SetString("method", method);
- message->Set("data", data.release());
+ base::DictionaryValue message;
+ message.SetString("method", method);
+ message.Set("data", data.release());
std::string message_json;
- base::JSONWriter::Write(message.get(), &message_json);
+ base::JSONWriter::Write(message, &message_json);
PostMessage(pp::Var(message_json));
}
« no previous file with comments | « remoting/base/vlog_net_log.cc ('k') | remoting/host/cast_extension_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698