Use base::ResetAndReturn() in remoting.
commitd9bdcb6c95619e6cb3a4281156573c58f7626a26
authorsergeyu <sergeyu@chromium.org>
Sat, 25 Apr 2015 00:18:08 +0000 (24 17:18 -0700)
committerCommit bot <commit-bot@chromium.org>
Sat, 25 Apr 2015 00:18:25 +0000 (25 00:18 +0000)
tree84cf1bd7964177589cc1f1e024655dbb0ef50042
parentf79a51f871181b0da7653cfa17d351745bd12994
Use base::ResetAndReturn() in remoting.

base::ResetAndReturn() makes code shorter and simpler. Also in several
places callbacks were Reset() after Run(), which is dangerous for
callback that are allowed to delete the caller. base::ResetAndReturn()
helps to avoid this issue.

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

Cr-Commit-Position: refs/heads/master@{#326940}
18 files changed:
remoting/client/plugin/chromoting_instance.cc
remoting/client/token_fetcher_proxy.cc
remoting/host/daemon_process.cc
remoting/host/dns_blackhole_checker.cc
remoting/host/heartbeat_sender.cc
remoting/host/it2me/it2me_host.cc
remoting/host/register_support_host_request.cc
remoting/host/setup/daemon_controller_delegate_mac.mm
remoting/host/setup/host_starter.cc
remoting/host/setup/oauth_client.cc
remoting/protocol/fake_authenticator.cc
remoting/protocol/fake_datagram_socket.cc
remoting/protocol/ssl_hmac_channel_authenticator.cc
remoting/protocol/ssl_hmac_channel_authenticator.h
remoting/protocol/third_party_authenticator_unittest.cc
remoting/signaling/iq_sender.cc
remoting/test/access_token_fetcher.cc
remoting/test/remote_host_info_fetcher.cc