summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/external_protocol_handler.cc8
-rw-r--r--chrome/browser/external_protocol_handler.h2
2 files changed, 6 insertions, 4 deletions
diff --git a/chrome/browser/external_protocol_handler.cc b/chrome/browser/external_protocol_handler.cc
index 24423ac..18ff2bf 100644
--- a/chrome/browser/external_protocol_handler.cc
+++ b/chrome/browser/external_protocol_handler.cc
@@ -129,13 +129,15 @@ void ExternalProtocolHandler::LaunchUrl(const GURL& url,
return;
}
- MessageLoop* io_loop = g_browser_process->io_thread()->message_loop();
- if (io_loop == NULL) {
+ // Put this work on the file thread since ShellExecute may block for a
+ // significant amount of time.
+ MessageLoop* loop = g_browser_process->file_thread()->message_loop();
+ if (loop == NULL) {
return;
}
// Otherwise the protocol is white-listed, so go ahead and launch.
- io_loop->PostTask(FROM_HERE,
+ loop->PostTask(FROM_HERE,
NewRunnableFunction(
&ExternalProtocolHandler::LaunchUrlWithoutSecurityCheck,
escaped_url));
diff --git a/chrome/browser/external_protocol_handler.h b/chrome/browser/external_protocol_handler.h
index 75f3f93..830c290 100644
--- a/chrome/browser/external_protocol_handler.h
+++ b/chrome/browser/external_protocol_handler.h
@@ -42,7 +42,7 @@ class ExternalProtocolHandler {
// NOTE: You should Not call this function directly unless you are sure the
// url you have has been checked against the blacklist, and has been escaped.
// All calls to this function should originate in some way from LaunchUrl.
- // Must run on the IO thread.
+ // Must run on the file thread.
static void LaunchUrlWithoutSecurityCheck(const GURL& url);
// Prepopulates the dictionary with known protocols to deny or allow, if