summaryrefslogtreecommitdiffstats
path: root/chrome/browser/external_protocol_handler.cc
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-16 05:16:56 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-16 05:16:56 +0000
commit3c2a3d1369b6fe67239f8dbea1e4879748781f96 (patch)
tree65cad25448502dd03998a84cb2263574ba3f5de2 /chrome/browser/external_protocol_handler.cc
parent3b073b258b19937b1dd9b6b2a609dee207865eba (diff)
downloadchromium_src-3c2a3d1369b6fe67239f8dbea1e4879748781f96.zip
chromium_src-3c2a3d1369b6fe67239f8dbea1e4879748781f96.tar.gz
chromium_src-3c2a3d1369b6fe67239f8dbea1e4879748781f96.tar.bz2
Run ShellExecute on the file thread instead of the IO thread. ShellExecute can
be janky so we don't want to be calling it on the IO thread. The file thread is really the "blocking io" thread, and it's where we call ShellExecute for other things. R=nsylvain Review URL: http://codereview.chromium.org/18120 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8166 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/external_protocol_handler.cc')
-rw-r--r--chrome/browser/external_protocol_handler.cc8
1 files changed, 5 insertions, 3 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));