OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
Sergey Ulanov
2016/01/29 21:12:13
2016
Jamie
2016/01/29 23:29:09
Done.
| |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef REMOTING_PROTOCOL_REJECTING_AUTHENTICATOR_FACTORY_H_ | |
6 #define REMOTING_PROTOCOL_REJECTING_AUTHENTICATOR_FACTORY_H_ | |
7 | |
8 #include "remoting/protocol/authenticator.h" | |
9 | |
10 #include <string> | |
Sergey Ulanov
2016/01/29 21:12:13
nit: move this above authenticator.h
Jamie
2016/01/29 23:29:09
Done.
| |
11 | |
12 namespace remoting { | |
13 namespace protocol { | |
14 | |
15 // Authenticator that accepts one message and rejects connection after that. | |
16 class RejectingAuthenticator : public Authenticator { | |
17 public: | |
18 RejectingAuthenticator(RejectionReason rejection_reason); | |
19 ~RejectingAuthenticator() override; | |
20 | |
21 // Authenticator interface | |
22 State state() const override; | |
23 bool started() const override; | |
24 RejectionReason rejection_reason() const override; | |
25 void ProcessMessage(const buzz::XmlElement* message, | |
26 const base::Closure& resume_callback) override; | |
27 scoped_ptr<buzz::XmlElement> GetNextMessage() override; | |
28 const std::string& GetAuthKey() const override; | |
29 scoped_ptr<ChannelAuthenticator> CreateChannelAuthenticator() const override; | |
30 | |
31 private: | |
32 RejectionReason rejection_reason_; | |
33 State state_ = WAITING_MESSAGE; | |
34 std::string auth_key_; | |
35 | |
36 DISALLOW_COPY_AND_ASSIGN(RejectingAuthenticator); | |
37 }; | |
38 | |
39 } // namespace protocol | |
40 } // namespace remoting | |
41 | |
42 #endif | |
Sergey Ulanov
2016/01/29 21:12:13
// REMOTING_PROTOCOL_REJECTING_AUTHENTICATOR_FACTO
Jamie
2016/01/29 23:29:09
Done.
| |
OLD | NEW |