OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "remoting/protocol/jingle_messages.h" | 5 #include "remoting/protocol/jingle_messages.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
9 #include "remoting/base/constants.h" | 9 #include "remoting/base/constants.h" |
10 #include "remoting/protocol/content_description.h" | 10 #include "remoting/protocol/content_description.h" |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 | 252 |
253 description.reset(NULL); | 253 description.reset(NULL); |
254 if (action == SESSION_INITIATE || action == SESSION_ACCEPT) { | 254 if (action == SESSION_INITIATE || action == SESSION_ACCEPT) { |
255 const XmlElement* description_tag = content_tag->FirstNamed( | 255 const XmlElement* description_tag = content_tag->FirstNamed( |
256 QName(kChromotingXmlNamespace, "description")); | 256 QName(kChromotingXmlNamespace, "description")); |
257 if (!description_tag) { | 257 if (!description_tag) { |
258 *error = "Missing chromoting content description"; | 258 *error = "Missing chromoting content description"; |
259 return false; | 259 return false; |
260 } | 260 } |
261 | 261 |
262 description.reset(ContentDescription::ParseXml(description_tag)); | 262 description = ContentDescription::ParseXml(description_tag); |
263 if (!description.get()) { | 263 if (!description.get()) { |
264 *error = "Failed to parse content description"; | 264 *error = "Failed to parse content description"; |
265 return false; | 265 return false; |
266 } | 266 } |
267 } | 267 } |
268 | 268 |
269 candidates.clear(); | 269 candidates.clear(); |
270 const XmlElement* transport_tag = content_tag->FirstNamed( | 270 const XmlElement* transport_tag = content_tag->FirstNamed( |
271 QName(kP2PTransportNamespace, "transport")); | 271 QName(kP2PTransportNamespace, "transport")); |
272 if (transport_tag) { | 272 if (transport_tag) { |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 text_elem->SetAttr(QName(kXmlNamespace, "lang"), "en"); | 448 text_elem->SetAttr(QName(kXmlNamespace, "lang"), "en"); |
449 text_elem->SetBodyText(error_text); | 449 text_elem->SetBodyText(error_text); |
450 error->AddElement(text_elem); | 450 error->AddElement(text_elem); |
451 } | 451 } |
452 | 452 |
453 return iq.Pass(); | 453 return iq.Pass(); |
454 } | 454 } |
455 | 455 |
456 } // namespace protocol | 456 } // namespace protocol |
457 } // namespace remoting | 457 } // namespace remoting |
OLD | NEW |