diff options
author | estade <estade@chromium.org> | 2015-05-15 18:02:34 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-16 01:02:46 +0000 |
commit | 8d04646294767ea1f3a7da596547b465d50cb4d1 (patch) | |
tree | 6bd6194b6fe2ac226114f9125570bd605e9b6d42 /sync/api | |
parent | f39e5aff5aae8451a7ef190a2fc822bf80c4e30d (diff) | |
download | chromium_src-8d04646294767ea1f3a7da596547b465d50cb4d1.zip chromium_src-8d04646294767ea1f3a7da596547b465d50cb4d1.tar.gz chromium_src-8d04646294767ea1f3a7da596547b465d50cb4d1.tar.bz2 |
Convert JsonWriter::Write to taking a const ref for the in-param
Clearer API; flushes out a lot of unnecessary heap allocations.
depends on https://codereview.chromium.org/1129083003/
BUG=none
Review URL: https://codereview.chromium.org/1131113004
Cr-Commit-Position: refs/heads/master@{#330255}
Diffstat (limited to 'sync/api')
-rw-r--r-- | sync/api/sync_data.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sync/api/sync_data.cc b/sync/api/sync_data.cc index 0dd567d..d6c9152 100644 --- a/sync/api/sync_data.cc +++ b/sync/api/sync_data.cc @@ -155,10 +155,9 @@ std::string SyncData::ToString() const { std::string type = ModelTypeToString(GetDataType()); std::string specifics; - scoped_ptr<base::DictionaryValue> value( - EntitySpecificsToValue(GetSpecifics())); - base::JSONWriter::WriteWithOptions( - value.get(), base::JSONWriter::OPTIONS_PRETTY_PRINT, &specifics); + base::JSONWriter::WriteWithOptions(*EntitySpecificsToValue(GetSpecifics()), + base::JSONWriter::OPTIONS_PRETTY_PRINT, + &specifics); if (IsLocal()) { SyncDataLocal sync_data_local(*this); |