Chromium Code Reviews| Index: chrome/browser/extensions/extension_protocols.cc |
| diff --git a/chrome/browser/extensions/extension_protocols.cc b/chrome/browser/extensions/extension_protocols.cc |
| index 30a0cf26b4320ba45e792c84c3357b6d7c72fb80..668f274baa1aa00e66f3c33632e16a089bf601d8 100644 |
| --- a/chrome/browser/extensions/extension_protocols.cc |
| +++ b/chrome/browser/extensions/extension_protocols.cc |
| @@ -284,7 +284,8 @@ class URLRequestExtensionJob : public net::URLRequestFileJob { |
| const base::FilePath& directory_path, |
| const base::FilePath& relative_path, |
| const std::string& content_security_policy, |
| - bool send_cors_header) |
| + bool send_cors_header, |
| + bool follow_symlinks_anywhere) |
| : net::URLRequestFileJob( |
| request, network_delegate, base::FilePath(), |
| BrowserThread::GetBlockingPool()->GetTaskRunnerWithShutdownBehavior( |
| @@ -296,6 +297,9 @@ class URLRequestExtensionJob : public net::URLRequestFileJob { |
| content_security_policy_(content_security_policy), |
| send_cors_header_(send_cors_header), |
| weak_factory_(this) { |
| + if (follow_symlinks_anywhere) { |
| + resource_.set_follow_symlinks_anywhere(); |
| + } |
| } |
| virtual void GetResponseInfo(net::HttpResponseInfo* info) OVERRIDE { |
| @@ -526,6 +530,7 @@ ExtensionProtocolHandler::MaybeCreateJob( |
| std::string content_security_policy; |
| bool send_cors_header = false; |
| + bool follow_symlinks_anywhere = false; |
| if (extension) { |
| std::string resource_path = request->url().path(); |
| content_security_policy = |
| @@ -537,6 +542,8 @@ ExtensionProtocolHandler::MaybeCreateJob( |
| extensions::WebAccessibleResourcesInfo::IsResourceWebAccessible( |
| extension, resource_path)) |
| send_cors_header = true; |
| + |
| + follow_symlinks_anywhere = extension->creation_flags(); |
|
benwells
2013/12/09 23:22:15
What is this line for - is it meant to limit this
blois
2013/12/09 23:31:06
Eek. Correct.
It should be doing the same as this
|
| } |
| std::string path = request->url().path(); |
| @@ -618,7 +625,8 @@ ExtensionProtocolHandler::MaybeCreateJob( |
| directory_path, |
| relative_path, |
| content_security_policy, |
| - send_cors_header); |
| + send_cors_header, |
| + follow_symlinks_anywhere); |
| } |
| } // namespace |