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

Unified Diff: chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.cc

Issue 143003031: Allow retrieval of media device ID salt even after ResourceContext has gone away. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add TODO about proper fix. Created 6 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.cc
diff --git a/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.cc b/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.cc
index 3f751d5f03065534f484f9607da14bfe261706f4..248416c8b79fb89e06da7f6d6bf32e1672a70d00 100644
--- a/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.cc
+++ b/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.cc
@@ -186,9 +186,10 @@ std::string WebrtcAudioPrivateFunction::CalculateHMACImpl(
return media::AudioManagerBase::kDefaultDeviceId;
GURL security_origin(source_url().GetOrigin());
- return content::GetHMACForMediaDeviceID(resource_context(),
- security_origin,
- raw_id);
+ return content::GetHMACForMediaDeviceID(
+ resource_context()->GetMediaDeviceIDSalt(),
+ security_origin,
+ raw_id);
}
void WebrtcAudioPrivateFunction::InitResourceContext() {
@@ -428,7 +429,7 @@ WebrtcAudioPrivateGetAssociatedSinkFunction::GetRawSourceIDOnIOThread() {
++it) {
const std::string& id = it->unique_id;
if (content::DoesMediaDeviceIDMatchHMAC(
- resource_context(),
+ resource_context()->GetMediaDeviceIDSalt(),
security_origin,
source_id_in_origin,
id)) {
« no previous file with comments | « no previous file | chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698