Roll src/third_party/WebKit 176b227:44a3ab6 (svn 200849:200851)
[chromium-blink-merge.git] / remoting / protocol / authenticator.cc
blob03e176a0c0d1fa70531907f6b2d712732a8fbd78
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "remoting/protocol/authenticator.h"
7 #include "remoting/base/constants.h"
8 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h"
10 namespace remoting {
11 namespace protocol {
13 namespace {
14 const buzz::StaticQName kAuthenticationQName = { kChromotingXmlNamespace,
15 "authentication" };
16 } // namespace
18 // static
19 bool Authenticator::IsAuthenticatorMessage(const buzz::XmlElement* message) {
20 return message->Name() == kAuthenticationQName;
23 // static
24 scoped_ptr<buzz::XmlElement> Authenticator::CreateEmptyAuthenticatorMessage() {
25 return make_scoped_ptr(new buzz::XmlElement(kAuthenticationQName));
28 // static
29 const buzz::XmlElement* Authenticator::FindAuthenticatorMessage(
30 const buzz::XmlElement* message) {
31 return message->FirstNamed(kAuthenticationQName);
34 } // namespace protocol
35 } // namespace remoting