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

Unified Diff: cloud_print/service/service_state.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 | « cloud_print/gcp20/prototype/privet_http_server.cc ('k') | cloud_print/service/win/chrome_launcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cloud_print/service/service_state.cc
diff --git a/cloud_print/service/service_state.cc b/cloud_print/service/service_state.cc
index f98c513f469c9ba16e39f058ebff5ddbfea40f3f..789d229a0e2591b3f94f35a3d64402026effbdb1 100644
--- a/cloud_print/service/service_state.cc
+++ b/cloud_print/service/service_state.cc
@@ -134,8 +134,6 @@ bool ServiceState::IsValid() const {
}
std::string ServiceState::ToString() {
- scoped_ptr<base::DictionaryValue> services(new base::DictionaryValue());
-
scoped_ptr<base::DictionaryValue> cloud_print(new base::DictionaryValue());
cloud_print->SetBoolean(kEnabledOptionName, true);
@@ -147,12 +145,12 @@ std::string ServiceState::ToString() {
SetNotEmptyJsonString(cloud_print.get(), kXmppAuthTokenOptionName,
xmpp_auth_token_);
- services->Set(kCloudPrintJsonName, cloud_print.release());
+ base::DictionaryValue services;
+ services.Set(kCloudPrintJsonName, cloud_print.Pass());
std::string json;
- base::JSONWriter::WriteWithOptions(services.get(),
- base::JSONWriter::OPTIONS_PRETTY_PRINT,
- &json);
+ base::JSONWriter::WriteWithOptions(
+ services, base::JSONWriter::OPTIONS_PRETTY_PRINT, &json);
return json;
}
« no previous file with comments | « cloud_print/gcp20/prototype/privet_http_server.cc ('k') | cloud_print/service/win/chrome_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698