Fix ClientVideoDispatcher not to crash during shutdown.
commitf74533f8f91755a796c17fb1a88fb887726444fe
authorsergeyu <sergeyu@chromium.org>
Wed, 27 May 2015 00:23:34 +0000 (26 17:23 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 27 May 2015 00:25:11 +0000 (27 00:25 +0000)
tree2e1d4e3c3e72fb4d36cd63df7874f11d50adaeea
parent55a41a677015add974720eb87544d35cd9fd942a
Fix ClientVideoDispatcher not to crash during shutdown.

ClientVideoDispatcher was passing base::Unretained() callbacks to
VideoStub which it doesn't own, as result the callback may be called
after the dispatcher is destroyed causing crashes during shutdown.
Fixed ClientVideoDispatcher to use weak pointers for the done callbacks
passed to VideoStub.

BUG=491366

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

Cr-Commit-Position: refs/heads/master@{#331489}
remoting/protocol/client_video_dispatcher.cc
remoting/protocol/client_video_dispatcher.h