| Index: net/base/filename_util_internal.cc
|
| diff --git a/net/base/filename_util_internal.cc b/net/base/filename_util_internal.cc
|
| index a59de0f50c9174eb4f0cdfbc506428ee695ca57d..0d68bbde377cd65afc6285efc3401172cf9a1448 100644
|
| --- a/net/base/filename_util_internal.cc
|
| +++ b/net/base/filename_util_internal.cc
|
| @@ -171,6 +171,12 @@ void EnsureSafeExtension(const std::string& mime_type,
|
| if ((ignore_extension || extension.empty()) && !mime_type.empty()) {
|
| base::FilePath::StringType preferred_mime_extension;
|
| std::vector<base::FilePath::StringType> all_mime_extensions;
|
| + // The GetPreferredExtensionForMimeType call will end up going to disk. Do
|
| + // this on another thread to avoid slowing the IO thread.
|
| + // http://crbug.com/61827
|
| + // TODO(asanka): Remove this ScopedAllowIO once all callers have switched
|
| + // over to IO safe threads.
|
| + base::ThreadRestrictions::ScopedAllowIO allow_io;
|
| net::GetPreferredExtensionForMimeType(mime_type, &preferred_mime_extension);
|
| net::GetExtensionsForMimeType(mime_type, &all_mime_extensions);
|
| // If the existing extension is in the list of valid extensions for the
|
|
|