Commit 1a435b6d authored by sergeyu's avatar sergeyu Committed by Commit bot

Move NetworkChangeNotifier initialization after MessageLoop creation.

NetworkChangeNotifier was moved to HostProcessMain in crrev.com/314165.
On windows it must be initialized after MessageLoop for the calling
thread is created, so the host was failing to start.

Review URL: https://codereview.chromium.org/902303002

Cr-Commit-Position: refs/heads/master@{#315159}
parent f6a96084
......@@ -1515,9 +1515,6 @@ int HostProcessMain() {
// Ensures runtime specific CPU features are initialized.
media::InitializeCPUSpecificMediaFeatures();
scoped_ptr<net::NetworkChangeNotifier> network_change_notifier(
net::NetworkChangeNotifier::Create());
// Create the main message loop and start helper threads.
base::MessageLoopForUI message_loop;
scoped_ptr<ChromotingHostContext> context =
......@@ -1526,6 +1523,10 @@ int HostProcessMain() {
if (!context)
return kInitializationFailed;
// NetworkChangeNotifier must be initialized after MessageLoop.
scoped_ptr<net::NetworkChangeNotifier> network_change_notifier(
net::NetworkChangeNotifier::Create());
// BasicURLRequestContext holds references to threads, so it needs to be
// dereferences on UI threads. Store the reference to the URLRequestGetter to
// make sure it's not destroyed on other threads.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment