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

Side by Side Diff: remoting/protocol/it2me_host_authenticator_factory.h

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
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 #ifndef REMOTING_PROTOCOL_IT2ME_HOST_AUTHENTICATOR_FACTORY_H_ 5 #ifndef REMOTING_PROTOCOL_IT2ME_HOST_AUTHENTICATOR_FACTORY_H_
6 #define REMOTING_PROTOCOL_IT2ME_HOST_AUTHENTICATOR_FACTORY_H_ 6 #define REMOTING_PROTOCOL_IT2ME_HOST_AUTHENTICATOR_FACTORY_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "remoting/protocol/authenticator.h" 14 #include "remoting/protocol/authenticator.h"
15 15
16 namespace remoting { 16 namespace remoting {
17 17
18 class RsaKeyPair; 18 class RsaKeyPair;
19 19
20 namespace protocol { 20 namespace protocol {
21 21
22 // It2MeHostAuthenticatorFactory implements AuthenticatorFactory and 22 // It2MeHostAuthenticatorFactory implements AuthenticatorFactory and
23 // understands both the V2 and legacy V1 authentication mechanisms. 23 // understands both the V2 and legacy V1 authentication mechanisms.
24 class It2MeHostAuthenticatorFactory : public AuthenticatorFactory { 24 class It2MeHostAuthenticatorFactory : public AuthenticatorFactory {
25 public: 25 public:
26 It2MeHostAuthenticatorFactory(const std::string& local_cert, 26 It2MeHostAuthenticatorFactory(const std::string& local_cert,
27 scoped_refptr<RsaKeyPair> key_pair, 27 scoped_refptr<RsaKeyPair> key_pair,
28 const std::string& access_code, 28 const std::string& access_code,
29 const std::string& required_client_domain); 29 const std::string& required_client_domain);
30 ~It2MeHostAuthenticatorFactory() override; 30 ~It2MeHostAuthenticatorFactory() override;
31 31
32 // AuthenticatorFactory interface. 32 // AuthenticatorFactory interface.
33 scoped_ptr<Authenticator> CreateAuthenticator( 33 std::unique_ptr<Authenticator> CreateAuthenticator(
34 const std::string& local_jid, 34 const std::string& local_jid,
35 const std::string& remote_jid) override; 35 const std::string& remote_jid) override;
36 36
37 private: 37 private:
38 std::string local_cert_; 38 std::string local_cert_;
39 scoped_refptr<RsaKeyPair> key_pair_; 39 scoped_refptr<RsaKeyPair> key_pair_;
40 std::string access_code_hash_; 40 std::string access_code_hash_;
41 std::string required_client_domain_; 41 std::string required_client_domain_;
42 42
43 DISALLOW_COPY_AND_ASSIGN(It2MeHostAuthenticatorFactory); 43 DISALLOW_COPY_AND_ASSIGN(It2MeHostAuthenticatorFactory);
44 }; 44 };
45 45
46 } // namespace protocol 46 } // namespace protocol
47 } // namespace remoting 47 } // namespace remoting
48 48
49 #endif // REMOTING_PROTOCOL_IT2ME_HOST_AUTHENTICATOR_FACTORY_H_ 49 #endif // REMOTING_PROTOCOL_IT2ME_HOST_AUTHENTICATOR_FACTORY_H_
OLDNEW
« no previous file with comments | « remoting/protocol/ice_transport_unittest.cc ('k') | remoting/protocol/it2me_host_authenticator_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698