| Index: remoting/host/cast_extension_session.cc
|
| diff --git a/remoting/host/cast_extension_session.cc b/remoting/host/cast_extension_session.cc
|
| index 9bceaa6e40b444fc9645b6246fc8ba911b85d0b1..843a79d1585d959e63c3ec6308babfbda70c6750 100644
|
| --- a/remoting/host/cast_extension_session.cc
|
| +++ b/remoting/host/cast_extension_session.cc
|
| @@ -202,15 +202,15 @@ void CastExtensionSession::OnCreateSessionDescription(
|
| peer_connection_->SetLocalDescription(
|
| CastSetSessionDescriptionObserver::Create(), desc);
|
|
|
| - scoped_ptr<base::DictionaryValue> json(new base::DictionaryValue());
|
| - json->SetString(kWebRtcSessionDescType, desc->type());
|
| + base::DictionaryValue json;
|
| + json.SetString(kWebRtcSessionDescType, desc->type());
|
| std::string subject =
|
| (desc->type() == "offer") ? kSubjectOffer : kSubjectAnswer;
|
| std::string desc_str;
|
| desc->ToString(&desc_str);
|
| - json->SetString(kWebRtcSessionDescSDP, desc_str);
|
| + json.SetString(kWebRtcSessionDescSDP, desc_str);
|
| std::string json_str;
|
| - if (!base::JSONWriter::Write(json.get(), &json_str)) {
|
| + if (!base::JSONWriter::Write(json, &json_str)) {
|
| LOG(ERROR) << "Failed to serialize sdp message.";
|
| return;
|
| }
|
| @@ -420,7 +420,7 @@ bool CastExtensionSession::SendMessageToClient(const std::string& subject,
|
| message_dict.SetString(kTopLevelData, data);
|
| std::string message_json;
|
|
|
| - if (!base::JSONWriter::Write(&message_dict, &message_json)) {
|
| + if (!base::JSONWriter::Write(message_dict, &message_json)) {
|
| LOG(ERROR) << "Failed to serialize JSON message.";
|
| return false;
|
| }
|
| @@ -647,12 +647,12 @@ void CastExtensionSession::OnIceCandidate(
|
| LOG(ERROR) << "PeerConnectionObserver: failed to serialize candidate.";
|
| return;
|
| }
|
| - scoped_ptr<base::DictionaryValue> json(new base::DictionaryValue());
|
| - json->SetString(kWebRtcSDPMid, candidate->sdp_mid());
|
| - json->SetInteger(kWebRtcSDPMLineIndex, candidate->sdp_mline_index());
|
| - json->SetString(kWebRtcCandidate, candidate_str);
|
| + base::DictionaryValue json;
|
| + json.SetString(kWebRtcSDPMid, candidate->sdp_mid());
|
| + json.SetInteger(kWebRtcSDPMLineIndex, candidate->sdp_mline_index());
|
| + json.SetString(kWebRtcCandidate, candidate_str);
|
| std::string json_str;
|
| - if (!base::JSONWriter::Write(json.get(), &json_str)) {
|
| + if (!base::JSONWriter::Write(json, &json_str)) {
|
| LOG(ERROR) << "Failed to serialize candidate message.";
|
| return;
|
| }
|
|
|