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 | |
avi | 5caf646e | 2015-12-21 21:21:50 | [diff] [blame^] | 8 | #include "base/macros.h" |
pilgrim | 4af8c21 | 2014-09-05 17:30:15 | [diff] [blame] | 9 | #include "base/memory/scoped_ptr.h" |
| 10 | #include "storage/browser/fileapi/local_file_util.h" |
| 11 | #include "storage/browser/storage_browser_export.h" |
| 12 | |
| 13 | namespace storage { |
| 14 | |
| 15 | class FileSystemOperationContext; |
| 16 | |
| 17 | // Dragged file system is a specialized LocalFileUtil where read access to |
| 18 | // the virtual root directory (i.e. empty cracked path case) is allowed |
| 19 | // and single isolated context may be associated with multiple file paths. |
xhwang | 89a6a3da | 2015-11-06 18:24:21 | [diff] [blame] | 20 | class STORAGE_EXPORT DraggedFileUtil : public LocalFileUtil { |
pilgrim | 4af8c21 | 2014-09-05 17:30:15 | [diff] [blame] | 21 | public: |
| 22 | DraggedFileUtil(); |
dcheng | 1a54c8df | 2014-10-21 11:01:19 | [diff] [blame] | 23 | ~DraggedFileUtil() override {} |
pilgrim | 4af8c21 | 2014-09-05 17:30:15 | [diff] [blame] | 24 | |
| 25 | // FileSystemFileUtil overrides. |
dcheng | 1a54c8df | 2014-10-21 11:01:19 | [diff] [blame] | 26 | base::File::Error GetFileInfo(FileSystemOperationContext* context, |
| 27 | const FileSystemURL& url, |
| 28 | base::File::Info* file_info, |
| 29 | base::FilePath* platform_path) override; |
| 30 | scoped_ptr<AbstractFileEnumerator> CreateFileEnumerator( |
pilgrim | 4af8c21 | 2014-09-05 17:30:15 | [diff] [blame] | 31 | FileSystemOperationContext* context, |
mohan.reddy | 8b6fef4 | 2014-10-07 04:56:25 | [diff] [blame] | 32 | const FileSystemURL& root_url) override; |
pilgrim | 4af8c21 | 2014-09-05 17:30:15 | [diff] [blame] | 33 | |
| 34 | private: |
| 35 | DISALLOW_COPY_AND_ASSIGN(DraggedFileUtil); |
| 36 | }; |
| 37 | |
| 38 | } // namespace storage |
| 39 | |
| 40 | #endif // STORAGE_BROWSER_FILEAPI_DRAGGED_FILE_UTIL_H_ |