factory: Graceful start and better UI integration.

Currently factory starts "after" UI (Chrome) being started, and needs to kill it
for a new session with appropriate parameters (with Telemetry).  However, the
factory test environment is now always using Chrome and should start at the same
timing when UI (Chrome) is started -- no matter if we are using Telemetry mode
or not.

By this change, we can reduce transition time and make a seamless integration
(if not using Telemetry).

Note the chvt and messages were made long ago when we were still using unstable
X+GTK environment, and should be pretty safe to be dropped now.

TEST=Manual: Built a Link factory test image, boots in Telemetry and
             Non-Telemetry modes correctly. Passed reboot tests.

Change-Id: I4afcf97b625178ae4eaaa028673ee44bfde21618
Reviewed-on: https://chromium-review.googlesource.com/206796
Reviewed-by: Jon Salz <jsalz@chromium.org>
Commit-Queue: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
1 file changed