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/strings/string_util.h" | 8 #include "base/strings/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 30 matching lines...) Expand all Loading... |
41 | 41 |
42 virtual void ProcessMessage(const buzz::XmlElement* message, | 42 virtual void ProcessMessage(const buzz::XmlElement* message, |
43 const base::Closure& resume_callback) OVERRIDE { | 43 const base::Closure& resume_callback) OVERRIDE { |
44 DCHECK_EQ(state_, WAITING_MESSAGE); | 44 DCHECK_EQ(state_, WAITING_MESSAGE); |
45 state_ = REJECTED; | 45 state_ = REJECTED; |
46 resume_callback.Run(); | 46 resume_callback.Run(); |
47 } | 47 } |
48 | 48 |
49 virtual scoped_ptr<buzz::XmlElement> GetNextMessage() OVERRIDE { | 49 virtual scoped_ptr<buzz::XmlElement> GetNextMessage() OVERRIDE { |
50 NOTREACHED(); | 50 NOTREACHED(); |
51 return scoped_ptr<buzz::XmlElement>(); | 51 return nullptr; |
52 } | 52 } |
53 | 53 |
54 virtual scoped_ptr<ChannelAuthenticator> | 54 virtual scoped_ptr<ChannelAuthenticator> |
55 CreateChannelAuthenticator() const OVERRIDE { | 55 CreateChannelAuthenticator() const OVERRIDE { |
56 NOTREACHED(); | 56 NOTREACHED(); |
57 return scoped_ptr<ChannelAuthenticator>(); | 57 return nullptr; |
58 } | 58 } |
59 | 59 |
60 protected: | 60 protected: |
61 State state_; | 61 State state_; |
62 }; | 62 }; |
63 | 63 |
64 } // namespace | 64 } // namespace |
65 | 65 |
66 // static | 66 // static |
67 scoped_ptr<AuthenticatorFactory> | 67 scoped_ptr<AuthenticatorFactory> |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 return NegotiatingHostAuthenticator::CreateWithSharedSecret( | 158 return NegotiatingHostAuthenticator::CreateWithSharedSecret( |
159 local_cert_, key_pair_, shared_secret_hash_.value, | 159 local_cert_, key_pair_, shared_secret_hash_.value, |
160 shared_secret_hash_.hash_function, pairing_registry_); | 160 shared_secret_hash_.hash_function, pairing_registry_); |
161 } | 161 } |
162 | 162 |
163 return scoped_ptr<Authenticator>(new RejectingAuthenticator()); | 163 return scoped_ptr<Authenticator>(new RejectingAuthenticator()); |
164 } | 164 } |
165 | 165 |
166 } // namespace protocol | 166 } // namespace protocol |
167 } // namespace remoting | 167 } // namespace remoting |
OLD | NEW |