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

Side by Side Diff: remoting/protocol/jingle_messages.cc

Issue 10831022: Skip unknown channel configurations when parsing session config. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/protocol/content_description_unittest.cc ('k') | remoting/remoting.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « remoting/protocol/content_description_unittest.cc ('k') | remoting/remoting.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698