Refactor MediaStreamManager to never output real device id. It now always output...
commit8a85398c4980d42990c5cd53bc9f9c83ced75f3b
authorperkj@chromium.org <perkj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Mon, 4 Nov 2013 19:54:58 +0000 (4 19:54 +0000)
committerperkj@chromium.org <perkj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Mon, 4 Nov 2013 19:54:58 +0000 (4 19:54 +0000)
tree56f4aee9a470144f4aa0ed8353468e9959744ad8
parent4daa4ee18de5452b95e70babd8d2a217a0812a5a
Refactor MediaStreamManager to never output real device id. It now always output sourceId in the form of a HMAC.
DeviceMessageFilter now don't need to create a source id.
This also fix a bug that made the source ids useless unless you have called gum once.
Note that the sourceIds are still just using the security origin as salt. Next step is to add a random number that is stored in the profile somehow.

This cl also make sure all public APIs are asynchronous by making sure all requests are posted on the UI thread and handled later. Before this change - there were code paths that posted on the UI thread and others that did not that could potentially happen after a request was cancelled. This also make it easier to fail a request based on the input arguments.

BUG=269139

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232766 0039d316-1c4b-4281-b951-d872f2087c98
19 files changed:
chrome/browser/policy/policy_browsertest.cc
content/browser/renderer_host/media/device_request_message_filter.cc
content/browser/renderer_host/media/device_request_message_filter.h
content/browser/renderer_host/media/device_request_message_filter_unittest.cc
content/browser/renderer_host/media/media_stream_dispatcher_host.cc
content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
content/browser/renderer_host/media/media_stream_manager.cc
content/browser/renderer_host/media/media_stream_manager.h
content/browser/renderer_host/media/media_stream_manager_unittest.cc
content/browser/renderer_host/media/media_stream_provider.h
content/browser/renderer_host/media/media_stream_ui_proxy.cc
content/browser/renderer_host/media/media_stream_ui_proxy_unittest.cc
content/browser/renderer_host/media/video_capture_host_unittest.cc
content/public/common/media_stream_request.cc
content/public/common/media_stream_request.h
content/renderer/media/media_stream_impl.cc
content/renderer/media/mock_media_stream_dispatcher.cc
media/audio/mock_audio_manager.cc
media/audio/mock_audio_manager.h