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

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

Issue 16893002: Make the mapping from client id -> secret asynchronous. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed clang errors. Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_PAIRING_HOST_AUTHENTICATOR_H_ 5 #ifndef REMOTING_PROTOCOL_PAIRING_HOST_AUTHENTICATOR_H_
6 #define REMOTING_PROTOCOL_PAIRING_HOST_AUTHENTICATOR_H_ 6 #define REMOTING_PROTOCOL_PAIRING_HOST_AUTHENTICATOR_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "remoting/protocol/pairing_authenticator_base.h" 9 #include "remoting/protocol/pairing_authenticator_base.h"
10 #include "remoting/protocol/pairing_registry.h"
10 11
11 namespace remoting { 12 namespace remoting {
12 13
13 class RsaKeyPair; 14 class RsaKeyPair;
14 15
15 namespace protocol { 16 namespace protocol {
16 17
17 class PairingRegistry; 18 class PairingRegistry;
18 19
19 class PairingHostAuthenticator : public PairingAuthenticatorBase { 20 class PairingHostAuthenticator : public PairingAuthenticatorBase {
(...skipping 11 matching lines...) Expand all
31 virtual void ProcessMessage(const buzz::XmlElement* message, 32 virtual void ProcessMessage(const buzz::XmlElement* message,
32 const base::Closure& resume_callback) OVERRIDE; 33 const base::Closure& resume_callback) OVERRIDE;
33 34
34 private: 35 private:
35 // PairingAuthenticatorBase interface. 36 // PairingAuthenticatorBase interface.
36 virtual void CreateV2AuthenticatorWithPIN( 37 virtual void CreateV2AuthenticatorWithPIN(
37 State initial_state, 38 State initial_state,
38 const SetAuthenticatorCallback& callback) OVERRIDE; 39 const SetAuthenticatorCallback& callback) OVERRIDE;
39 virtual void AddPairingElements(buzz::XmlElement* message) OVERRIDE; 40 virtual void AddPairingElements(buzz::XmlElement* message) OVERRIDE;
40 41
42 // Continue processing a protocol message once the pairing information for
43 // the client id has been received.
44 void ProcessMessageWithPairing(const buzz::XmlElement* message,
45 const base::Closure& resume_callback,
46 PairingRegistry::Pairing pairing);
47
41 // Protocol state. 48 // Protocol state.
42 scoped_refptr<PairingRegistry> pairing_registry_; 49 scoped_refptr<PairingRegistry> pairing_registry_;
43 std::string local_cert_; 50 std::string local_cert_;
44 scoped_refptr<RsaKeyPair> key_pair_; 51 scoped_refptr<RsaKeyPair> key_pair_;
45 const std::string& pin_; 52 const std::string& pin_;
46 bool protocol_error_; 53 bool protocol_error_;
54 bool waiting_for_paired_secret_;
47 55
48 base::WeakPtrFactory<PairingHostAuthenticator> weak_factory_; 56 base::WeakPtrFactory<PairingHostAuthenticator> weak_factory_;
49 57
50 DISALLOW_COPY_AND_ASSIGN(PairingHostAuthenticator); 58 DISALLOW_COPY_AND_ASSIGN(PairingHostAuthenticator);
51 }; 59 };
52 60
53 } // namespace protocol 61 } // namespace protocol
54 } // namespace remoting 62 } // namespace remoting
55 63
56 #endif // REMOTING_PROTOCOL_PAIRING_AUTHENTICATOR_H_ 64 #endif // REMOTING_PROTOCOL_PAIRING_AUTHENTICATOR_H_
OLDNEW
« no previous file with comments | « remoting/protocol/negotiating_authenticator_unittest.cc ('k') | remoting/protocol/pairing_host_authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698