summaryrefslogtreecommitdiffstats
path: root/net/url_request
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-03 20:36:28 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-03 20:36:28 +0000
commit822e2947f42a96cc29771f15013fe324037a9712 (patch)
treea83ff359afec5eb297bf58f2c44cd8037e89dd04 /net/url_request
parent0cb7bec2eb1b954e30de75305c974ecfee3c8efb (diff)
downloadchromium_src-822e2947f42a96cc29771f15013fe324037a9712.zip
chromium_src-822e2947f42a96cc29771f15013fe324037a9712.tar.gz
chromium_src-822e2947f42a96cc29771f15013fe324037a9712.tar.bz2
Turn on file access checks on Win.
BUG=60211 Review URL: http://codereview.chromium.org/4222005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64960 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request')
-rw-r--r--net/url_request/url_request_file_job.cc8
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;