OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 // This file provides File API related utilities. | 5 // This file provides File API related utilities. |
6 | 6 |
7 #ifndef CHROME_BROWSER_CHROMEOS_FILE_MANAGER_FILEAPI_UTIL_H_ | 7 #ifndef CHROME_BROWSER_CHROMEOS_FILE_MANAGER_FILEAPI_UTIL_H_ |
8 #define CHROME_BROWSER_CHROMEOS_FILE_MANAGER_FILEAPI_UTIL_H_ | 8 #define CHROME_BROWSER_CHROMEOS_FILE_MANAGER_FILEAPI_UTIL_H_ |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 25 matching lines...) Expand all Loading... |
36 }; | 36 }; |
37 | 37 |
38 // Contains all information needed to create an Entry object in custom bindings. | 38 // Contains all information needed to create an Entry object in custom bindings. |
39 struct EntryDefinition { | 39 struct EntryDefinition { |
40 EntryDefinition(); | 40 EntryDefinition(); |
41 ~EntryDefinition(); | 41 ~EntryDefinition(); |
42 | 42 |
43 std::string file_system_root_url; // Used to create DOMFileSystem. | 43 std::string file_system_root_url; // Used to create DOMFileSystem. |
44 std::string file_system_name; // Value of DOMFileSystem.name. | 44 std::string file_system_name; // Value of DOMFileSystem.name. |
45 base::FilePath full_path; // Value of Entry.fullPath. | 45 base::FilePath full_path; // Value of Entry.fullPath. |
46 bool is_directory; // Whether to create FileEntry or DirectoryEntry. | 46 // Whether to create FileEntry or DirectoryEntry when the corresponding entry |
| 47 // is not found. |
| 48 bool is_directory; |
47 base::File::Error error; | 49 base::File::Error error; |
48 }; | 50 }; |
49 | 51 |
50 typedef std::vector<FileDefinition> FileDefinitionList; | 52 typedef std::vector<FileDefinition> FileDefinitionList; |
51 typedef std::vector<EntryDefinition> EntryDefinitionList; | 53 typedef std::vector<EntryDefinition> EntryDefinitionList; |
52 | 54 |
53 // The callback used by ConvertFileDefinitionToEntryDefinition. Returns the | 55 // The callback used by ConvertFileDefinitionToEntryDefinition. Returns the |
54 // result of the conversion. | 56 // result of the conversion. |
55 typedef base::Callback<void(const EntryDefinition& entry_definition)> | 57 typedef base::Callback<void(const EntryDefinition& entry_definition)> |
56 EntryDefinitionCallback; | 58 EntryDefinitionCallback; |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 void ConvertFileDefinitionListToEntryDefinitionList( | 121 void ConvertFileDefinitionListToEntryDefinitionList( |
120 Profile* profile, | 122 Profile* profile, |
121 const std::string& extension_id, | 123 const std::string& extension_id, |
122 const FileDefinitionList& file_definition_list, | 124 const FileDefinitionList& file_definition_list, |
123 const EntryDefinitionListCallback& callback); | 125 const EntryDefinitionListCallback& callback); |
124 | 126 |
125 } // namespace util | 127 } // namespace util |
126 } // namespace file_manager | 128 } // namespace file_manager |
127 | 129 |
128 #endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_FILEAPI_UTIL_H_ | 130 #endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_FILEAPI_UTIL_H_ |
OLD | NEW |