Add blocking IO restriction on the network thread.
Now ChromotingHostContext disallows blocking operations on then
network thread. This will help to avoid issues such as the one
that was fixed in https://codereview.chromium.org/
886913002/
(Network thread was used to load policies from disk).
Also made the following changes to avoid blocking operation on
the network thread:
- Moved PolicyWatcher to the main thread in the Me2Me host.
PolicyLoader uses blocking IO for initialization. Also this is
more consistent with the It2Me host where PolicyWatcher also
runs on the UI thread.
- Moved NetworkChangeNotifier initialization out of
HostSignalingManager. NetworkChangeNotifier creates a thread
internally and therefore should be destroyed on the main thread.
- Added a reference to URLRequestContextGetter in HostProcessMain
to make sure it's destroyed on the main thread. This is necessary
because BasicURLRequestContext owns threads and needs to be
deleted on the main thread.
Review URL: https://codereview.chromium.org/
891663005
Cr-Commit-Position: refs/heads/master@{#314165}