diff options
author | davidben@chromium.org <davidben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-11 22:01:41 +0000 |
---|---|---|
committer | davidben@chromium.org <davidben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-11 22:01:41 +0000 |
commit | 4f77cc08dc4abaa02c80118c93d6f02a99bf1218 (patch) | |
tree | 7ec432589607f5b12621f11525598b6e59624a8b /chrome/browser/cocoa | |
parent | 82ee669aa4b567d002ceda178fcba44addea6534 (diff) | |
download | chromium_src-4f77cc08dc4abaa02c80118c93d6f02a99bf1218.zip chromium_src-4f77cc08dc4abaa02c80118c93d6f02a99bf1218.tar.gz chromium_src-4f77cc08dc4abaa02c80118c93d6f02a99bf1218.tar.bz2 |
OS X: Allow a stat in the file dialog function on the UI thread
R=avi
BUG=none
TEST=OS X file dialogs don't trigger AssertIOAllowed DCHECKS
Review URL: http://codereview.chromium.org/4673009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65863 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa')
-rw-r--r-- | chrome/browser/cocoa/shell_dialogs_mac.mm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/shell_dialogs_mac.mm b/chrome/browser/cocoa/shell_dialogs_mac.mm index 46f5ea2..20b6c4a6 100644 --- a/chrome/browser/cocoa/shell_dialogs_mac.mm +++ b/chrome/browser/cocoa/shell_dialogs_mac.mm @@ -19,6 +19,7 @@ #include "base/mac/scoped_cftyperef.h" #import "base/scoped_nsobject.h" #include "base/sys_string_conversions.h" +#include "base/thread_restrictions.h" #include "grit/generated_resources.h" static const int kFileTypePopupTag = 1234; @@ -166,6 +167,9 @@ void SelectFileDialogImpl::SelectFile( NSString* default_dir = nil; NSString* default_filename = nil; if (!default_path.empty()) { + // The file dialog is going to do a ton of stats anyway. Not much + // point in eliminating this one. + base::ThreadRestrictions::ScopedAllowIO allow_io; if (file_util::DirectoryExists(default_path)) { default_dir = base::SysUTF8ToNSString(default_path.value()); } else { |