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 system related API functions. | 5 // This file provides file system related API functions. |
6 | 6 |
7 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_FILE_SYSTEM_
H_ | 7 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_FILE_SYSTEM_
H_ |
8 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_FILE_SYSTEM_
H_ | 8 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_FILE_SYSTEM_
H_ |
9 | 9 |
| 10 #include <stddef.h> |
| 11 #include <stdint.h> |
| 12 |
10 #include <string> | 13 #include <string> |
11 | 14 |
| 15 #include "base/macros.h" |
12 #include "chrome/browser/chromeos/extensions/file_manager/private_api_base.h" | 16 #include "chrome/browser/chromeos/extensions/file_manager/private_api_base.h" |
13 #include "chrome/browser/extensions/chrome_extension_function.h" | 17 #include "chrome/browser/extensions/chrome_extension_function.h" |
14 #include "chrome/browser/extensions/chrome_extension_function_details.h" | 18 #include "chrome/browser/extensions/chrome_extension_function_details.h" |
15 #include "components/drive/file_errors.h" | 19 #include "components/drive/file_errors.h" |
16 #include "device/media_transfer_protocol/mtp_storage_info.pb.h" | 20 #include "device/media_transfer_protocol/mtp_storage_info.pb.h" |
17 #include "extensions/browser/extension_function.h" | 21 #include "extensions/browser/extension_function.h" |
18 #include "storage/browser/fileapi/file_system_url.h" | 22 #include "storage/browser/fileapi/file_system_url.h" |
19 | 23 |
20 class GURL; | 24 class GURL; |
21 | 25 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 | 153 |
150 // AsyncExtensionFunction overrides. | 154 // AsyncExtensionFunction overrides. |
151 bool RunAsync() override; | 155 bool RunAsync() override; |
152 | 156 |
153 private: | 157 private: |
154 void OnGetLocalSpace(uint64_t* total_size, | 158 void OnGetLocalSpace(uint64_t* total_size, |
155 uint64_t* remaining_size, | 159 uint64_t* remaining_size, |
156 bool is_download); | 160 bool is_download); |
157 | 161 |
158 void OnGetDriveAvailableSpace(drive::FileError error, | 162 void OnGetDriveAvailableSpace(drive::FileError error, |
159 int64 bytes_total, | 163 int64_t bytes_total, |
160 int64 bytes_used); | 164 int64_t bytes_used); |
161 | 165 |
162 void OnGetMtpAvailableSpace(const MtpStorageInfo& mtp_storage_info, | 166 void OnGetMtpAvailableSpace(const MtpStorageInfo& mtp_storage_info, |
163 const bool error); | 167 const bool error); |
164 | 168 |
165 void OnGetSizeStats(const uint64* total_size, const uint64* remaining_size); | 169 void OnGetSizeStats(const uint64_t* total_size, |
| 170 const uint64_t* remaining_size); |
166 }; | 171 }; |
167 | 172 |
168 // Implements the chrome.fileManagerPrivate.validatePathNameLength method. | 173 // Implements the chrome.fileManagerPrivate.validatePathNameLength method. |
169 class FileManagerPrivateInternalValidatePathNameLengthFunction | 174 class FileManagerPrivateInternalValidatePathNameLengthFunction |
170 : public LoggedAsyncExtensionFunction { | 175 : public LoggedAsyncExtensionFunction { |
171 public: | 176 public: |
172 DECLARE_EXTENSION_FUNCTION( | 177 DECLARE_EXTENSION_FUNCTION( |
173 "fileManagerPrivateInternal.validatePathNameLength", | 178 "fileManagerPrivateInternal.validatePathNameLength", |
174 FILEMANAGERPRIVATEINTERNAL_VALIDATEPATHNAMELENGTH) | 179 FILEMANAGERPRIVATEINTERNAL_VALIDATEPATHNAMELENGTH) |
175 | 180 |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 // Called when setting a tag is completed with either a success or an error. | 335 // Called when setting a tag is completed with either a success or an error. |
331 void OnSetEntryPropertyCompleted(drive::FileError result); | 336 void OnSetEntryPropertyCompleted(drive::FileError result); |
332 | 337 |
333 ExtensionFunction::ResponseAction Run() override; | 338 ExtensionFunction::ResponseAction Run() override; |
334 DISALLOW_COPY_AND_ASSIGN(FileManagerPrivateInternalSetEntryTagFunction); | 339 DISALLOW_COPY_AND_ASSIGN(FileManagerPrivateInternalSetEntryTagFunction); |
335 }; | 340 }; |
336 | 341 |
337 } // namespace extensions | 342 } // namespace extensions |
338 | 343 |
339 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_FILE_SYST
EM_H_ | 344 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_FILE_SYST
EM_H_ |
OLD | NEW |