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

Unified Diff: content/browser/renderer_host/media/midi_dispatcher_host.cc

Issue 329993002: Only grant MidiSysExMessage if needed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | « content/browser/renderer_host/media/midi_dispatcher_host.h ('k') | content/common/media/midi_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/midi_dispatcher_host.cc
diff --git a/content/browser/renderer_host/media/midi_dispatcher_host.cc b/content/browser/renderer_host/media/midi_dispatcher_host.cc
index f006c140691f88d296942c76ae1d7967d5cb4054..0f760b6792885a04a66f33ec19cdf1af780b2dca 100644
--- a/content/browser/renderer_host/media/midi_dispatcher_host.cc
+++ b/content/browser/renderer_host/media/midi_dispatcher_host.cc
@@ -72,10 +72,12 @@ void MidiDispatcherHost::OnCancelSysExPermissionRequest(
}
void MidiDispatcherHost::WasSysExPermissionGranted(int render_view_id,
int bridge_id,
- bool success) {
- ChildProcessSecurityPolicyImpl::GetInstance()->GrantSendMidiSysExMessage(
- render_process_id_);
- Send(new MidiMsg_SysExPermissionApproved(render_view_id, bridge_id, success));
+ bool is_allowed) {
+ if (is_allowed)
+ ChildProcessSecurityPolicyImpl::GetInstance()->GrantSendMidiSysExMessage(
+ render_process_id_);
+ Send(new MidiMsg_SysExPermissionApproved(
+ render_view_id, bridge_id, is_allowed));
}
} // namespace content
« no previous file with comments | « content/browser/renderer_host/media/midi_dispatcher_host.h ('k') | content/common/media/midi_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698