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

Issue 15077010: [Chromoting] Refactored worker process launching code and speeded up the desktop process launch. (Closed)

Created:
7 years, 7 months ago by alexeypa (please no reviews)
Modified:
7 years, 7 months ago
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] Refactored worker process launching code and speeded up the desktop process launch. This CL reduces time needed to start the desktop process in the user's session. The speed up is archieved by: - Not using elevation on Win7 and below. Elevation is still required on Win8 in order to be able to inject Alt+Tab. - If a launch attempt failed because of the job object not being ready, it is retried immediately after the job object is fully initialized. - The initial delay when retrying a failed launch attempt reduced to 100ms. Refactoring changes: - Converted WorkerProcessLauncher classes into a single-threaded, synchronous class. - Refactored and cleaned up the WorkerProcessLauncher::Delegate interface. The delegate can now launch the worker process asynchronously. Asynchronous events are reported by calling methods of WorkerProcessLauncher. - WtsSessionProcessDelegate now uses GetNamedPipeClientProcessId() function to obtain the client's PID. The job object is still used to contain worker processes if there are more than one. - WorkerProcessLauncher now limits time the worker process should start and connect back to 5 seconds. - Handling of permanent exits codes was moved to WorkerProcessLauncher. - WorkerProcessLauncher::Delegate now exposes the worker's handle instead of PID. BUG=238821 TEST=remoting_unittests.WorkerProcessLauncherTest.* Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=200942

Patch Set 1 #

Total comments: 34

Patch Set 2 : CR feedback. #

Patch Set 3 : - #

Total comments: 15

Patch Set 4 : CR feedback #2 #

Patch Set 5 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+834 lines, -806 lines) Patch
M remoting/host/daemon_process_win.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M remoting/host/desktop_session_win.cc View 1 2 3 4 3 chunks +23 lines, -7 lines 0 comments Download
M remoting/host/host_main.cc View 1 chunk +3 lines, -1 line 0 comments Download
M remoting/host/win/unprivileged_process_delegate.h View 4 chunks +18 lines, -14 lines 0 comments Download
M remoting/host/win/unprivileged_process_delegate.cc View 9 chunks +111 lines, -74 lines 0 comments Download
M remoting/host/win/worker_process_launcher.h View 1 2 3 4 chunks +101 lines, -38 lines 0 comments Download
M remoting/host/win/worker_process_launcher.cc View 1 6 chunks +114 lines, -270 lines 0 comments Download
M remoting/host/win/worker_process_launcher_unittest.cc View 22 chunks +137 lines, -107 lines 0 comments Download
M remoting/host/win/wts_console_session_process_driver.cc View 1 2 3 3 chunks +21 lines, -8 lines 0 comments Download
M remoting/host/win/wts_session_process_delegate.h View 2 chunks +8 lines, -13 lines 0 comments Download
M remoting/host/win/wts_session_process_delegate.cc View 1 2 3 9 chunks +296 lines, -270 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
alexeypa (please no reviews)
PTAL.
7 years, 7 months ago (2013-05-13 21:44:49 UTC) #1
alexeypa (please no reviews)
Cris, could you please take a look at named pipes connection code. Specifically at wts_session_process_delegate.cc, ...
7 years, 7 months ago (2013-05-13 22:47:05 UTC) #2
Wez
Some drive-by comments... https://codereview.chromium.org/15077010/diff/1/remoting/host/win/worker_process_launcher.cc File remoting/host/win/worker_process_launcher.cc (right): https://codereview.chromium.org/15077010/diff/1/remoting/host/win/worker_process_launcher.cc#newcode72 remoting/host/win/worker_process_launcher.cc:72: worker_delegate_ = NULL; nit: You could ...
7 years, 7 months ago (2013-05-14 03:45:22 UTC) #3
alexeypa (please no reviews)
https://chromiumcodereview.appspot.com/15077010/diff/1/remoting/host/win/worker_process_launcher.cc File remoting/host/win/worker_process_launcher.cc (right): https://chromiumcodereview.appspot.com/15077010/diff/1/remoting/host/win/worker_process_launcher.cc#newcode72 remoting/host/win/worker_process_launcher.cc:72: worker_delegate_ = NULL; On 2013/05/14 03:45:22, Wez wrote: > ...
7 years, 7 months ago (2013-05-14 18:31:10 UTC) #4
garykac
lgtm lgtm, although I can't comment on best practices for the Win API calls. (I'm ...
7 years, 7 months ago (2013-05-15 23:24:30 UTC) #5
alexeypa (please no reviews)
Cris, ping. Could you take a look? See https://chromiumcodereview.appspot.com/15077010/#msg2.
7 years, 7 months ago (2013-05-16 16:47:49 UTC) #6
alexeypa (please no reviews)
https://chromiumcodereview.appspot.com/15077010/diff/12001/remoting/host/desktop_session_win.cc File remoting/host/desktop_session_win.cc (right): https://chromiumcodereview.appspot.com/15077010/diff/12001/remoting/host/desktop_session_win.cc#newcode523 remoting/host/desktop_session_win.cc:523: // Get the name of the executable the desktop ...
7 years, 7 months ago (2013-05-16 17:49:57 UTC) #7
alexeypa (please no reviews)
jschuh@ could you please take a look at the pipe connection logic (see the quoted ...
7 years, 7 months ago (2013-05-17 16:49:36 UTC) #8
DO NOT USE (jschuh)
lgtm. We use GenerateVerifiedChannelID elsewhere, which includes a shared secret exchanged in the hello message. ...
7 years, 7 months ago (2013-05-17 17:39:27 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/alexeypa@chromium.org/15077010/34001
7 years, 7 months ago (2013-05-17 18:54:58 UTC) #10
commit-bot: I haz the power
7 years, 7 months ago (2013-05-18 01:35:48 UTC) #11
Message was sent while issue was closed.
Change committed as 200942

Powered by Google App Engine
This is Rietveld 408576698