diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-04 17:41:00 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-04 17:41:00 +0000 |
commit | 45446a5e18df7910f64a690a5d6389b70e30f985 (patch) | |
tree | 5318a1c6e14aa8600a2d958929da77019d1ef4a8 /net/url_request | |
parent | 42d5be693f7cc623caa3df6bfb2bcc4f6861cb36 (diff) | |
download | chromium_src-45446a5e18df7910f64a690a5d6389b70e30f985.zip chromium_src-45446a5e18df7910f64a690a5d6389b70e30f985.tar.gz chromium_src-45446a5e18df7910f64a690a5d6389b70e30f985.tar.bz2 |
Turn on file access checks on Win.
BUG=60211
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=64960
Review URL: http://codereview.chromium.org/4222005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65075 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request')
-rw-r--r-- | net/url_request/url_request_file_job.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/url_request/url_request_file_job.cc b/net/url_request/url_request_file_job.cc index f9c6559..fff85c3 100644 --- a/net/url_request/url_request_file_job.cc +++ b/net/url_request/url_request_file_job.cc @@ -203,6 +203,10 @@ bool URLRequestFileJob::GetContentEncodings( } bool URLRequestFileJob::GetMimeType(std::string* mime_type) const { + // URL requests should not block on the disk! On Windows this goes to the + // registry. + // http://code.google.com/p/chromium/issues/detail?id=59849 + base::ThreadRestrictions::ScopedAllowIO allow_io; DCHECK(request_); return net::GetMimeTypeFromFile(file_path_, mime_type); } @@ -252,6 +256,10 @@ void URLRequestFileJob::DidResolve( if (!exists) { rv = net::ERR_FILE_NOT_FOUND; } else if (!is_directory_) { + // URL requests should not block on the disk! + // http://code.google.com/p/chromium/issues/detail?id=59849 + base::ThreadRestrictions::ScopedAllowIO allow_io; + int flags = base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ | base::PLATFORM_FILE_ASYNC; |