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

Unified Diff: remoting/protocol/fake_authenticator.cc

Issue 12326090: Third Party authentication protocol. (Closed) Base URL: http://git.chromium.org/chromium/src.git@host_key_pair
Patch Set: Split authenticator into base, client, host 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/fake_authenticator.cc
diff --git a/remoting/protocol/fake_authenticator.cc b/remoting/protocol/fake_authenticator.cc
index 681f2a9ca88391a7868e15ebe6a3a4551402c647..26d89ded868be58bf9c5f4a18a5053e19333aba1 100644
--- a/remoting/protocol/fake_authenticator.cc
+++ b/remoting/protocol/fake_authenticator.cc
@@ -86,7 +86,7 @@ FakeAuthenticator::FakeAuthenticator(
FakeAuthenticator::~FakeAuthenticator() {
}
-Authenticator::State FakeAuthenticator::state() const{
+Authenticator::State FakeAuthenticator::state() const {
EXPECT_LE(messages_, round_trips_ * 2);
if (messages_ >= round_trips_ * 2) {
if (action_ == REJECT) {
@@ -117,12 +117,14 @@ Authenticator::RejectionReason FakeAuthenticator::rejection_reason() const {
return INVALID_CREDENTIALS;
}
-void FakeAuthenticator::ProcessMessage(const buzz::XmlElement* message) {
+void FakeAuthenticator::ProcessMessage(const buzz::XmlElement* message,
+ const base::Closure& resume_callback) {
EXPECT_EQ(WAITING_MESSAGE, state());
std::string id =
message->TextNamed(buzz::QName(kChromotingXmlNamespace, "id"));
EXPECT_EQ(id, base::IntToString(messages_));
++messages_;
+ resume_callback.Run();
}
scoped_ptr<buzz::XmlElement> FakeAuthenticator::GetNextMessage() {

Powered by Google App Engine
This is Rietveld 408576698