Add MetricsService::WasLastShutdownClean()
[chromium-blink-merge.git] / remoting / protocol / it2me_host_authenticator_factory.h
blob6d194346508e7569e66548110468d9db84a835e2
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
3 // found in the LICENSE file.
5 #ifndef REMOTING_PROTOCOL_IT2ME_HOST_AUTHENTICATOR_FACTORY_H_
6 #define REMOTING_PROTOCOL_IT2ME_HOST_AUTHENTICATOR_FACTORY_H_
8 #include <string>
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "remoting/protocol/authenticator.h"
16 namespace remoting {
18 class RsaKeyPair;
20 namespace protocol {
22 // It2MeHostAuthenticatorFactory implements AuthenticatorFactory and
23 // understands both the V2 and legacy V1 authentication mechanisms.
24 class It2MeHostAuthenticatorFactory : public AuthenticatorFactory {
25 public:
26 It2MeHostAuthenticatorFactory(
27 const std::string& local_cert,
28 scoped_refptr<RsaKeyPair> key_pair,
29 const std::string& shared_secret);
30 ~It2MeHostAuthenticatorFactory() override;
32 // AuthenticatorFactory interface.
33 scoped_ptr<Authenticator> CreateAuthenticator(
34 const std::string& local_jid,
35 const std::string& remote_jid,
36 const buzz::XmlElement* first_message) override;
38 private:
39 std::string local_cert_;
40 scoped_refptr<RsaKeyPair> key_pair_;
41 std::string shared_secret_;
43 DISALLOW_COPY_AND_ASSIGN(It2MeHostAuthenticatorFactory);
46 } // namespace protocol
47 } // namespace remoting
49 #endif // REMOTING_PROTOCOL_IT2ME_HOST_AUTHENTICATOR_FACTORY_H_