Currently child thread creates and initializes the channel before adding any message filters. Since filters are added from main thread via PostTask to IO thread, it results in a race condition between messages being received and filters getting added. It is possible to miss messages if the filter is not installed in time.
This change breaks up channel initialization into two parts, creation
without connection, which allows us to add all the start up filters before
messages start getting received and connection. It also adds an option for
the subclasses of child thread to install additional filters prior to the connection.
BUG=
Review URL: https://codereview.chromium.org/
847203004
Cr-Commit-Position: refs/heads/master@{#312141}