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; |
} |