summaryrefslogtreecommitdiffstats
path: root/remoting/protocol/connection_to_client_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* remoting: Update calls froms RunAllPending() to RunUntilIdle().tfarina@chromium.org2012-11-011-7/+7
| | | | | | | | | | | BUG=131220 TEST=remoting_unittests R=sergeyu@chromium.org,wez@chromium.org Review URL: https://chromiumcodereview.appspot.com/11364031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165528 0039d316-1c4b-4281-b951-d872f2087c98
* Fix ChannelMultiplexer to properly handle base channel creation failure.sergeyu@chromium.org2012-09-261-1/+0
| | | | | | | | | | | | | ChannelMultiplexer may be destroyed from channel connection callback when it fails to connect the base channel. Previously it didn't handle this case properly. BUG=152039 Review URL: https://chromiumcodereview.appspot.com/10981009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158740 0039d316-1c4b-4281-b951-d872f2087c98
* Moved the video encoders/decoders to the codec directory.kxing@chromium.org2012-08-231-2/+2
| | | | | | Review URL: https://chromiumcodereview.appspot.com/10877014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152912 0039d316-1c4b-4281-b951-d872f2087c98
* Use callback interface for state notifications in Session interface.sergeyu@chromium.org2012-07-121-8/+6
| | | | | | | | | | | | | | Previously remoting::protocol::Session interface was using base::Callback for state change and route change notifications. Using callback interface makes code simpler in many places. I'm also going to add new method to that interface to fix linked bug. BUG=131411 Review URL: https://chromiumcodereview.appspot.com/10702132 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146455 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor VideoStub interface to accept ownership of video packets.sergeyu@chromium.org2012-03-281-8/+4
| | | | | | | | | | | Previously VideoStub::ProcessVideoPacket() did not accept ownership of video packets. Instead the done callback was responsible for deleting the packet. Review URL: http://codereview.chromium.org/9827006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129355 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanups in the host authentication state handling.sergeyu@chromium.org2012-03-271-3/+4
| | | | | | | | | | | | | | | - Previously ChromotingHost couldn't destinguish client authentication event from success full client connection. Now ClientSession calls different callbacks for these two events. - All failed unauthenticated connections are now treated as connection failures. - Host now specifies rejection reason for each rejected session. BUG=113273 Review URL: https://chromiumcodereview.appspot.com/9836063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129079 0039d316-1c4b-4281-b951-d872f2087c98
* Add the plumbing that will carry a clipboard item from a chromoting client ↵simonmorris@chromium.org2012-03-161-0/+2
| | | | | | | | | | | to a host. BUG=117473 Review URL: http://codereview.chromium.org/9646013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127195 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup error handling in the client plugin.sergeyu@chromium.org2012-03-021-4/+3
| | | | | | | | | | | | | | | - Added new ErrorCode enum to pass error codes everywhere except between the webapp and the plugin. - Signaling timeout when connection now is interpreted as disconnect instead of error condition (see bug 112739). - Fixed webapp to properly handle unknown error codes. BUG=112739 Review URL: http://codereview.chromium.org/9567033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124606 0039d316-1c4b-4281-b951-d872f2087c98
* Remove task.h and finish base::Bind() migration.ajwong@chromium.org2012-01-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Over 341 CLs, in ~3 months, touching 3251 unique files! Top 5 most CLs: (121) jhawkins ( 45) dcheng ( 24) achuith ( 23) csilv ( 12) tfarina ( 12) groby ~1000 files touched: (918) jhawkins 100+ files touched: (486) ajwong (385) willchan (372) dcheng (126) csilv (123) fischman (112) sergeyu 49+ files touched: (65) tfarina (57) acolwell (52) adamk (49) tzik BUG=35223 TEST=existing Review URL: http://codereview.chromium.org/9114020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116748 0039d316-1c4b-4281-b951-d872f2087c98
* Add AUTHENTICATED session state.sergeyu@chromium.org2011-12-061-0/+2
| | | | | | | | | | | Also removed AUTHENTICATED state from ConnectionToHost - We no longer need it there. BUG=105214 Review URL: http://codereview.chromium.org/8774017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113146 0039d316-1c4b-4281-b951-d872f2087c98
* Remove AccessVerifier interface.sergeyu@chromium.org2011-11-291-1/+3
| | | | | | | | | | | | | | | | | AccessVerifier will be replaced with the new protocol::Authenticator interface. This also changes behavior of Session interface when session is rejected due to bad auth: now the session is first accepted by ChromotingHost but then goes to FAILED state with the new AUTHENTICATION_FAILED error. Temporarily auth token is verified in JingleSession::AcceptConnection(). Later Authenticator implementation will be used instead. BUG=105214 Review URL: http://codereview.chromium.org/8662001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112009 0039d316-1c4b-4281-b951-d872f2087c98
* Remove event_channel() and control_channel() from Session interface.sergeyu@chromium.org2011-11-221-2/+0
| | | | | | | | Now all channels are created using CreateStreamChannel() as they should be! Review URL: http://codereview.chromium.org/8587053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111045 0039d316-1c4b-4281-b951-d872f2087c98
* Make ConnectionToClient and ClientSession not ref-counted.sergeyu@chromium.org2011-11-111-5/+4
| | | | | | | | | | | | Also made then NonThreadSafe. BUG=96325 TEST=Chromoting works. Review URL: http://codereview.chromium.org/8495035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109574 0039d316-1c4b-4281-b951-d872f2087c98
* Access ChromotingHost::clients_ only on network thread.sergeyu@chromium.org2011-11-111-8/+5
| | | | | | | | | | | | | | | Previously ChromotingHost was doing some work on the main thread and some on the network thread. |clients_| and some other members were accessed without lock on both of these threads. Moved most of the ChromotingHost activity to the network thread to avoid possible race conditions. BUG=96325 TEST=Chromoting works Review URL: http://codereview.chromium.org/8495024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109556 0039d316-1c4b-4281-b951-d872f2087c98
* Move ConnectionToClient::EventHandler from ChromotingHost to ClientSessionsergeyu@chromium.org2011-11-101-2/+2
| | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/8476018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109457 0039d316-1c4b-4281-b951-d872f2087c98
* Switch remoting/protocol to new callbackssergeyu@chromium.org2011-10-071-6/+7
| | | | | | | | | | | There is still some code that uses old callbacks (particularly unittests) - I will convert them in a separate CL. BUG=None TEST=Unittests Review URL: http://codereview.chromium.org/8116021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104440 0039d316-1c4b-4281-b951-d872f2087c98
* Add MessageLoopProxy::currentnduca@chromium.org2011-08-151-1/+1
| | | | | | Review URL: http://codereview.chromium.org/7583053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96819 0039d316-1c4b-4281-b951-d872f2087c98
* Use MessageLoopProxy for network message loop.sergeyu@chromium.org2011-08-121-1/+3
| | | | | | | | | | | | | When we switch to P2P Pepper API we will need to run networking code on the main plugin thread. Switching to MessageLoopProxy for network thread, so that it's easier to switch network thread in the future. BUG=None TEST=None Review URL: http://codereview.chromium.org/7633009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96651 0039d316-1c4b-4281-b951-d872f2087c98
* Remove video_channel() from Session interfacesergeyu@chromium.org2011-08-111-1/+6
| | | | | | | | | | | BUG=None TEST=Unittests. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=96089 Review URL: http://codereview.chromium.org/7508044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96301 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 96089 - Remove video_channel() from Session interfacesergeyu@chromium.org2011-08-101-4/+1
| | | | | | | | | | | | BUG=None TEST=Unittests. Review URL: http://codereview.chromium.org/7508044 TBR=sergeyu@chromium.org Review URL: http://codereview.chromium.org/7604021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96106 0039d316-1c4b-4281-b951-d872f2087c98
* Remove video_channel() from Session interfacesergeyu@chromium.org2011-08-091-1/+4
| | | | | | | | | BUG=None TEST=Unittests. Review URL: http://codereview.chromium.org/7508044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96089 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Valgrind errors in remoting_unittests.sergeyu@chromium.org2011-07-071-2/+0
| | | | | | | | | | | | | - FakeSession was used after it is destroyed. - JingleThreadMessageLoop::Quit() was calling Thread::Stop() before all tasks are finished. - JingleSessionManager::AcceptConnection() would destroy JingleSession when called by that JingleSession. BUG=None TEST=Valgrind is happy. Review URL: http://codereview.chromium.org/7227017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91652 0039d316-1c4b-4281-b951-d872f2087c98
* Make Session and SessionManager not thread-safe and not ref-counted.sergeyu@chromium.org2011-07-061-8/+9
| | | | | | | | | BUG=None TEST=Unittests. Review URL: http://codereview.chromium.org/7278013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91571 0039d316-1c4b-4281-b951-d872f2087c98
* Close all writers before JingleSession is destroyed.sergeyu@chromium.org2011-06-301-0/+17
| | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/7218061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91225 0039d316-1c4b-4281-b951-d872f2087c98
* The authenticated_ fields are moved out of stubs and intosimonmorris@chromium.org2011-03-311-1/+2
| | | | | | | | | | | | ClientSession. Messages to the stubs are dispatched via ClientSession, and the stub classes are pure virtual. BUG=none TEST=none Review URL: http://codereview.chromium.org/6724033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79991 0039d316-1c4b-4281-b951-d872f2087c98
* ChromotingHost can have multiple connections, but only onesimonmorris@chromium.org2011-03-231-3/+3
| | | | | | | | | | | | | | | | | | | | authenticated connection. When a connection is authenticated, the host disconnects all other connections. The result is that if a client has disconnected without the host noticing, another client can connect immediately, without having to wait for the older connection to time out. The new ClientSession class encapsulates a ConnectionToClient and per-client state. It has taken the HostStub implementation away from DesktopEnvironment. BUG=70013 TEST=extra unit test; also see repro steps in BUG Review URL: http://codereview.chromium.org/6711033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79114 0039d316-1c4b-4281-b951-d872f2087c98
* Another big out-of-lining of test code. Hits a lot of gmock objectserg@google.com2011-02-081-1/+1
| | | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/6413036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74168 0039d316-1c4b-4281-b951-d872f2087c98
* More out-of-lining of test code, along with a bunch of GMOCK objects.erg@google.com2011-02-081-1/+1
| | | | | | | | | | | Most notably, rename various mock_objects.h files in remoting/ because after deinlining, there were compile failures. This fixes Windows compiling because you can't have two implementation files with the same name in a project, even if they are in different directories. (The output from one compile will clobber the others!) BUG=none TEST=compiles Review URL: http://codereview.chromium.org/6250198 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74059 0039d316-1c4b-4281-b951-d872f2087c98
* Use VideoStub interface on the host side.sergeyu@chromium.org2010-11-191-9/+4
| | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/5232004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66841 0039d316-1c4b-4281-b951-d872f2087c98
* Implement input stub in the host side for chromotinghclam@chromium.org2010-11-161-1/+4
| | | | | | | | | | | Implement InputStub for the host. BUG=None TEST=None Review URL: http://codereview.chromium.org/4726003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66314 0039d316-1c4b-4281-b951-d872f2087c98
* Add DEPS files in remoting subdirectories.sergeyu@chromium.org2010-11-051-1/+0
| | | | | | | | | | | | | This is to avoid unwanted dependencies between remoting modules. Also fixed libjingle includes to use full path, and removed some old includes. TEST=checkdeps BUG=None Review URL: http://codereview.chromium.org/4562002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65251 0039d316-1c4b-4281-b951-d872f2087c98
* Moving/Rename host/ClientConnection.{h,cc} -> protocol/ConnectionToClient.{h,cc}ajwong@chromium.org2010-11-041-0/+91
Also move the unittest. BUG=None TEST=compiles Review URL: http://codereview.chromium.org/4352002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65009 0039d316-1c4b-4281-b951-d872f2087c98