[Cronet] Move initialization to a new thread rather than the UI thread.
The UI thread is generally overbooked (esp at app startup time) so avoiding it can greatly improve Cronet startup time. The UI thread was used for initialization previously because it simplified the NetworkChangeNotifierAutoDetect and ProxyChangeListener logic because BroadcastReceiver onReceived callbacks always happen on the UI thread so those classes could be completely single-threaded. This change leaves those classes single-threaded except for their onRecieved() methods which now immediately post to the new initialization thread and check whether their BroadcastReceivers are currently registered. BUG=709336 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester Review-Url: https://codereview.chromium.org/2812963002 Cr-Commit-Position: refs/heads/master@{#469578}
Showing
Please register or sign in to comment