OLD | NEW |
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 #include "remoting/protocol/me2me_host_authenticator_factory.h" | 5 #include "remoting/protocol/me2me_host_authenticator_factory.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "remoting/base/rsa_key_pair.h" | 9 #include "remoting/base/rsa_key_pair.h" |
10 #include "remoting/protocol/channel_authenticator.h" | 10 #include "remoting/protocol/channel_authenticator.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 virtual State state() const OVERRIDE { | 28 virtual State state() const OVERRIDE { |
29 return state_; | 29 return state_; |
30 } | 30 } |
31 | 31 |
32 virtual RejectionReason rejection_reason() const OVERRIDE { | 32 virtual RejectionReason rejection_reason() const OVERRIDE { |
33 DCHECK_EQ(state_, REJECTED); | 33 DCHECK_EQ(state_, REJECTED); |
34 return INVALID_CREDENTIALS; | 34 return INVALID_CREDENTIALS; |
35 } | 35 } |
36 | 36 |
37 virtual void ProcessMessage(const buzz::XmlElement* message) OVERRIDE { | 37 virtual void ProcessMessage(const buzz::XmlElement* message, |
| 38 const base::Closure& resume_callback) OVERRIDE { |
38 DCHECK_EQ(state_, WAITING_MESSAGE); | 39 DCHECK_EQ(state_, WAITING_MESSAGE); |
39 state_ = REJECTED; | 40 state_ = REJECTED; |
| 41 resume_callback.Run(); |
40 } | 42 } |
41 | 43 |
42 virtual scoped_ptr<buzz::XmlElement> GetNextMessage() OVERRIDE { | 44 virtual scoped_ptr<buzz::XmlElement> GetNextMessage() OVERRIDE { |
43 NOTREACHED(); | 45 NOTREACHED(); |
44 return scoped_ptr<buzz::XmlElement>(NULL); | 46 return scoped_ptr<buzz::XmlElement>(NULL); |
45 } | 47 } |
46 | 48 |
47 virtual scoped_ptr<ChannelAuthenticator> | 49 virtual scoped_ptr<ChannelAuthenticator> |
48 CreateChannelAuthenticator() const OVERRIDE { | 50 CreateChannelAuthenticator() const OVERRIDE { |
49 NOTREACHED(); | 51 NOTREACHED(); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 return scoped_ptr<Authenticator>(new RejectingAuthenticator()); | 91 return scoped_ptr<Authenticator>(new RejectingAuthenticator()); |
90 } | 92 } |
91 | 93 |
92 return NegotiatingAuthenticator::CreateForHost( | 94 return NegotiatingAuthenticator::CreateForHost( |
93 local_cert_, key_pair_, shared_secret_hash_.value, | 95 local_cert_, key_pair_, shared_secret_hash_.value, |
94 shared_secret_hash_.hash_function); | 96 shared_secret_hash_.hash_function); |
95 } | 97 } |
96 | 98 |
97 } // namespace protocol | 99 } // namespace protocol |
98 } // namespace remoting | 100 } // namespace remoting |
OLD | NEW |