Implement FallbackSignalStrategy.
commitb47eef370e66f6adfddb8b611af6b18672df326a
authorjamiewalch <jamiewalch@chromium.org>
Wed, 14 Jan 2015 22:59:14 +0000 (14 14:59 -0800)
committerCommit bot <commit-bot@chromium.org>
Wed, 14 Jan 2015 23:00:26 +0000 (14 23:00 +0000)
tree16d0fc348dd54fc5a404c35f01c96e64d19b7608
parent1432aeceee28c673add5c722cb2edf37cab1ff73
Implement FallbackSignalStrategy.

This allows a preferred signal strategy (currently always XMPP) to be used
speculatively, falling back on a back-up strategy (currently always WCS) if
that fails or times out. There is also a logging hook that will allow us to
log which strategy is in use, as well as corner cases such as the preferred
strategy succeeding after the time-out has expired (which would imply that
the time-out is too short). The actual logging will be a follow-up CL.

BUG=432171

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

Cr-Commit-Position: refs/heads/master@{#311567}
remoting/remoting_webapp_files.gypi
remoting/webapp/crd/js/fallback_signal_strategy.js [new file with mode: 0644]
remoting/webapp/crd/js/signal_strategy.js
remoting/webapp/unittests/fallback_signal_strategy_unittest.js [new file with mode: 0644]