Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(425)

Unified Diff: net/url_request/url_request_file_job.cc

Issue 4222005: Turn on file access checks on Win. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Second try Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/proxy/proxy_config_service_win.cc ('k') | webkit/glue/plugins/pepper_url_request_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_file_job.cc
===================================================================
--- net/url_request/url_request_file_job.cc (revision 64981)
+++ net/url_request/url_request_file_job.cc (working copy)
@@ -203,6 +203,10 @@
}
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 @@
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;
« no previous file with comments | « net/proxy/proxy_config_service_win.cc ('k') | webkit/glue/plugins/pepper_url_request_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698