[MediaStream] Use DeviceIdHashSaltStorage to generate device ID hash salt
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Nov 2018 15:53:43 +0000 (15:53 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Nov 2018 15:53:43 +0000 (15:53 +0000)
commitb066aa3ed78396146d27f408f258c58282f88107
treebf7d6187af7c2c1c6cde5637a1494b25df8cd35c
parentbd09de7f98d235a39b0506655a3cd2e07721d81e
[MediaStream] Use DeviceIdHashSaltStorage to generate device ID hash salt
https://bugs.webkit.org/show_bug.cgi?id=190825
<rdar://problem/45486085>

Source/WebKit:

Reviewed by Youenn Fablet.

* UIProcess/API/C/WKUserMediaPermissionCheck.cpp:
(WKUserMediaPermissionCheckSetUserMediaAccessInfo):
* UIProcess/API/glib/WebKitDeviceInfoPermissionRequest.cpp:
(webkitDeviceInfoPermissionRequestAllow):
(webkitDeviceInfoPermissionRequestDeny):
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::checkUserMediaPermissionForOrigin):
* UIProcess/DeviceIdHashSaltStorage.cpp:
(WebKit::DeviceIdHashSaltStorage::regenerateDeviceIdHashSaltForOrigin):
(WebKit::DeviceIdHashSaltStorage::deleteDeviceIdHashSaltForOrigin):
* UIProcess/DeviceIdHashSaltStorage.h:
* UIProcess/UserMediaPermissionCheckProxy.cpp:
(WebKit::UserMediaPermissionCheckProxy::setUserMediaAccessInfo):
* UIProcess/UserMediaPermissionCheckProxy.h:
* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::createPermissionRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted):
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
(WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo):
(WebKit::UserMediaPermissionRequestManagerProxy::updateDeviceIDHashSalt):
(WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
* UIProcess/UserMediaPermissionRequestManagerProxy.h:
* UIProcess/UserMediaPermissionRequestProxy.cpp:
(WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy):
* UIProcess/UserMediaPermissionRequestProxy.h:
(WebKit::UserMediaPermissionRequestProxy::create):
(WebKit::UserMediaPermissionRequestProxy::deviceIdentifierHashSalt const): Deleted.

LayoutTests:

Update enumerate-devices-source-id to expect the same device to have the same ID in all
iframes, remove enumerate-devices-source-id-persistent because the logic was faulty.

Reviewed by Youenn Fablet.

* TestExpectations: Unskip http/tests/media/media-stream/enumerate-devices-source-id.html
* http/tests/media/media-stream/enumerate-devices-source-id-expected.txt:
* http/tests/media/media-stream/enumerate-devices-source-id-persistent-expected.txt: Removed.
* http/tests/media/media-stream/enumerate-devices-source-id-persistent.html: Removed.
* http/tests/media/media-stream/enumerate-devices-source-id.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237988 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/http/tests/media/media-stream/enumerate-devices-source-id-expected.txt
LayoutTests/http/tests/media/media-stream/enumerate-devices-source-id-persistent-expected.txt [deleted file]
LayoutTests/http/tests/media/media-stream/enumerate-devices-source-id-persistent.html [deleted file]
LayoutTests/http/tests/media/media-stream/enumerate-devices-source-id.html
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/C/WKUserMediaPermissionCheck.cpp
Source/WebKit/UIProcess/API/glib/WebKitDeviceInfoPermissionRequest.cpp
Source/WebKit/UIProcess/Cocoa/UIDelegate.mm
Source/WebKit/UIProcess/DeviceIdHashSaltStorage.cpp
Source/WebKit/UIProcess/DeviceIdHashSaltStorage.h
Source/WebKit/UIProcess/UserMediaPermissionCheckProxy.cpp
Source/WebKit/UIProcess/UserMediaPermissionCheckProxy.h
Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp
Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.h
Source/WebKit/UIProcess/UserMediaPermissionRequestProxy.cpp
Source/WebKit/UIProcess/UserMediaPermissionRequestProxy.h