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

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

Issue 8619011: Use Authenticator interface in Session and SessionManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unittests Created 9 years 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
« no previous file with comments | « remoting/protocol/pepper_session_manager.cc ('k') | remoting/protocol/session_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_SESSION_H_ 5 #ifndef REMOTING_PROTOCOL_SESSION_H_
6 #define REMOTING_PROTOCOL_SESSION_H_ 6 #define REMOTING_PROTOCOL_SESSION_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 // Protocol configuration. Can be called only after session has been accepted. 104 // Protocol configuration. Can be called only after session has been accepted.
105 // Returned pointer is valid until connection is closed. 105 // Returned pointer is valid until connection is closed.
106 virtual const SessionConfig& config() = 0; 106 virtual const SessionConfig& config() = 0;
107 107
108 // Set protocol configuration for an incoming session. Must be 108 // Set protocol configuration for an incoming session. Must be
109 // called on the host before the connection is accepted, from 109 // called on the host before the connection is accepted, from
110 // ChromotocolServer::IncomingConnectionCallback. 110 // ChromotocolServer::IncomingConnectionCallback.
111 virtual void set_config(const SessionConfig& config) = 0; 111 virtual void set_config(const SessionConfig& config) = 0;
112 112
113 // The raw auth tokens from the session-initiate, or session-accept stanzas.
114 virtual const std::string& initiator_token() = 0;
115 virtual void set_initiator_token(const std::string& initiator_token) = 0;
116 virtual const std::string& receiver_token() = 0;
117 virtual void set_receiver_token(const std::string& receiver_token) = 0;
118
119 // A shared secret to use to mutually-authenticate the SSL channels.
120 virtual void set_shared_secret(const std::string& secret) = 0;
121 virtual const std::string& shared_secret() = 0;
122
123 // Closes connection. Callbacks are guaranteed not to be called 113 // Closes connection. Callbacks are guaranteed not to be called
124 // after this method returns. Must be called before the object is 114 // after this method returns. Must be called before the object is
125 // destroyed, unless the state is set to FAILED or CLOSED. 115 // destroyed, unless the state is set to FAILED or CLOSED.
126 virtual void Close() = 0; 116 virtual void Close() = 0;
127 117
128 private: 118 private:
129 DISALLOW_COPY_AND_ASSIGN(Session); 119 DISALLOW_COPY_AND_ASSIGN(Session);
130 }; 120 };
131 121
132 } // namespace protocol 122 } // namespace protocol
133 } // namespace remoting 123 } // namespace remoting
134 124
135 #endif // REMOTING_PROTOCOL_SESSION_H_ 125 #endif // REMOTING_PROTOCOL_SESSION_H_
OLDNEW
« no previous file with comments | « remoting/protocol/pepper_session_manager.cc ('k') | remoting/protocol/session_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698