OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // The file contains utility functions to implement chrome.fileSystem API for | 5 // The file contains utility functions to implement chrome.fileSystem API for |
6 // file paths that do not directly map to host machine's file system path, such | 6 // file paths that do not directly map to host machine's file system path, such |
7 // as Google Drive or virtual volumes provided by fileSystemProvider extensions. | 7 // as Google Drive or virtual volumes provided by fileSystemProvider extensions. |
8 | 8 |
9 #ifndef CHROME_BROWSER_CHROMEOS_FILE_MANAGER_FILESYSTEM_API_UTIL_H_ | 9 #ifndef CHROME_BROWSER_CHROMEOS_FILE_MANAGER_FILESYSTEM_API_UTIL_H_ |
10 #define CHROME_BROWSER_CHROMEOS_FILE_MANAGER_FILESYSTEM_API_UTIL_H_ | 10 #define CHROME_BROWSER_CHROMEOS_FILE_MANAGER_FILESYSTEM_API_UTIL_H_ |
11 | 11 |
12 #include <string> | 12 #include <string> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/callback_forward.h" | 15 #include "base/callback_forward.h" |
16 | 16 |
17 class Profile; | 17 class Profile; |
18 | 18 |
19 namespace base { | 19 namespace base { |
20 class FilePath; | 20 class FilePath; |
21 } // namespace base | 21 } // namespace base |
22 | 22 |
23 namespace fileapi { | 23 namespace storage { |
24 class FileSystemURL; | 24 class FileSystemURL; |
25 } // namespace fileapi | 25 } // namespace storage |
26 | 26 |
27 namespace file_manager { | 27 namespace file_manager { |
28 namespace util { | 28 namespace util { |
29 | 29 |
30 // Checks whether the given |path| points to a non-local filesystem that | 30 // Checks whether the given |path| points to a non-local filesystem that |
31 // requires special handling. | 31 // requires special handling. |
32 bool IsUnderNonNativeLocalPath(Profile* profile, const base::FilePath& path); | 32 bool IsUnderNonNativeLocalPath(Profile* profile, const base::FilePath& path); |
33 | 33 |
34 // Returns the mime type of the file pointed by |path|, and asynchronously sends | 34 // Returns the mime type of the file pointed by |path|, and asynchronously sends |
35 // the result to |callback|. | 35 // the result to |callback|. |
(...skipping 14 matching lines...) Expand all Loading... |
50 // |callback| whether it succeeded. | 50 // |callback| whether it succeeded. |
51 void PrepareNonNativeLocalFileForWritableApp( | 51 void PrepareNonNativeLocalFileForWritableApp( |
52 Profile* profile, | 52 Profile* profile, |
53 const base::FilePath& path, | 53 const base::FilePath& path, |
54 const base::Callback<void(bool)>& callback); | 54 const base::Callback<void(bool)>& callback); |
55 | 55 |
56 } // namespace util | 56 } // namespace util |
57 } // namespace file_manager | 57 } // namespace file_manager |
58 | 58 |
59 #endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_FILESYSTEM_API_UTIL_H_ | 59 #endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_FILESYSTEM_API_UTIL_H_ |
OLD | NEW |