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

Unified Diff: net/url_request/url_request.cc

Issue 10068021: Fix file access on Chrome for ChromeOS on Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed clang problem Created 8 years, 8 months 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
Index: net/url_request/url_request.cc
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
index 8597917f0cbf49c84b3bdae3a7bebacbc264f1e0..ead9907c4f67465c5eb0f281cd6cff323d8d9951 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -337,13 +337,16 @@ bool URLRequest::IsHandledURL(const GURL& url) {
}
// static
-void URLRequest::AllowFileAccess() {
- URLRequestJobManager::GetInstance()->set_enable_file_access(true);
+void URLRequest::AllowAccessToAllFiles() {
+ URLRequestJobManager::GetInstance()->set_file_access_allowed(true);
}
-// static
-bool URLRequest::IsFileAccessAllowed() {
- return URLRequestJobManager::GetInstance()->enable_file_access();
+bool URLRequest::IsFileAccessAllowed(const FilePath& path) {
+ if (URLRequestJobManager::GetInstance()->file_access_allowed())
willchan no longer on Chromium 2012/04/19 21:12:24 From what I can tell, all this code was added pure
Greg Spencer (Chromium) 2012/04/20 00:05:54 Yeah, you're right. I've moved almost all of it e
willchan no longer on Chromium 2012/04/20 00:14:03 Can you get rid of that and just set a NetworkDele
Greg Spencer (Chromium) 2012/04/20 19:21:28 Duh, that would be better. :-) Done.
+ return true;
+ if (context_ && context_->network_delegate())
+ return context_->network_delegate()->NotifyFileAccessRequested(this, path);
+ return false;
}
void URLRequest::set_first_party_for_cookies(

Powered by Google App Engine
This is Rietveld 408576698