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

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

Issue 205583011: [Draft] Fix canceling pin prompt causes host overload (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removing .gitIngore Created 6 years, 9 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 (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 #ifndef REMOTING_PROTOCOL_AUTHENTICATOR_H_ 5 #ifndef REMOTING_PROTOCOL_AUTHENTICATOR_H_
6 #define REMOTING_PROTOCOL_AUTHENTICATOR_H_ 6 #define REMOTING_PROTOCOL_AUTHENTICATOR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // returns NULL otherwise. 82 // returns NULL otherwise.
83 static const buzz::XmlElement* FindAuthenticatorMessage( 83 static const buzz::XmlElement* FindAuthenticatorMessage(
84 const buzz::XmlElement* message); 84 const buzz::XmlElement* message);
85 85
86 Authenticator() {} 86 Authenticator() {}
87 virtual ~Authenticator() {} 87 virtual ~Authenticator() {}
88 88
89 // Returns current state of the authenticator. 89 // Returns current state of the authenticator.
90 virtual State state() const = 0; 90 virtual State state() const = 0;
91 91
92 // Whether authentication has started
Sergey Ulanov 2014/03/24 18:42:36 Please mention how this value should be used. E.g.
kelvinp 2014/03/24 23:11:39 Done.
93 virtual bool has_auth_started() const = 0;
Sergey Ulanov 2014/03/24 18:42:36 call it started()?
kelvinp 2014/03/24 23:11:39 Done.
94
92 // Returns rejection reason. Can be called only when in REJECTED state. 95 // Returns rejection reason. Can be called only when in REJECTED state.
93 virtual RejectionReason rejection_reason() const = 0; 96 virtual RejectionReason rejection_reason() const = 0;
94 97
95 // Called in response to incoming message received from the peer. 98 // Called in response to incoming message received from the peer.
96 // Should only be called when in WAITING_MESSAGE state. Caller retains 99 // Should only be called when in WAITING_MESSAGE state. Caller retains
97 // ownership of |message|. |resume_callback| will be called when processing is 100 // ownership of |message|. |resume_callback| will be called when processing is
98 // finished. The implementation must guarantee that |resume_callback| is not 101 // finished. The implementation must guarantee that |resume_callback| is not
99 // called after the Authenticator is destroyed. 102 // called after the Authenticator is destroyed.
100 virtual void ProcessMessage(const buzz::XmlElement* message, 103 virtual void ProcessMessage(const buzz::XmlElement* message,
101 const base::Closure& resume_callback) = 0; 104 const base::Closure& resume_callback) = 0;
(...skipping 25 matching lines...) Expand all
127 virtual scoped_ptr<Authenticator> CreateAuthenticator( 130 virtual scoped_ptr<Authenticator> CreateAuthenticator(
128 const std::string& local_jid, 131 const std::string& local_jid,
129 const std::string& remote_jid, 132 const std::string& remote_jid,
130 const buzz::XmlElement* first_message) = 0; 133 const buzz::XmlElement* first_message) = 0;
131 }; 134 };
132 135
133 } // namespace protocol 136 } // namespace protocol
134 } // namespace remoting 137 } // namespace remoting
135 138
136 #endif // REMOTING_PROTOCOL_AUTHENTICATOR_H_ 139 #endif // REMOTING_PROTOCOL_AUTHENTICATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698