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_GDATA_GDATA_FILE_SYSTEM_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ |
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
524 // Callback for GDataDirectoryService::MoveEntryToDirectory with | 524 // Callback for GDataDirectoryService::MoveEntryToDirectory with |
525 // FileOperationCallback. | 525 // FileOperationCallback. |
526 // |callback| must not be null. | 526 // |callback| must not be null. |
527 void OnMoveEntryToDirectoryWithFileOperationCallback( | 527 void OnMoveEntryToDirectoryWithFileOperationCallback( |
528 const FileOperationCallback& callback, | 528 const FileOperationCallback& callback, |
529 GDataFileError error, | 529 GDataFileError error, |
530 const FilePath& moved_file_path); | 530 const FilePath& moved_file_path); |
531 | 531 |
532 // Callback for GetEntryByResourceIdAsync. | 532 // Callback for GetEntryByResourceIdAsync. |
533 // Removes stale entry upon upload of file. | 533 // Removes stale entry upon upload of file. |
534 static void RemoveStaleEntryOnUpload(const std::string& resource_id, | 534 void RemoveStaleEntryOnUpload(const std::string& resource_id, |
535 GDataDirectory* parent_dir, | 535 GDataDirectory* parent_dir, |
satorux1
2012/08/10 16:14:44
indentation
achuithb
2012/08/11 00:37:45
Done.
| |
536 GDataEntry* existing_entry); | 536 GDataEntry* existing_entry); |
537 | 537 |
538 // Converts |entry_value| into GFileDocument instance and adds it | 538 // Converts |entry_value| into GFileDocument instance and adds it |
539 // to virtual file system at |directory_path|. | 539 // to virtual file system at |directory_path|. |
540 GDataFileError AddNewDirectory(const FilePath& directory_path, | 540 GDataFileError AddNewDirectory(const FilePath& directory_path, |
541 base::Value* entry_value); | 541 base::Value* entry_value); |
542 | 542 |
543 // Given non-existing |directory_path|, finds the first missing parent | 543 // Given non-existing |directory_path|, finds the first missing parent |
544 // directory of |directory_path|. | 544 // directory of |directory_path|. |
545 FindMissingDirectoryResult FindFirstMissingParentDirectory( | 545 FindMissingDirectoryResult FindFirstMissingParentDirectory( |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
734 void GetEntryInfoByResourceIdOnUIThread( | 734 void GetEntryInfoByResourceIdOnUIThread( |
735 const std::string& resource_id, | 735 const std::string& resource_id, |
736 const GetEntryInfoWithFilePathCallback& callback); | 736 const GetEntryInfoWithFilePathCallback& callback); |
737 void ReadDirectoryByPathAsyncOnUIThread( | 737 void ReadDirectoryByPathAsyncOnUIThread( |
738 const FilePath& file_path, | 738 const FilePath& file_path, |
739 const ReadDirectoryWithSettingCallback& callback); | 739 const ReadDirectoryWithSettingCallback& callback); |
740 void RequestDirectoryRefreshOnUIThread( | 740 void RequestDirectoryRefreshOnUIThread( |
741 const FilePath& file_path); | 741 const FilePath& file_path); |
742 void OnRequestDirectoryRefresh(GetDocumentsParams* params, | 742 void OnRequestDirectoryRefresh(GetDocumentsParams* params, |
743 GDataFileError error); | 743 GDataFileError error); |
744 void RequestDirectoryRefreshByEntry( | |
745 const FilePath& directory_path, | |
746 const std::string& directory_resource_id, | |
747 const FileResourceIdMap& file_map, | |
748 GDataEntry* directory_entry); | |
749 void GetAvailableSpaceOnUIThread(const GetAvailableSpaceCallback& callback); | 744 void GetAvailableSpaceOnUIThread(const GetAvailableSpaceCallback& callback); |
750 void AddUploadedFileOnUIThread(UploadMode upload_mode, | 745 void AddUploadedFileOnUIThread(UploadMode upload_mode, |
751 const FilePath& virtual_dir_path, | 746 const FilePath& virtual_dir_path, |
752 scoped_ptr<DocumentEntry> entry, | 747 scoped_ptr<DocumentEntry> entry, |
753 const FilePath& file_content_path, | 748 const FilePath& file_content_path, |
754 GDataCache::FileOperationType cache_operation, | 749 GDataCache::FileOperationType cache_operation, |
755 const base::Closure& callback); | 750 const base::Closure& callback); |
756 | 751 |
757 // Part of CopyOnUIThread(). Called after GetEntryInfoPairByPaths() is | 752 // Part of CopyOnUIThread(). Called after GetEntryInfoPairByPaths() is |
758 // complete. |callback| must not be null. | 753 // complete. |callback| must not be null. |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
849 // invalidate the weak pointers before any other members are destroyed. | 844 // invalidate the weak pointers before any other members are destroyed. |
850 base::WeakPtrFactory<GDataFileSystem> ui_weak_ptr_factory_; | 845 base::WeakPtrFactory<GDataFileSystem> ui_weak_ptr_factory_; |
851 // Unlike other classes, we need this as we need this to redirect a task | 846 // Unlike other classes, we need this as we need this to redirect a task |
852 // from IO thread to UI thread. | 847 // from IO thread to UI thread. |
853 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; | 848 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; |
854 }; | 849 }; |
855 | 850 |
856 } // namespace gdata | 851 } // namespace gdata |
857 | 852 |
858 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ | 853 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ |
OLD | NEW |