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

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

Issue 1369723003: Do not hash default and communications media device ID (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tommi's comments Created 5 years, 3 months 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_stream_manager.h
diff --git a/content/browser/renderer_host/media/media_stream_manager.h b/content/browser/renderer_host/media/media_stream_manager.h
index 9dad60503f06cb17f71604c406dcf1463a48cf02..af0658a5ce31568807e89bb337b9abbf9df22363 100644
--- a/content/browser/renderer_host/media/media_stream_manager.h
+++ b/content/browser/renderer_host/media/media_stream_manager.h
@@ -213,6 +213,21 @@ class CONTENT_EXPORT MediaStreamManager
// generated stream (or when using --use-fake-ui-for-media-stream).
void UseFakeUIForTests(scoped_ptr<FakeMediaStreamUIProxy> fake_ui);
+ // Generates a hash of a device's unique ID usable by one
+ // particular security origin.
+ static std::string GetHMACForMediaDeviceID(
+ const ResourceContext::SaltCallback& sc,
+ const GURL& security_origin,
+ const std::string& raw_unique_id);
+
+ // Convenience method to check if |device_guid| is an HMAC of
+ // |raw_device_id| for |security_origin|.
+ static bool DoesMediaDeviceIDMatchHMAC(
+ const ResourceContext::SaltCallback& sc,
+ const GURL& security_origin,
+ const std::string& device_guid,
+ const std::string& raw_unique_id);
+
private:
// Contains all data needed to keep track of requests.
class DeviceRequest;

Powered by Google App Engine
This is Rietveld 408576698