pilgrim | 4af8c21 | 2014-09-05 17:30:15 | [diff] [blame] | 1 | // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef STORAGE_BROWSER_FILEAPI_DRAGGED_FILE_UTIL_H_ |
| 6 | #define STORAGE_BROWSER_FILEAPI_DRAGGED_FILE_UTIL_H_ |
| 7 | |
dcheng | c6378bd | 2016-04-01 05:36:50 | [diff] [blame] | 8 | #include <memory> |
| 9 | |
Victor Costan | feaee8cf7 | 2018-12-28 00:39:15 | [diff] [blame] | 10 | #include "base/component_export.h" |
avi | 5caf646e | 2015-12-21 21:21:50 | [diff] [blame] | 11 | #include "base/macros.h" |
pilgrim | 4af8c21 | 2014-09-05 17:30:15 | [diff] [blame] | 12 | #include "storage/browser/fileapi/local_file_util.h" |
pilgrim | 4af8c21 | 2014-09-05 17:30:15 | [diff] [blame] | 13 | |
| 14 | namespace storage { |
| 15 | |
| 16 | class FileSystemOperationContext; |
| 17 | |
| 18 | // Dragged file system is a specialized LocalFileUtil where read access to |
| 19 | // the virtual root directory (i.e. empty cracked path case) is allowed |
| 20 | // and single isolated context may be associated with multiple file paths. |
Victor Costan | feaee8cf7 | 2018-12-28 00:39:15 | [diff] [blame] | 21 | class COMPONENT_EXPORT(STORAGE_BROWSER) DraggedFileUtil : public LocalFileUtil { |
pilgrim | 4af8c21 | 2014-09-05 17:30:15 | [diff] [blame] | 22 | public: |
| 23 | DraggedFileUtil(); |
dcheng | 1a54c8df | 2014-10-21 11:01:19 | [diff] [blame] | 24 | ~DraggedFileUtil() override {} |
pilgrim | 4af8c21 | 2014-09-05 17:30:15 | [diff] [blame] | 25 | |
| 26 | // FileSystemFileUtil overrides. |
dcheng | 1a54c8df | 2014-10-21 11:01:19 | [diff] [blame] | 27 | base::File::Error GetFileInfo(FileSystemOperationContext* context, |
| 28 | const FileSystemURL& url, |
| 29 | base::File::Info* file_info, |
| 30 | base::FilePath* platform_path) override; |
dcheng | c6378bd | 2016-04-01 05:36:50 | [diff] [blame] | 31 | std::unique_ptr<AbstractFileEnumerator> CreateFileEnumerator( |
pilgrim | 4af8c21 | 2014-09-05 17:30:15 | [diff] [blame] | 32 | FileSystemOperationContext* context, |
Sergei Datsenko | 8fab086 | 2018-12-28 04:23:49 | [diff] [blame] | 33 | const FileSystemURL& root_url, |
| 34 | bool recursive) override; |
pilgrim | 4af8c21 | 2014-09-05 17:30:15 | [diff] [blame] | 35 | |
| 36 | private: |
| 37 | DISALLOW_COPY_AND_ASSIGN(DraggedFileUtil); |
| 38 | }; |
| 39 | |
| 40 | } // namespace storage |
| 41 | |
| 42 | #endif // STORAGE_BROWSER_FILEAPI_DRAGGED_FILE_UTIL_H_ |