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

Unified Diff: components/invalidation/p2p_invalidator.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 | « components/invalidation/invalidation_util.cc ('k') | components/nacl/renderer/ppb_nacl_private_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/invalidation/p2p_invalidator.cc
diff --git a/components/invalidation/p2p_invalidator.cc b/components/invalidation/p2p_invalidator.cc
index c583d440faabfa77ff4f48ea9e82e917d6b43282..906a201dee6edff0025c5ac4e8a844ee5422bd51 100644
--- a/components/invalidation/p2p_invalidator.cc
+++ b/components/invalidation/p2p_invalidator.cc
@@ -102,13 +102,12 @@ bool P2PNotificationData::Equals(const P2PNotificationData& other) const {
}
std::string P2PNotificationData::ToString() const {
- scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
- dict->SetString(kSenderIdKey, sender_id_);
- dict->SetString(kNotificationTypeKey,
- P2PNotificationTargetToString(target_));
- dict->Set(kInvalidationsKey, invalidation_map_.ToValue().release());
+ base::DictionaryValue dict;
+ dict.SetString(kSenderIdKey, sender_id_);
+ dict.SetString(kNotificationTypeKey, P2PNotificationTargetToString(target_));
+ dict.Set(kInvalidationsKey, invalidation_map_.ToValue().release());
std::string json;
- base::JSONWriter::Write(dict.get(), &json);
+ base::JSONWriter::Write(dict, &json);
return json;
}
« no previous file with comments | « components/invalidation/invalidation_util.cc ('k') | components/nacl/renderer/ppb_nacl_private_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698