Stop the daemon process from repeatedly starting up and shutting down the network process when the host has been unregistered.
We have two bugs in the chromoting host that caused the repeated startup and shutdown of the network process when the host has be unregistered:
1. The host process never exits naturally. As a result, the WorkerProcessLauncher in the daemon process never receives the exit code and thus isn't aware that a "permanent" error occured.
2. If a host has service account enabled, it gets kInvalidOauthCredentialsExitCode instead of kInvalidHostIdExitCode if the host has been unregistered in the service directory. But we only disable the service upon the latter.
Issue 1 is a regression from https://codereview.chromium.org/
891663005 which added a dangling reference to the UrlRequestContextGetterin HostProcessMain. This leaked object will also keep the Network task runner, and thus the UI task runner alive. So the message loop in HostProcessMain never quits.
I created crbug.com/475213 to track the original DCHECK.
BUG=472884
Review URL: https://codereview.chromium.org/
1061903002
Cr-Commit-Position: refs/heads/master@{#324377}