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

Unified Diff: chrome/browser/extensions/api/messaging/native_message_host_chromeos.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
Index: chrome/browser/extensions/api/messaging/native_message_host_chromeos.cc
diff --git a/chrome/browser/extensions/api/messaging/native_message_host_chromeos.cc b/chrome/browser/extensions/api/messaging/native_message_host_chromeos.cc
index 4977908be1b64fdcdae0ef34682bca820ffc4ed8..0fbc7709e523208d2d742a7097b28b3866fbd65e 100644
--- a/chrome/browser/extensions/api/messaging/native_message_host_chromeos.cc
+++ b/chrome/browser/extensions/api/messaging/native_message_host_chromeos.cc
@@ -70,12 +70,12 @@ class EchoHost : public NativeMessageHost {
private:
void ProcessEcho(const base::DictionaryValue& request) {
- scoped_ptr<base::DictionaryValue> response(new base::DictionaryValue());
- response->SetInteger("id", ++message_number_);
- response->Set("echo", request.DeepCopy());
- response->SetString("caller_url", kEchoHostOrigins[0]);
+ base::DictionaryValue response;
+ response.SetInteger("id", ++message_number_);
+ response.Set("echo", request.CreateDeepCopy());
+ response.SetString("caller_url", kEchoHostOrigins[0]);
std::string response_string;
- base::JSONWriter::Write(response.get(), &response_string);
+ base::JSONWriter::Write(response, &response_string);
client_->PostMessageFromNativeHost(response_string);
}

Powered by Google App Engine
This is Rietveld 408576698