• pauljensen's avatar
    [Cronet] Move initialization to a new thread rather than the UI thread. · 6815aefe
    pauljensen authored
    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}
    6815aefe
proxy_config_service_android_unittest.cc 12.8 KB