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

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

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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
« no previous file with comments | « remoting/protocol/authenticator.h ('k') | remoting/protocol/authenticator_test_base.h » ('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) 2011 The Chromium Authors. All rights reserved. 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 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/authenticator.h" 5 #include "remoting/protocol/authenticator.h"
6 6
7 #include "base/memory/ptr_util.h"
7 #include "remoting/base/constants.h" 8 #include "remoting/base/constants.h"
8 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" 9 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h"
9 10
10 namespace remoting { 11 namespace remoting {
11 namespace protocol { 12 namespace protocol {
12 13
13 namespace { 14 namespace {
14 const buzz::StaticQName kAuthenticationQName = { kChromotingXmlNamespace, 15 const buzz::StaticQName kAuthenticationQName = { kChromotingXmlNamespace,
15 "authentication" }; 16 "authentication" };
16 } // namespace 17 } // namespace
17 18
18 // static 19 // static
19 bool Authenticator::IsAuthenticatorMessage(const buzz::XmlElement* message) { 20 bool Authenticator::IsAuthenticatorMessage(const buzz::XmlElement* message) {
20 return message->Name() == kAuthenticationQName; 21 return message->Name() == kAuthenticationQName;
21 } 22 }
22 23
23 // static 24 // static
24 scoped_ptr<buzz::XmlElement> Authenticator::CreateEmptyAuthenticatorMessage() { 25 std::unique_ptr<buzz::XmlElement>
25 return make_scoped_ptr(new buzz::XmlElement(kAuthenticationQName)); 26 Authenticator::CreateEmptyAuthenticatorMessage() {
27 return base::WrapUnique(new buzz::XmlElement(kAuthenticationQName));
26 } 28 }
27 29
28 // static 30 // static
29 const buzz::XmlElement* Authenticator::FindAuthenticatorMessage( 31 const buzz::XmlElement* Authenticator::FindAuthenticatorMessage(
30 const buzz::XmlElement* message) { 32 const buzz::XmlElement* message) {
31 return message->FirstNamed(kAuthenticationQName); 33 return message->FirstNamed(kAuthenticationQName);
32 } 34 }
33 35
34 } // namespace protocol 36 } // namespace protocol
35 } // namespace remoting 37 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/authenticator.h ('k') | remoting/protocol/authenticator_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698