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

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

Issue 2253233004: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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
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 "base/memory/ptr_util.h"
8 #include "remoting/base/constants.h" 8 #include "remoting/base/constants.h"
9 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" 9 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h"
10 10
11 namespace remoting { 11 namespace remoting {
12 namespace protocol { 12 namespace protocol {
13 13
14 namespace { 14 namespace {
15 const buzz::StaticQName kAuthenticationQName = { kChromotingXmlNamespace, 15 const buzz::StaticQName kAuthenticationQName = { kChromotingXmlNamespace,
16 "authentication" }; 16 "authentication" };
17 } // namespace 17 } // namespace
18 18
19 // static 19 // static
20 bool Authenticator::IsAuthenticatorMessage(const buzz::XmlElement* message) { 20 bool Authenticator::IsAuthenticatorMessage(const buzz::XmlElement* message) {
21 return message->Name() == kAuthenticationQName; 21 return message->Name() == kAuthenticationQName;
22 } 22 }
23 23
24 // static 24 // static
25 std::unique_ptr<buzz::XmlElement> 25 std::unique_ptr<buzz::XmlElement>
26 Authenticator::CreateEmptyAuthenticatorMessage() { 26 Authenticator::CreateEmptyAuthenticatorMessage() {
27 return base::WrapUnique(new buzz::XmlElement(kAuthenticationQName)); 27 return base::MakeUnique<buzz::XmlElement>(kAuthenticationQName);
28 } 28 }
29 29
30 // static 30 // static
31 const buzz::XmlElement* Authenticator::FindAuthenticatorMessage( 31 const buzz::XmlElement* Authenticator::FindAuthenticatorMessage(
32 const buzz::XmlElement* message) { 32 const buzz::XmlElement* message) {
33 return message->FirstNamed(kAuthenticationQName); 33 return message->FirstNamed(kAuthenticationQName);
34 } 34 }
35 35
36 } // namespace protocol 36 } // namespace protocol
37 } // namespace remoting 37 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/win/session_desktop_environment.cc ('k') | remoting/protocol/chromium_port_allocator_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698