OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 FileError error, | 314 FileError error, |
315 scoped_ptr<ResourceEntry> entry); | 315 scoped_ptr<ResourceEntry> entry); |
316 void GetEntryInfoByPathAfterLoad(const base::FilePath& file_path, | 316 void GetEntryInfoByPathAfterLoad(const base::FilePath& file_path, |
317 const GetEntryInfoCallback& callback, | 317 const GetEntryInfoCallback& callback, |
318 FileError error); | 318 FileError error); |
319 void GetEntryInfoByPathAfterGetEntry2( | 319 void GetEntryInfoByPathAfterGetEntry2( |
320 const GetEntryInfoCallback& callback, | 320 const GetEntryInfoCallback& callback, |
321 FileError error, | 321 FileError error, |
322 scoped_ptr<ResourceEntry> entry); | 322 scoped_ptr<ResourceEntry> entry); |
323 | 323 |
| 324 // Loads the entry info of the children of |directory_path| to resource |
| 325 // metadata. |callback| must not be null. |
| 326 void LoadDirectoryIfNeeded(const base::FilePath& directory_path, |
| 327 const FileOperationCallback& callback); |
| 328 void LoadDirectoryIfNeededAfterGetEntry( |
| 329 const base::FilePath& directory_path, |
| 330 const FileOperationCallback& callback, |
| 331 FileError error, |
| 332 scoped_ptr<ResourceEntry> entry); |
| 333 |
324 // Part of ReadDirectoryByPath() | 334 // Part of ReadDirectoryByPath() |
325 // 1) Called when ResourceMetadata::GetEntryInfoByPath() is complete. | 335 // 1) Called when LoadDirectoryIfNeeded() is complete. |
326 // 2) Called when LoadIfNeeded() is complete. | 336 // 2) Called when ResourceMetadata::ReadDirectoryByPath() is complete. |
327 // 3) Called when ResourceMetadata::ReadDirectoryByPath() is complete. | |
328 // |callback| must not be null. | 337 // |callback| must not be null. |
329 void ReadDirectoryByPathAfterGetEntry( | |
330 const base::FilePath& directory_path, | |
331 const ReadDirectoryWithSettingCallback& callback, | |
332 FileError error, | |
333 scoped_ptr<ResourceEntry> entry); | |
334 void ReadDirectoryByPathAfterLoad( | 338 void ReadDirectoryByPathAfterLoad( |
335 const base::FilePath& directory_path, | 339 const base::FilePath& directory_path, |
336 const ReadDirectoryWithSettingCallback& callback, | 340 const ReadDirectoryWithSettingCallback& callback, |
337 FileError error); | 341 FileError error); |
338 void ReadDirectoryByPathAfterRead( | 342 void ReadDirectoryByPathAfterRead( |
339 const ReadDirectoryWithSettingCallback& callback, | 343 const ReadDirectoryWithSettingCallback& callback, |
340 FileError error, | 344 FileError error, |
341 scoped_ptr<ResourceEntryVector> entries); | 345 scoped_ptr<ResourceEntryVector> entries); |
342 | 346 |
343 // Gets the file at |file_path| from the cache (if found in the cache), | 347 // Gets the file at |file_path| from the cache (if found in the cache), |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 // Note: This should remain the last member so it'll be destroyed and | 505 // Note: This should remain the last member so it'll be destroyed and |
502 // invalidate the weak pointers before any other members are destroyed. | 506 // invalidate the weak pointers before any other members are destroyed. |
503 base::WeakPtrFactory<FileSystem> weak_ptr_factory_; | 507 base::WeakPtrFactory<FileSystem> weak_ptr_factory_; |
504 | 508 |
505 DISALLOW_COPY_AND_ASSIGN(FileSystem); | 509 DISALLOW_COPY_AND_ASSIGN(FileSystem); |
506 }; | 510 }; |
507 | 511 |
508 } // namespace drive | 512 } // namespace drive |
509 | 513 |
510 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_H_ | 514 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_H_ |
OLD | NEW |