| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/extensions/api/file_handlers/app_file_handler_util.h" | 5 #include "chrome/browser/extensions/api/file_handlers/app_file_handler_util.h" |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/extension_prefs.h" | 7 #include "chrome/browser/extensions/extension_prefs.h" |
| 8 #include "content/public/browser/child_process_security_policy.h" | 8 #include "content/public/browser/child_process_security_policy.h" |
| 9 #include "net/base/mime_util.h" | 9 #include "net/base/mime_util.h" |
| 10 #include "webkit/browser/fileapi/isolated_context.h" | 10 #include "webkit/browser/fileapi/isolated_context.h" |
| 11 #include "webkit/fileapi/file_system_types.h" | 11 #include "webkit/common/fileapi/file_system_types.h" |
| 12 | 12 |
| 13 namespace extensions { | 13 namespace extensions { |
| 14 | 14 |
| 15 namespace app_file_handler_util { | 15 namespace app_file_handler_util { |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 bool FileHandlerCanHandleFileWithExtension( | 19 bool FileHandlerCanHandleFileWithExtension( |
| 20 const FileHandlerInfo& handler, | 20 const FileHandlerInfo& handler, |
| 21 const base::FilePath& path) { | 21 const base::FilePath& path) { |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 // just needs the file system to have read/write access, which is granted | 148 // just needs the file system to have read/write access, which is granted |
| 149 // above if required. | 149 // above if required. |
| 150 if (!policy->CanReadFile(renderer_id, path)) | 150 if (!policy->CanReadFile(renderer_id, path)) |
| 151 policy->GrantReadFile(renderer_id, path); | 151 policy->GrantReadFile(renderer_id, path); |
| 152 return result; | 152 return result; |
| 153 } | 153 } |
| 154 | 154 |
| 155 } // namespace app_file_handler_util | 155 } // namespace app_file_handler_util |
| 156 | 156 |
| 157 } // namespace extensions | 157 } // namespace extensions |
| OLD | NEW |