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

Unified Diff: remoting/protocol/me2me_host_authenticator_factory.cc

Issue 12389010: Refactor of Authenticator to allow it to ProcessMessage asynchronously and then call a callback (Closed) Base URL: http://git.chromium.org/chromium/src.git@host_key_pair
Patch Set: Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: remoting/protocol/me2me_host_authenticator_factory.cc
diff --git a/remoting/protocol/me2me_host_authenticator_factory.cc b/remoting/protocol/me2me_host_authenticator_factory.cc
index ebdde5bfe2627f213c2c8c2200653dd086c1b5b3..84da6a114c6d549899faa3022c4848f453bec0c5 100644
--- a/remoting/protocol/me2me_host_authenticator_factory.cc
+++ b/remoting/protocol/me2me_host_authenticator_factory.cc
@@ -34,9 +34,11 @@ class RejectingAuthenticator : public Authenticator {
return INVALID_CREDENTIALS;
}
- virtual void ProcessMessage(const buzz::XmlElement* message) OVERRIDE {
+ virtual void ProcessMessage(const base::Closure& resume_callback,
+ const buzz::XmlElement* message) OVERRIDE {
DCHECK_EQ(state_, WAITING_MESSAGE);
state_ = REJECTED;
+ resume_callback.Run();
}
virtual scoped_ptr<buzz::XmlElement> GetNextMessage() OVERRIDE {

Powered by Google App Engine
This is Rietveld 408576698