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