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

Unified Diff: content/shell/shell_browser_context.cc

Issue 19980004: Web MIDI: add kDumpRenderTree flag check to ShellBrowserContext::RequestMIDI... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | « chrome/browser/profiles/profile_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/shell_browser_context.cc
diff --git a/content/shell/shell_browser_context.cc b/content/shell/shell_browser_context.cc
index 281862fc0ede8e86907673282eb84daed6015b13..58b966c2ecd976fafb1e1b6c85e649a88b06c644 100644
--- a/content/shell/shell_browser_context.cc
+++ b/content/shell/shell_browser_context.cc
@@ -175,8 +175,13 @@ void ShellBrowserContext::RequestMIDISysExPermission(
int render_view_id,
const GURL& requesting_frame,
const MIDISysExPermissionCallback& callback) {
- // Always reject requests for testing.
+ // Always reject requests for LayoutTests for now.
// TODO(toyoshim): Make it programmable to improve test coverage.
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) {
+ callback.Run(false);
+ return;
+ }
+ // TODO(toyoshim): Implement. http://crbug.com/257618 .
callback.Run(false);
}
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698