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

Unified Diff: cc/debug/traced_picture.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 | « base/values.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/debug/traced_picture.cc
diff --git a/cc/debug/traced_picture.cc b/cc/debug/traced_picture.cc
index 2c7622b66d5fb98405437f58bb6d817fb66d0ca2..3241871d8ee01bc1e8b8485947fdd095e201ec5f 100644
--- a/cc/debug/traced_picture.cc
+++ b/cc/debug/traced_picture.cc
@@ -40,18 +40,16 @@ void TracedPicture::AppendPictureAlias(std::string* out) const {
scoped_ptr<base::DictionaryValue> alias(new base::DictionaryValue());
alias->SetString("id_ref", base::StringPrintf("%p", picture_.get()));
- scoped_ptr<base::DictionaryValue> res(new base::DictionaryValue());
- res->Set("alias", alias.release());
-
+ base::DictionaryValue res;
+ res.Set("alias", alias.release());
std::string tmp;
- base::JSONWriter::Write(res.get(), &tmp);
+ base::JSONWriter::Write(res, &tmp);
out->append(tmp);
}
void TracedPicture::AppendPicture(std::string* out) const {
- scoped_ptr<base::Value> value = picture_->AsValue();
std::string tmp;
- base::JSONWriter::Write(value.get(), &tmp);
+ base::JSONWriter::Write(*picture_->AsValue(), &tmp);
out->append(tmp);
}
« no previous file with comments | « base/values.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698