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

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

Issue 8743023: Separate Authenticator and Session unittests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - 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
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 }; 53 };
54 54
55 // TODO(sergeyu): Move error codes to a separate file. 55 // TODO(sergeyu): Move error codes to a separate file.
56 enum Error { 56 enum Error {
57 OK = 0, 57 OK = 0,
58 PEER_IS_OFFLINE, 58 PEER_IS_OFFLINE,
59 SESSION_REJECTED, 59 SESSION_REJECTED,
60 INCOMPATIBLE_PROTOCOL, 60 INCOMPATIBLE_PROTOCOL,
61 AUTHENTICATION_FAILED, 61 AUTHENTICATION_FAILED,
62 CHANNEL_CONNECTION_ERROR, 62 CHANNEL_CONNECTION_ERROR,
63 UNKNOWN_ERROR,
63 }; 64 };
64 65
65 // State change callbacks are called after session state has 66 // State change callbacks are called after session state has
66 // changed. It is not safe to destroy the session from within the 67 // changed. It is not safe to destroy the session from within the
67 // handler unless |state| is CLOSED or FAILED. 68 // handler unless |state| is CLOSED or FAILED.
68 typedef base::Callback<void(State state)> StateChangeCallback; 69 typedef base::Callback<void(State state)> StateChangeCallback;
69 70
70 // TODO(sergeyu): Specify connection error code when channel 71 // TODO(sergeyu): Specify connection error code when channel
71 // connection fails. 72 // connection fails.
72 typedef base::Callback<void(net::StreamSocket*)> StreamChannelCallback; 73 typedef base::Callback<void(net::StreamSocket*)> StreamChannelCallback;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 virtual void Close() = 0; 124 virtual void Close() = 0;
124 125
125 private: 126 private:
126 DISALLOW_COPY_AND_ASSIGN(Session); 127 DISALLOW_COPY_AND_ASSIGN(Session);
127 }; 128 };
128 129
129 } // namespace protocol 130 } // namespace protocol
130 } // namespace remoting 131 } // namespace remoting
131 132
132 #endif // REMOTING_PROTOCOL_SESSION_H_ 133 #endif // REMOTING_PROTOCOL_SESSION_H_
OLDNEW
« no previous file with comments | « remoting/protocol/message_reader_unittest.cc ('k') | remoting/protocol/v1_authenticator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698