Changes lifetime of ApplicationConnection instances.
Before this change, ApplicationConnections were owned by the ApplicationImpl, one created for every call to ConnectToApplication/AcceptConnection. While this makes sense for incoming connections (it doesn't make sense to transfer ownership of the connection to the delegate), it doesn't for outgoing connections.

So we change ConnectToApplication to return a scoped_ptr<ApplicationConnection> which the caller must manage.

R=sky@chromium.org
http://crbug.com/519583

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

Cr-Commit-Position: refs/heads/master@{#342947}


CrOS-Libchrome-Original-Commit: efecf8ac86019d7f191159279f46c1a90d071be9
15 files changed
tree: 2c5185ea454aa7e5ec02d4e0675015c3d238eb91
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/