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_DRIVE_FILE_SYSTEM_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_FILE_SYSTEM_H_ |
6 #define CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_FILE_SYSTEM_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_FILE_SYSTEM_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 // the client side. | 482 // the client side. |
483 // |callback| must not be null. | 483 // |callback| must not be null. |
484 void MoveEntryToRootDirectoryLocally(const FileMoveCallback& callback, | 484 void MoveEntryToRootDirectoryLocally(const FileMoveCallback& callback, |
485 const FilePath& file_path, | 485 const FilePath& file_path, |
486 const FilePath& dir_path, | 486 const FilePath& dir_path, |
487 GDataErrorCode status, | 487 GDataErrorCode status, |
488 const GURL& document_url); | 488 const GURL& document_url); |
489 | 489 |
490 // Callback for DriveServiceInterface::DeleteDocument. Removes the entry with | 490 // Callback for DriveServiceInterface::DeleteDocument. Removes the entry with |
491 // |resource_id| from the local snapshot of the filesystem and the cache. | 491 // |resource_id| from the local snapshot of the filesystem and the cache. |
492 // |document_url| is unused. |callback| may be null. | 492 // |document_url| is unused. |callback| must not be null. |
493 void RemoveResourceLocally(const FileOperationCallback& callback, | 493 void RemoveResourceLocally(const FileOperationCallback& callback, |
494 const std::string& resource_id, | 494 const std::string& resource_id, |
495 GDataErrorCode status, | 495 GDataErrorCode status, |
496 const GURL& document_url); | 496 const GURL& document_url); |
497 | 497 |
498 // Callback when an entry is moved to another directory on the client side. | 498 // Callback when an entry is moved to another directory on the client side. |
499 // Notifies the directory change and runs |callback|. | 499 // Notifies the directory change and runs |callback|. |
500 // |callback| may be null. | 500 // |callback| may be null. |
501 void NotifyAndRunFileMoveCallback( | 501 void NotifyAndRunFileMoveCallback( |
502 const FileMoveCallback& callback, | 502 const FileMoveCallback& callback, |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 | 773 |
774 // Part of MoveOnUIThread(). Called after GetEntryInfoPairByPaths() is | 774 // Part of MoveOnUIThread(). Called after GetEntryInfoPairByPaths() is |
775 // complete. |callback| must not be null. | 775 // complete. |callback| must not be null. |
776 void MoveOnUIThreadAfterGetEntryInfoPair( | 776 void MoveOnUIThreadAfterGetEntryInfoPair( |
777 const FilePath& dest_file_path, | 777 const FilePath& dest_file_path, |
778 const FileOperationCallback& callback, | 778 const FileOperationCallback& callback, |
779 scoped_ptr<EntryInfoPairResult> result); | 779 scoped_ptr<EntryInfoPairResult> result); |
780 | 780 |
781 // Part of RemoveOnUIThread(). Called after GetEntryInfoByPath() is | 781 // Part of RemoveOnUIThread(). Called after GetEntryInfoByPath() is |
782 // complete. | 782 // complete. |
| 783 // |callback| must not be null. |
783 void RemoveOnUIThreadAfterGetEntryInfo( | 784 void RemoveOnUIThreadAfterGetEntryInfo( |
784 const FileOperationCallback& callback, | 785 const FileOperationCallback& callback, |
785 DriveFileError error, | 786 DriveFileError error, |
786 scoped_ptr<DriveEntryProto> entry_proto); | 787 scoped_ptr<DriveEntryProto> entry_proto); |
787 | 788 |
788 // Part of RequestDirectoryRefreshOnUIThread(). Called after | 789 // Part of RequestDirectoryRefreshOnUIThread(). Called after |
789 // GetEntryInfoByPath() is complete. | 790 // GetEntryInfoByPath() is complete. |
790 void RequestDirectoryRefreshOnUIThreadAfterGetEntryInfo( | 791 void RequestDirectoryRefreshOnUIThreadAfterGetEntryInfo( |
791 const FilePath& file_path, | 792 const FilePath& file_path, |
792 DriveFileError error, | 793 DriveFileError error, |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
858 // invalidate the weak pointers before any other members are destroyed. | 859 // invalidate the weak pointers before any other members are destroyed. |
859 base::WeakPtrFactory<DriveFileSystem> ui_weak_ptr_factory_; | 860 base::WeakPtrFactory<DriveFileSystem> ui_weak_ptr_factory_; |
860 // Unlike other classes, we need this as we need this to redirect a task | 861 // Unlike other classes, we need this as we need this to redirect a task |
861 // from IO thread to UI thread. | 862 // from IO thread to UI thread. |
862 base::WeakPtr<DriveFileSystem> ui_weak_ptr_; | 863 base::WeakPtr<DriveFileSystem> ui_weak_ptr_; |
863 }; | 864 }; |
864 | 865 |
865 } // namespace gdata | 866 } // namespace gdata |
866 | 867 |
867 #endif // CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_FILE_SYSTEM_H_ | 868 #endif // CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_FILE_SYSTEM_H_ |
OLD | NEW |