Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1086)

Unified Diff: content/browser/renderer_host/media/media_devices_dispatcher_host.h

Issue 2474923002: Fix race in MediaDevicesPermissionChecker. (Closed)
Patch Set: Fix rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/media/media_devices_dispatcher_host.h
diff --git a/content/browser/renderer_host/media/media_devices_dispatcher_host.h b/content/browser/renderer_host/media/media_devices_dispatcher_host.h
index 46d8b4cb9aadda610364a8750bec732fbce7a429..12ca0240e42cb3e73a7ee2ac4ccd8e612fee86a0 100644
--- a/content/browser/renderer_host/media/media_devices_dispatcher_host.h
+++ b/content/browser/renderer_host/media/media_devices_dispatcher_host.h
@@ -60,7 +60,7 @@ class CONTENT_EXPORT MediaDevicesDispatcherHost
const MediaDeviceInfoArray& device_infos) override;
void SetPermissionChecker(
- const MediaDevicesPermissionChecker& permission_checker);
+ std::unique_ptr<MediaDevicesPermissionChecker> permission_checker);
void SetDeviceChangeListenerForTesting(
::mojom::MediaDevicesListenerPtr listener);
@@ -93,7 +93,7 @@ class CONTENT_EXPORT MediaDevicesDispatcherHost
// The following fields can only be accessed on the IO thread.
MediaStreamManager* media_stream_manager_;
- MediaDevicesPermissionChecker permission_checker_;
+ std::unique_ptr<MediaDevicesPermissionChecker> permission_checker_;
std::vector<SubscriptionInfo>
device_change_subscriptions_[NUM_MEDIA_DEVICE_TYPES];

Powered by Google App Engine
This is Rietveld 408576698