summaryrefslogtreecommitdiffstats
path: root/remoting/protocol/pairing_host_authenticator.h
diff options
context:
space:
mode:
authorjamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-14 07:08:11 +0000
committerjamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-14 07:08:11 +0000
commit40dade3275c3bf84f1a646a9643fdabed19094ad (patch)
treed6662c3eb65edd75b84e2fd0f25df87ebc4f6a3a /remoting/protocol/pairing_host_authenticator.h
parent1961ab46f877cb4b139a6ed20f603d911da0f088 (diff)
downloadchromium_src-40dade3275c3bf84f1a646a9643fdabed19094ad.zip
chromium_src-40dade3275c3bf84f1a646a9643fdabed19094ad.tar.gz
chromium_src-40dade3275c3bf84f1a646a9643fdabed19094ad.tar.bz2
Make the mapping from client id -> secret asynchronous.
In the original design, I intended the pairing registry delegate to maintain an in-memory cache of client id -> secret, and for this to be invalidated by a watcher when the on-disk version changes (for example, if the web-app is used to revoke a pairing). I think an asynchronous model makes more sense, and eliminates the need for the watcher. In addition, this CL fixes a bug in the negotiating authenticator when dealing with authenticators that process messages asychronously. BUG=156182 Review URL: https://chromiumcodereview.appspot.com/16893002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206347 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol/pairing_host_authenticator.h')
-rw-r--r--remoting/protocol/pairing_host_authenticator.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/remoting/protocol/pairing_host_authenticator.h b/remoting/protocol/pairing_host_authenticator.h
index a4884c4..57c900c 100644
--- a/remoting/protocol/pairing_host_authenticator.h
+++ b/remoting/protocol/pairing_host_authenticator.h
@@ -7,6 +7,7 @@
#include "base/memory/weak_ptr.h"
#include "remoting/protocol/pairing_authenticator_base.h"
+#include "remoting/protocol/pairing_registry.h"
namespace remoting {
@@ -38,12 +39,19 @@ class PairingHostAuthenticator : public PairingAuthenticatorBase {
const SetAuthenticatorCallback& callback) OVERRIDE;
virtual void AddPairingElements(buzz::XmlElement* message) OVERRIDE;
+ // Continue processing a protocol message once the pairing information for
+ // the client id has been received.
+ void ProcessMessageWithPairing(const buzz::XmlElement* message,
+ const base::Closure& resume_callback,
+ PairingRegistry::Pairing pairing);
+
// Protocol state.
scoped_refptr<PairingRegistry> pairing_registry_;
std::string local_cert_;
scoped_refptr<RsaKeyPair> key_pair_;
const std::string& pin_;
bool protocol_error_;
+ bool waiting_for_paired_secret_;
base::WeakPtrFactory<PairingHostAuthenticator> weak_factory_;