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

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

Issue 1987163002: Add DOMAIN_MISMATCH message end to end (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Keep the order of ChromotingEvent list Created 4 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 unified diff | Download patch
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/strings/string_number_conversions.h" 8 #include "base/strings/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 26 matching lines...) Expand all
37 { JingleMessage::SESSION_INITIATE, "session-initiate" }, 37 { JingleMessage::SESSION_INITIATE, "session-initiate" },
38 { JingleMessage::SESSION_ACCEPT, "session-accept" }, 38 { JingleMessage::SESSION_ACCEPT, "session-accept" },
39 { JingleMessage::SESSION_TERMINATE, "session-terminate" }, 39 { JingleMessage::SESSION_TERMINATE, "session-terminate" },
40 { JingleMessage::SESSION_INFO, "session-info" }, 40 { JingleMessage::SESSION_INFO, "session-info" },
41 { JingleMessage::TRANSPORT_INFO, "transport-info" }, 41 { JingleMessage::TRANSPORT_INFO, "transport-info" },
42 }; 42 };
43 43
44 const NameMapElement<JingleMessage::Reason> kReasons[] = { 44 const NameMapElement<JingleMessage::Reason> kReasons[] = {
45 { JingleMessage::SUCCESS, "success" }, 45 { JingleMessage::SUCCESS, "success" },
46 { JingleMessage::DECLINE, "decline" }, 46 { JingleMessage::DECLINE, "decline" },
47 { JingleMessage::DOMAIN_MISMATCH, "domain-mismatch" },
Sergey Ulanov 2016/05/20 00:07:05 The XMPP spec defines list of the reasons, and "do
kelvinp 2016/05/20 22:44:12 I don't think you have addressed Sergey's comment
47 { JingleMessage::CANCEL, "cancel" }, 48 { JingleMessage::CANCEL, "cancel" },
48 { JingleMessage::EXPIRED, "expired" }, 49 { JingleMessage::EXPIRED, "expired" },
49 { JingleMessage::GENERAL_ERROR, "general-error" }, 50 { JingleMessage::GENERAL_ERROR, "general-error" },
50 { JingleMessage::FAILED_APPLICATION, "failed-application" }, 51 { JingleMessage::FAILED_APPLICATION, "failed-application" },
51 { JingleMessage::INCOMPATIBLE_PARAMETERS, "incompatible-parameters" }, 52 { JingleMessage::INCOMPATIBLE_PARAMETERS, "incompatible-parameters" },
52 }; 53 };
53 54
54 bool ParseIceCredentials(const buzz::XmlElement* element, 55 bool ParseIceCredentials(const buzz::XmlElement* element,
55 IceTransportInfo::IceCredentials* credentials) { 56 IceTransportInfo::IceCredentials* credentials) {
56 DCHECK(element->Name() == QName(kIceTransportNamespace, "credentials")); 57 DCHECK(element->Name() == QName(kIceTransportNamespace, "credentials"));
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 result->AddElement(FormatIceCredentials(credentials)); 490 result->AddElement(FormatIceCredentials(credentials));
490 } 491 }
491 for (const NamedCandidate& candidate : candidates) { 492 for (const NamedCandidate& candidate : candidates) {
492 result->AddElement(FormatIceCandidate(candidate)); 493 result->AddElement(FormatIceCandidate(candidate));
493 } 494 }
494 return result; 495 return result;
495 } 496 }
496 497
497 } // namespace protocol 498 } // namespace protocol
498 } // namespace remoting 499 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698