summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorasargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-14 21:39:43 +0000
committerasargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-14 21:39:43 +0000
commit27a1cae52681fa04d0169d788a35345475953b61 (patch)
treeead8ff452d8a6362794fef5d80dd35b452d7ab46 /chrome/browser
parent0e11c771b440ec92ac7a913333657767eb0a65cb (diff)
downloadchromium_src-27a1cae52681fa04d0169d788a35345475953b61.zip
chromium_src-27a1cae52681fa04d0169d788a35345475953b61.tar.gz
chromium_src-27a1cae52681fa04d0169d788a35345475953b61.tar.bz2
Suppress IO-on-wrong-thread DCHECK during file downloads.
BUG=72740 TEST=Downloading a file in linux Debug build should not die with a DCHECK failure. Review URL: http://codereview.chromium.org/6473004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74856 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/icon_manager_linux.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/icon_manager_linux.cc b/chrome/browser/icon_manager_linux.cc
index c653d2f..53fd124 100644
--- a/chrome/browser/icon_manager_linux.cc
+++ b/chrome/browser/icon_manager_linux.cc
@@ -5,7 +5,15 @@
#include "chrome/browser/icon_manager.h"
#include "base/mime_util.h"
+#include "base/threading/thread_restrictions.h"
IconGroupID IconManager::GetGroupIDFromFilepath(const FilePath& filepath) {
+ // It turns out the call to mime_util::GetFileMimeType below does IO, but
+ // callers of GetGroupIDFromFilepath assume it does not do IO (the Windows
+ // and Mac implementations do not). We should fix this by either not doing IO
+ // in this method, or reworking callers to avoid calling it on the UI thread.
+ // See crbug.com/72740.
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+
return mime_util::GetFileMimeType(filepath);
}