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

Issue 10915206: [Chromoting] Refactoring DesktopEnvironment and moving screen/audio recorders to ClientSession. (Closed)

Created:
8 years, 3 months ago by alexeypa (please no reviews)
Modified:
8 years, 3 months ago
Reviewers:
Sergey Ulanov
CC:
chromium-reviews, jamiewalch+watch_chromium.org, dcaiafa+watch_chromium.org, simonmorris+watch_chromium.org, hclam+watch_chromium.org, wez+watch_chromium.org, amit, sanjeevr, garykac+watch_chromium.org, lambroslambrou+watch_chromium.org, rmsousa+watch_chromium.org, alexeypa+watch_chromium.org, sergeyu+watch_chromium.org
Visibility:
Public.

Description

[Chromoting] Refactoring DesktopEnvironment and moving screen/audio recorders to ClientSession. 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 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=156297

Patch Set 1 #

Patch Set 2 : The fix & feedback from https://chromiumcodereview.appspot.com/10911152/ #

Patch Set 3 : rebased to enable try jobs. #

Total comments: 13

Patch Set 4 : CR feedback #

Patch Set 5 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+771 lines, -718 lines) Patch
M remoting/host/chromoting_host.h View 1 7 chunks +15 lines, -35 lines 0 comments Download
M remoting/host/chromoting_host.cc View 1 2 3 9 chunks +37 lines, -141 lines 0 comments Download
M remoting/host/chromoting_host_unittest.cc View 1 8 chunks +71 lines, -39 lines 0 comments Download
M remoting/host/client_session.h View 1 7 chunks +70 lines, -17 lines 0 comments Download
M remoting/host/client_session.cc View 1 2 3 4 8 chunks +137 lines, -11 lines 0 comments Download
M remoting/host/client_session_unittest.cc View 1 10 chunks +98 lines, -28 lines 0 comments Download
M remoting/host/desktop_environment.h View 2 chunks +11 lines, -32 lines 0 comments Download
M remoting/host/desktop_environment.cc View 1 chunk +10 lines, -78 lines 0 comments Download
A remoting/host/desktop_environment_factory.h View 1 chunk +34 lines, -0 lines 0 comments Download
A remoting/host/desktop_environment_factory.cc View 1 2 1 chunk +38 lines, -0 lines 0 comments Download
M remoting/host/event_executor.h View 1 chunk +3 lines, -3 lines 0 comments Download
A remoting/host/event_executor_fake.h View 1 chunk +36 lines, -0 lines 0 comments Download
A remoting/host/event_executor_fake.cc View 1 chunk +33 lines, -0 lines 0 comments Download
M remoting/host/event_executor_linux.cc View 2 chunks +5 lines, -5 lines 0 comments Download
M remoting/host/event_executor_mac.cc View 3 chunks +7 lines, -6 lines 0 comments Download
M remoting/host/event_executor_win.cc View 3 chunks +7 lines, -6 lines 0 comments Download
M remoting/host/host_mock_objects.h View 1 chunk +4 lines, -3 lines 0 comments Download
M remoting/host/host_mock_objects.cc View 1 chunk +7 lines, -2 lines 0 comments Download
M remoting/host/plugin/host_script_object.h View 3 chunks +6 lines, -8 lines 0 comments Download
M remoting/host/plugin/host_script_object.cc View 7 chunks +8 lines, -36 lines 0 comments Download
M remoting/host/remoting_me2me_host.cc View 7 chunks +10 lines, -9 lines 0 comments Download
M remoting/host/screen_recorder_unittest.cc View 2 chunks +1 line, -3 lines 0 comments Download
D remoting/host/session_event_executor_win.h View 1 chunk +0 lines, -69 lines 0 comments Download
D remoting/host/session_event_executor_win.cc View 1 chunk +0 lines, -155 lines 0 comments Download
M remoting/host/simple_host_process.cc View 4 chunks +36 lines, -13 lines 0 comments Download
A remoting/host/win/session_desktop_environment_factory.h View 1 chunk +26 lines, -0 lines 0 comments Download
A remoting/host/win/session_desktop_environment_factory.cc View 1 chunk +38 lines, -0 lines 0 comments Download
A + remoting/host/win/session_event_executor.h View 3 chunks +5 lines, -5 lines 0 comments Download
A + remoting/host/win/session_event_executor.cc View 2 chunks +8 lines, -7 lines 0 comments Download
M remoting/protocol/protocol_mock_objects.h View 1 chunk +1 line, -2 lines 0 comments Download
M remoting/protocol/protocol_mock_objects.cc View 1 chunk +1 line, -3 lines 0 comments Download
M remoting/remoting.gyp View 1 2 4 chunks +8 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
alexeypa (please no reviews)
Another attempt to land the DesktopEnvironment refactoring CL. This version fixes the unit tests to ...
8 years, 3 months ago (2012-09-11 20:13:12 UTC) #1
Sergey Ulanov
https://chromiumcodereview.appspot.com/10915206/diff/4002/remoting/host/chromoting_host.cc File remoting/host/chromoting_host.cc (right): https://chromiumcodereview.appspot.com/10915206/diff/4002/remoting/host/chromoting_host.cc#newcode19 remoting/host/chromoting_host.cc:19: #include "remoting/host/audio_capturer.h" Please remove this icnlude. https://chromiumcodereview.appspot.com/10915206/diff/4002/remoting/host/chromoting_host.cc#newcode240 remoting/host/chromoting_host.cc:240: if ...
8 years, 3 months ago (2012-09-11 22:30:16 UTC) #2
Sergey Ulanov
BTW to workaround the problem with trybots failing to apply the patch you can specify ...
8 years, 3 months ago (2012-09-11 22:32:56 UTC) #3
alexeypa (please no reviews)
PTAL. https://chromiumcodereview.appspot.com/10915206/diff/4002/remoting/host/chromoting_host.cc File remoting/host/chromoting_host.cc (right): https://chromiumcodereview.appspot.com/10915206/diff/4002/remoting/host/chromoting_host.cc#newcode19 remoting/host/chromoting_host.cc:19: #include "remoting/host/audio_capturer.h" On 2012/09/11 22:30:16, sergeyu wrote: > ...
8 years, 3 months ago (2012-09-11 22:56:51 UTC) #4
Sergey Ulanov
8 years, 3 months ago (2012-09-11 23:02:41 UTC) #5
lgtm

https://chromiumcodereview.appspot.com/10915206/diff/4002/remoting/host/clien...
File remoting/host/client_session.cc (right):

https://chromiumcodereview.appspot.com/10915206/diff/4002/remoting/host/clien...
remoting/host/client_session.cc:235: DCHECK(!active_recorders_);
On 2012/09/11 22:56:51, alexeypa wrote:
> On 2012/09/11 22:30:16, sergeyu wrote:
> > DCHECK for thread please.
> 
> Done. These is a DCHECK in base::NonThreadSafe also.

Ah, right, sorry. Then we don't need to duplicate it here.

Powered by Google App Engine
This is Rietveld 408576698