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

Unified Diff: content/renderer/media/midi_dispatcher.cc

Issue 642623005: [WebMIDI] Remove not needed CancelPermission IPC message. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/renderer/media/midi_dispatcher.cc
diff --git a/content/renderer/media/midi_dispatcher.cc b/content/renderer/media/midi_dispatcher.cc
index 84d10f7fc3e37b3776b1797016d0bb9a36306d30..b281389ee5427719f0a7ce08b9119db570efdd24 100644
--- a/content/renderer/media/midi_dispatcher.cc
+++ b/content/renderer/media/midi_dispatcher.cc
@@ -46,14 +46,10 @@ void MidiDispatcher::cancelSysexPermissionRequest(
const WebMIDIPermissionRequest& request) {
for (Requests::iterator it(&requests_); !it.IsAtEnd(); it.Advance()) {
WebMIDIPermissionRequest* value = it.GetCurrentValue();
- if (value->equals(request)) {
- base::string16 origin = request.securityOrigin().toString();
- Send(new MidiHostMsg_CancelSysExPermissionRequest(
- routing_id(), it.GetCurrentKey(), GURL(origin)));
- // The request will be removed by OnSysExPermissionApproved once
- // the blink MIDIAccessInitializer object is deleted.
mlamouri (slow - plz ping) 2014/10/09 12:47:36 That doesn't seem to be true.
Charlie Reis 2014/10/09 17:11:31 Sad that there's no test for this class to catch t
mlamouri (slow - plz ping) 2014/10/09 21:33:50 Having the |request| pending would only have it le
- break;
- }
+ if (!value->equals(request))
+ continue;
+ requests_.Remove(it.GetCurrentKey());
+ break;
}
}
« content/browser/media/midi_dispatcher_host.cc ('K') | « content/common/media/midi_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698