This CL implements the CorpHostStatusLogger and hooks it up with the
JingleSessionManager, so that it reports the disconnect event to the
corp logging service with both the error code and the SessionAuthz
reauth token attached.
The tricky part of this CL is to pass the reauth token from the
SessionAuthzReauthorizer to the CorpHostStatusLogger. There is
`HostStatusObserver`, but it implements a mojo interface, meaning it
will be rather difficult to pass pointers around (without being rejected
by the mojo reviewer). Just passing the reauth token around in callbacks
would also work, but that would be very messy.
To get that working, this CL introduces a `SessionObserver`, which
allows implementations to observer state changes on multiple sessions
and know which session has changed. `authentication_type()` and
`implementing_authenticator()` are added to `Authenticator` to allow
`CorpHostStatusLogger` to extract the reauth token from the generalized
`Authenticator` reference.
Bug: b/328138087
Change-Id: Ic7b9ea297d28488ef65d4071860836b47e9c3b5d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5359454
Auto-Submit: Yuwei Huang <yuweih@chromium.org>
Reviewed-by: Joe Downing <joedow@chromium.org>
Commit-Queue: Yuwei Huang <yuweih@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1271835}
Since working in this directory I've noticed that the presubmits will
'fail' if you modify a file with a nested namespace with the suggestion
that you should use the new style (namespace1::namespace2). I'd like to
be able to make quick modifications when needed without also dealing
with namespace formatting so I decided to fix this in a separate CL.
Along the same lines, I noticed that we aren't using the suggested
ThreadChecker macros consistently so I fixed that as well.
This CL also contains a small number of comment reflows and simple
modernization changes. I didn't do this exhaustively but there are a
handful which I noticed while fixing the other problems
No functional changes are expected as a result of these changes.
Change-Id: Ib99429b79fc9a3c55596602e279be8487866660c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3852429
Commit-Queue: Joe Downing <joedow@chromium.org>
Reviewed-by: Lambros Lambrou <lambroslambrou@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1039396}
CHECK, CHECK_EQ etc., and NOTREACHED/NOTIMPLEMENTED have moved
to the much smaller headers check.h, check_op.h, and notreached.h,
respectively.
This CL updates .cc files to use those headers instead when
possible, with the purpose of saving compile time.
(Split out from https://crrev.com/c/2164525 which also has
notes on how the change was generated.)
Bug: 1031540
Change-Id: Ifa4aa7eb8f4e1e39b56633f1c484c90e74d02a30
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2164894
Commit-Queue: Lambros Lambrou <lambroslambrou@chromium.org>
Auto-Submit: Hans Wennborg <hans@chromium.org>
Reviewed-by: Lambros Lambrou <lambroslambrou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#762936}
Part 4/4 to replace these namespace qualifications.
TBR=dcheng@chromium.org
Bug: 763556
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I31d6c69d73111165fb1bd8294cd0fe4e18ce96bd
Reviewed-on: https://chromium-review.googlesource.com/662561
Commit-Queue: Brett Wilson <brettw@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Brett Wilson <brettw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501199}
Previously SignalStrategy::GetLocalJid() was returning non-normalized
JID. The value was passed as is to the authenticator in
JingleSessionManager::OnSignalStrategyIncomingStanza(). Client used
normalized JID value from SignalingAddress for authentication. As
result authentication was failing for hosts that use mixed-case
accounts. With this change GetLocalJid() is replaced with
GetLocalAddress(), which allows to ensure that JID is normalized on
both ends of connection.
BUG=707833
Review-Url: https://codereview.chromium.org/2798393007
Cr-Commit-Position: refs/heads/master@{#463737}
This change adds SessionPlugin interface, and an Session::AddPlugin() function
to attach SessionPlugin instances into Session and its derived classes.
In JingleSession, the plugins will be executed after receiving a message or
before sending a message.
So a SessionPlugin implementation can read fields from and write to a message.
Refer to change https://codereview.chromium.org/2586133002/, it shows how
HostExperimentSessionPlugin works as a SessionPlugin.
This is part of host experiment framework.
BUG=650926
Review-Url: https://codereview.chromium.org/2586403003
Cr-Commit-Position: refs/heads/master@{#441003}
This change introduces a new authenticator class which handles two scenarios:
- Connection policy validation (i.e. do the details of the connection match the
current policies set on the machine)
- Interactive connection validation (i.e. prompt the user to allow the
connection to be established)
The first scenario is typically synchronous but the second is async, therefore
this validation mechanism must handle both. The new authenticator class wraps
another, functional authenticator to provide a level of validation before
allowing the wrapped authenticator to take over.
BUG=617185
Review-Url: https://codereview.chromium.org/2277553002
Cr-Commit-Position: refs/heads/master@{#415715}
Changes made by tools/git/move_source_file.py
BUG=610438
TBR=garykac
Review-Url: https://codereview.chromium.org/1969053002
Cr-Commit-Position: refs/heads/master@{#392982}
This is a follow up for crrev.com/366687 that converted
remoting/protocol to std::move()
Review URL: https://codereview.chromium.org/1547603004
Cr-Commit-Position: refs/heads/master@{#366780}
Added new VideoStream interface. VideoFramePump implements it. Later
there will be a separate implementation for WebRTC-based protocol.
ConnectionToClient is responsible for VideoStream creation.
BUG=547158
Review URL: https://codereview.chromium.org/1472873005
Cr-Commit-Position: refs/heads/master@{#362096}
MockConnectionToClient is hard to use and adds a lot of boilerplate in
tests. Replacing it with FakeConnectionToClient will make it easier
to make changes in the ConnectionToClient interface.
BUG=547158
Review URL: https://codereview.chromium.org/1463293002
Cr-Commit-Position: refs/heads/master@{#361442}
Moved existing code to IceConnectionToClient. In future a new
WebrtcConnectionToClient will handle webrtc-based connection.
BUG=547158
Review URL: https://codereview.chromium.org/1460593005
Cr-Commit-Position: refs/heads/master@{#360673}
Added frame_id field in the VideoPacket message. Client now acknowledges
every frame that has frame_id set by sending VideoAck messages after
the corresponding frame is decoded and rendered.
On the host the VideoAck messages are processed by the new
VideoFeedbackStub, which is implemented in CaptureScheduler.
CaptureScheduler limits number of unacknowledged frames to 4. This
number was chosen experimentally to minimize latency (using
remoting_perftests).
BUG=448838
Review URL: https://codereview.chromium.org/850983002
Cr-Commit-Position: refs/heads/master@{#317824}
Previously ConnectionToClient required stubs to be created before the
client is authenticated. This is no longer necessary. Fixed it so
set_*_stub() methods can be called only after authentication. Also
removed auth input filters from ClientSession as they are no longer
useful.
BUG=448838
Review URL: https://codereview.chromium.org/902613004
Cr-Commit-Position: refs/heads/master@{#316299}
This CL breaks cursor & mouse-lock handling out of PepperInputHandler:
- PepperCursorSetter is added to set the native PPAPI cursor.
Callers may provide an alternate stub to delegate to if the PPAPI cursor
cannot be set; ChromotingInstance uses this for oversized cursor rendering.
- EmptyCursorFilter is added to normalize transparent cursors to (0x0).
- PepperMouseLocker is added, to handle mouse-lock mode.
This hooks into the cursor pipeline in order to detect (non)empty cursor
shapes and engage mouse-lock accordingly, and to control whether any cursor
is rendered locally.
- ChromotingInstance is updated to handle rceived cursors via these helpers,
so that it need only directly handle delegated oversized cursors itself.
BUG=138108, 429322
Review URL: https://codereview.chromium.org/695583005
Cr-Commit-Position: refs/heads/master@{#305463}
The delegate implementation for Linux now keeps a separate JSON file per each pairing under "paired-clients" in the config directory.
This CL also makes the delegate completely synchronous moving jumping between task runners to the parent PairingRegistry.
BUG=156182
Review URL: https://chromiumcodereview.appspot.com/21128006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215187 0039d316-1c4b-4281-b951-d872f2087c98
To implement this, PairingRegistry maintains a queue of pending requests. Each
public method wraps the original callback inside an interstitial callback that
runs the next pending request in addition to invoking the original callback.
BUG=156182
Review URL: https://chromiumcodereview.appspot.com/19714002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212553 0039d316-1c4b-4281-b951-d872f2087c98
Implementing the Linux pairing registry delegate required some changes to the cross-platform code. I've isolated them in this CL for clarity:
* Added a timestamp to the Pairing struct and made it a class with a Create method to generate the random information and timestamp.
* Added a callback to AddPairing. For now, this is only used in the unit test.
I also fixed a couple of unrelated linter errors in protocol_mock_objects.
BUG=156182
Review URL: https://chromiumcodereview.appspot.com/17063003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206947 0039d316-1c4b-4281-b951-d872f2087c98
In the original design, I intended the pairing registry delegate to maintain
an in-memory cache of client id -> secret, and for this to be invalidated by
a watcher when the on-disk version changes (for example, if the web-app is
used to revoke a pairing). I think an asynchronous model makes more sense,
and eliminates the need for the watcher.
In addition, this CL fixes a bug in the negotiating authenticator when dealing
with authenticators that process messages asychronously.
BUG=156182
Review URL: https://chromiumcodereview.appspot.com/16893002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206347 0039d316-1c4b-4281-b951-d872f2087c98
This keeps the forwarding header, just updates all current callers.
BUG=
R=avi@chromium.org
Review URL: https://codereview.chromium.org/16514006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205306 0039d316-1c4b-4281-b951-d872f2087c98
This CL changes the way screen/audio recorders and event executors are managed. New DesktopEnvironmentFactory class is now used by ChromotingHost's owner to specify the kind of desktop environment (or virtual terminal) to be used by the host. Screen/audio recorders and event executors now owned by the ClientSession instance, so there is a separate set of recorders and stubs exists for each authenticated client session. Clients sessions can now be torn dowsn in parallel with the host shuttting down.
This is the 4th attempt to land this change. This version includes:
- |ClientSession| objects are torn down asynchronously now.
- |ClientSession| objects are ref-counted to facilitate the asynchronous shutdown. They still have to be used and destroyed on the network thread.
- |ChromotingHost| now waits until all connections are torn down before deleting the session manager.
- The unit tests were fixed to run message loops until all asynchronous object have been destroyed.
- |ClientSessionTest.ClampMouseEvents| makes sure that the expectations are destroyed when leaving TEST_F scope so that ASAN is not getting confused.
BUG=134694
TEST=remoting_unittests
Review URL: https://chromiumcodereview.appspot.com/10916263
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156398 0039d316-1c4b-4281-b951-d872f2087c98
This CL changes the way screen/audio recorders and event executors are managed. New DesktopEnvironmentFactory class is now used by ChromotingHost's owner to specify the kind of desktop environment (or virtual terminal) to be used by the host. Screen/audio recorders and event executors now owned by the ClientSession instance, so there is a separate set of recorders and stubs exists for each authenticated client session. Clients sessions can now be torn dowsn in parallel with the host shuttting down.
This is the 3rd attempt to land this change. This version includes:
- |ClientSession| objects are torn down asynchronously now.
- |ClientSession| objects are ref-counted to facilitate the asynchronous shutdown. They still have to be used and destroyed on the network thread.
- |ChromotingHost| now waits until all connections are torn down before deleting the session manager.
- The unit tests were fixed to run message loops until all asynchronous object have been destroyed.
BUG=134694
TEST=remoting_unittests
Review URL: https://chromiumcodereview.appspot.com/10915206TBR=alexeypa@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10911248
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156298 0039d316-1c4b-4281-b951-d872f2087c98
This CL changes the way screen/audio recorders and event executors are managed. New DesktopEnvironmentFactory class is now used by ChromotingHost's owner to specify the kind of desktop environment (or virtual terminal) to be used by the host. Screen/audio recorders and event executors now owned by the ClientSession instance, so there is a separate set of recorders and stubs exists for each authenticated client session. Clients sessions can now be torn dowsn in parallel with the host shuttting down.
This is the 3rd attempt to land this change. This version includes:
- |ClientSession| objects are torn down asynchronously now.
- |ClientSession| objects are ref-counted to facilitate the asynchronous shutdown. They still have to be used and destroyed on the network thread.
- |ChromotingHost| now waits until all connections are torn down before deleting the session manager.
- The unit tests were fixed to run message loops until all asynchronous object have been destroyed.
BUG=134694
TEST=remoting_unittests
Review URL: https://chromiumcodereview.appspot.com/10915206
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156297 0039d316-1c4b-4281-b951-d872f2087c98
This CL changes the way screen/audio recorders and event executors are managed. New DesktopEnvironmentFactory class is now used by ChromotingHost's owner to specify the kind of desktop environment (or virtual terminal) to be used by the host. Screen/audio recorders and event executors now owned by the ClientSession instance, so there is a separate set of recorders and stubs exists for each authenticated client session. Clients sessions can now be torn dowsn in parallel with the host shuttting down.
This is the 2nd attempt to land this change. This version includes:
- |ClientSession| objects are torn down asynchronously now.
- |ChromotingHost| now waits until all connections are torn down before deleting the session manager.
BUG=134694
TEST=remoting_unittests
Review URL: https://chromiumcodereview.appspot.com/10911152TBR=alexeypa@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10909143
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155616 0039d316-1c4b-4281-b951-d872f2087c98
This CL changes the way screen/audio recorders and event executors are managed. New DesktopEnvironmentFactory class is now used by ChromotingHost's owner to specify the kind of desktop environment (or virtual terminal) to be used by the host. Screen/audio recorders and event executors now owned by the ClientSession instance, so there is a separate set of recorders and stubs exists for each authenticated client session. Clients sessions can now be torn dowsn in parallel with the host shuttting down.
This is the 2nd attempt to land this change. This version includes:
- |ClientSession| objects are torn down asynchronously now.
- |ChromotingHost| now waits until all connections are torn down before deleting the session manager.
BUG=134694
TEST=remoting_unittests
Review URL: https://chromiumcodereview.appspot.com/10911152
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155574 0039d316-1c4b-4281-b951-d872f2087c98
This CL changes the way screen/audio recorders and event executors are managed. New DesktopEnvironmentFactory class is now used by ChromotingHost's owner to specify the kind of desktop environment (or virtual terminal) to be used by the host. Screen/audio recorders and event executors now owned by the ClientSession instance, so there is a separate set of recorders and stubs exists for each authenticated client session. Clients sessions can now be torn dowsn in parallel with the host shuttting down.
BUG=134694
TEST=remoting_unittests
Review URL: https://chromiumcodereview.appspot.com/10920019TBR=alexeypa@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10916161
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155276 0039d316-1c4b-4281-b951-d872f2087c98
This CL changes the way screen/audio recorders and event executors are managed. New DesktopEnvironmentFactory class is now used by ChromotingHost's owner to specify the kind of desktop environment (or virtual terminal) to be used by the host. Screen/audio recorders and event executors now owned by the ClientSession instance, so there is a separate set of recorders and stubs exists for each authenticated client session. Clients sessions can now be torn dowsn in parallel with the host shuttting down.
BUG=134694
TEST=remoting_unittests
Review URL: https://chromiumcodereview.appspot.com/10920019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155219 0039d316-1c4b-4281-b951-d872f2087c98
This will help improve ChromotingHost's unit tests.
BUG=86546
Review URL: https://chromiumcodereview.appspot.com/10538091
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142473 0039d316-1c4b-4281-b951-d872f2087c98
Also updated HostStatusObserver to receive transport route information as
part of the OnClientRouteChange() notification, so that logging code
receives connection type in order to log it.
BUG=96736
Review URL: https://chromiumcodereview.appspot.com/9727005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127814 0039d316-1c4b-4281-b951-d872f2087c98
Followup CL to http://codereview.chromium.org/9271026/ - this passes the
RouteChange() notification from ConnectionToClient through the various layers
to the ChromotingHost.
BUG=109682
TEST=Compiles, unit-tests pass.
Review URL: https://chromiumcodereview.appspot.com/9288010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119137 0039d316-1c4b-4281-b951-d872f2087c98
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
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
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
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
Input events:
* Client will not send them
* Host will not process them
Control events:
* Client will only process BeginSessionResponse
* Host will only process BeginSessionRequest
All other control messages will be ignored.
BUG=72466
TEST=manual+tests
Review URL: http://codereview.chromium.org/6594138
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76974 0039d316-1c4b-4281-b951-d872f2087c98
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