Ensure clean up functions of MessageFilter are paired with their initialization functions

This is an attempt to address http://crrev.com/2469123003/#msg28.
MessageFilter::OnFilterRemoved and OnChannelClosing are now called even
when the channel is closed before it completes its initialization.
In that case, these functions are not paired to OnFilterAdded and
OnChannelOpened.

This CL makes OnFilterAdded and OnChannelConnected right before pending
filters are removed, so that they are paired with their clean up functions.

BUG=

Review-Url: https://codereview.chromium.org/2488753002
Cr-Commit-Position: refs/heads/master@{#431199}


CrOS-Libchrome-Original-Commit: 8941d772a304208a5ad4fb47dfa3c669fb3b5d11
1 file changed
tree: 4758d06bff95307a1d92d3302acc6114b8c367f0
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/