| 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 GetDocumentsParams* params, | 190 GetDocumentsParams* params, |
| 191 GDataFileError error); | 191 GDataFileError error); |
| 192 | 192 |
| 193 // Part of TransferFileFromLocalToRemote(). Called after | 193 // Part of TransferFileFromLocalToRemote(). Called after |
| 194 // GetEntryInfoByPath() is complete. | 194 // GetEntryInfoByPath() is complete. |
| 195 void TransferFileFromLocalToRemoteAfterGetEntryInfo( | 195 void TransferFileFromLocalToRemoteAfterGetEntryInfo( |
| 196 const FilePath& local_src_file_path, | 196 const FilePath& local_src_file_path, |
| 197 const FilePath& remote_dest_file_path, | 197 const FilePath& remote_dest_file_path, |
| 198 const FileOperationCallback& callback, | 198 const FileOperationCallback& callback, |
| 199 GDataFileError error, | 199 GDataFileError error, |
| 200 scoped_ptr<GDataEntryProto> entry_proto); | 200 scoped_ptr<DriveEntryProto> entry_proto); |
| 201 | 201 |
| 202 // Initiates transfer of |local_file_path| with |resource_id| to | 202 // Initiates transfer of |local_file_path| with |resource_id| to |
| 203 // |remote_dest_file_path|. |local_file_path| must be a file from the local | 203 // |remote_dest_file_path|. |local_file_path| must be a file from the local |
| 204 // file system, |remote_dest_file_path| is the virtual destination path within | 204 // file system, |remote_dest_file_path| is the virtual destination path within |
| 205 // gdata file system. If |resource_id| is a non-empty string, the transfer is | 205 // gdata file system. If |resource_id| is a non-empty string, the transfer is |
| 206 // handled by CopyDocumentToDirectory. Otherwise, the transfer is handled by | 206 // handled by CopyDocumentToDirectory. Otherwise, the transfer is handled by |
| 207 // TransferRegularFile. | 207 // TransferRegularFile. |
| 208 // | 208 // |
| 209 // Must be called from *UI* thread. |callback| is run on the calling thread. | 209 // Must be called from *UI* thread. |callback| is run on the calling thread. |
| 210 // |callback| must not be null. | 210 // |callback| must not be null. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 227 // First, FindEntryByPathAsyncOnUIThread is called and the result is returned | 227 // First, FindEntryByPathAsyncOnUIThread is called and the result is returned |
| 228 // to OnGetEntryInfoForCreateFile. By using the information, CreateFile deals | 228 // to OnGetEntryInfoForCreateFile. By using the information, CreateFile deals |
| 229 // with the cases when an entry already existed at the path. If there was no | 229 // with the cases when an entry already existed at the path. If there was no |
| 230 // entry, a new empty file is uploaded, and when it finishes | 230 // entry, a new empty file is uploaded, and when it finishes |
| 231 // DidUploadForCreateBrandNewFile does the final clean up. | 231 // DidUploadForCreateBrandNewFile does the final clean up. |
| 232 // |callback| must not be null. | 232 // |callback| must not be null. |
| 233 void OnGetEntryInfoForCreateFile(const FilePath& file_path, | 233 void OnGetEntryInfoForCreateFile(const FilePath& file_path, |
| 234 bool is_exclusive, | 234 bool is_exclusive, |
| 235 const FileOperationCallback& callback, | 235 const FileOperationCallback& callback, |
| 236 GDataFileError result, | 236 GDataFileError result, |
| 237 scoped_ptr<GDataEntryProto> entry_proto); | 237 scoped_ptr<DriveEntryProto> entry_proto); |
| 238 void DoUploadForCreateBrandNewFile(const FilePath& remote_path, | 238 void DoUploadForCreateBrandNewFile(const FilePath& remote_path, |
| 239 FilePath* local_path, | 239 FilePath* local_path, |
| 240 const FileOperationCallback& callback); | 240 const FileOperationCallback& callback); |
| 241 void DidUploadForCreateBrandNewFile(const FilePath& local_path, | 241 void DidUploadForCreateBrandNewFile(const FilePath& local_path, |
| 242 const FileOperationCallback& callback, | 242 const FileOperationCallback& callback, |
| 243 GDataFileError result); | 243 GDataFileError result); |
| 244 | 244 |
| 245 // Invoked upon completion of GetEntryInfoByPath initiated by | 245 // Invoked upon completion of GetEntryInfoByPath initiated by |
| 246 // GetFileByPath. It then continues to invoke GetResolvedFileByPath. | 246 // GetFileByPath. It then continues to invoke GetResolvedFileByPath. |
| 247 void OnGetEntryInfoCompleteForGetFileByPath( | 247 void OnGetEntryInfoCompleteForGetFileByPath( |
| 248 const FilePath& file_path, | 248 const FilePath& file_path, |
| 249 const GetFileCallback& get_file_callback, | 249 const GetFileCallback& get_file_callback, |
| 250 const GetContentCallback& get_content_callback, | 250 const GetContentCallback& get_content_callback, |
| 251 GDataFileError error, | 251 GDataFileError error, |
| 252 scoped_ptr<GDataEntryProto> file_info); | 252 scoped_ptr<DriveEntryProto> file_info); |
| 253 | 253 |
| 254 // Invoked upon completion of GetEntryInfoByPath initiated by OpenFile. | 254 // Invoked upon completion of GetEntryInfoByPath initiated by OpenFile. |
| 255 // It then continues to invoke GetResolvedFileByPath and proceeds to | 255 // It then continues to invoke GetResolvedFileByPath and proceeds to |
| 256 // OnGetFileCompleteForOpenFile. | 256 // OnGetFileCompleteForOpenFile. |
| 257 void OnGetEntryInfoCompleteForOpenFile( | 257 void OnGetEntryInfoCompleteForOpenFile( |
| 258 const FilePath& file_path, | 258 const FilePath& file_path, |
| 259 const OpenFileCallback& callback, | 259 const OpenFileCallback& callback, |
| 260 GDataFileError error, | 260 GDataFileError error, |
| 261 scoped_ptr<GDataEntryProto> file_info); | 261 scoped_ptr<DriveEntryProto> file_info); |
| 262 | 262 |
| 263 // Invoked at the last step of OpenFile. It removes |file_path| from the | 263 // Invoked at the last step of OpenFile. It removes |file_path| from the |
| 264 // current set of opened files if |result| is an error, and then invokes the | 264 // current set of opened files if |result| is an error, and then invokes the |
| 265 // |callback| function. | 265 // |callback| function. |
| 266 void OnOpenFileFinished(const FilePath& file_path, | 266 void OnOpenFileFinished(const FilePath& file_path, |
| 267 const OpenFileCallback& callback, | 267 const OpenFileCallback& callback, |
| 268 GDataFileError result, | 268 GDataFileError result, |
| 269 const FilePath& cache_file_path); | 269 const FilePath& cache_file_path); |
| 270 | 270 |
| 271 // Invoked during the process of CloseFile. What is done here is as follows: | 271 // Invoked during the process of CloseFile. What is done here is as follows: |
| 272 // 1) Gets resource_id and md5 of the entry at |file_path|. | 272 // 1) Gets resource_id and md5 of the entry at |file_path|. |
| 273 // 2) Commits the modification to the cache system. | 273 // 2) Commits the modification to the cache system. |
| 274 // 3) Removes the |file_path| from the remembered set of opened files. | 274 // 3) Removes the |file_path| from the remembered set of opened files. |
| 275 // 4) Invokes the user-supplied |callback|. | 275 // 4) Invokes the user-supplied |callback|. |
| 276 // |callback| must not be null. | 276 // |callback| must not be null. |
| 277 void CloseFileOnUIThreadAfterGetEntryInfo( | 277 void CloseFileOnUIThreadAfterGetEntryInfo( |
| 278 const FilePath& file_path, | 278 const FilePath& file_path, |
| 279 const FileOperationCallback& callback, | 279 const FileOperationCallback& callback, |
| 280 GDataFileError error, | 280 GDataFileError error, |
| 281 scoped_ptr<GDataEntryProto> entry_proto); | 281 scoped_ptr<DriveEntryProto> entry_proto); |
| 282 void CloseFileOnUIThreadAfterCommitDirtyInCache( | 282 void CloseFileOnUIThreadAfterCommitDirtyInCache( |
| 283 const FileOperationCallback& callback, | 283 const FileOperationCallback& callback, |
| 284 GDataFileError error, | 284 GDataFileError error, |
| 285 const std::string& resource_id, | 285 const std::string& resource_id, |
| 286 const std::string& md5); | 286 const std::string& md5); |
| 287 void CloseFileOnUIThreadFinalize(const FilePath& file_path, | 287 void CloseFileOnUIThreadFinalize(const FilePath& file_path, |
| 288 const FileOperationCallback& callback, | 288 const FileOperationCallback& callback, |
| 289 GDataFileError result); | 289 GDataFileError result); |
| 290 | 290 |
| 291 // Invoked upon completion of GetFileByPath initiated by Copy. If | 291 // Invoked upon completion of GetFileByPath initiated by Copy. If |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 // |callback| must not be null. | 348 // |callback| must not be null. |
| 349 void Rename(const FilePath& file_path, | 349 void Rename(const FilePath& file_path, |
| 350 const FilePath::StringType& new_name, | 350 const FilePath::StringType& new_name, |
| 351 const FileMoveCallback& callback); | 351 const FileMoveCallback& callback); |
| 352 | 352 |
| 353 // Part of Rename(). Called after GetEntryInfoByPath() is complete. | 353 // Part of Rename(). Called after GetEntryInfoByPath() is complete. |
| 354 void RenameAfterGetEntryInfo(const FilePath& file_path, | 354 void RenameAfterGetEntryInfo(const FilePath& file_path, |
| 355 const FilePath::StringType& new_name, | 355 const FilePath::StringType& new_name, |
| 356 const FileMoveCallback& callback, | 356 const FileMoveCallback& callback, |
| 357 GDataFileError error, | 357 GDataFileError error, |
| 358 scoped_ptr<GDataEntryProto> entry_proto); | 358 scoped_ptr<DriveEntryProto> entry_proto); |
| 359 | 359 |
| 360 // Moves a file or directory at |file_path| in the root directory to | 360 // Moves a file or directory at |file_path| in the root directory to |
| 361 // another directory at |dir_path|. This function does nothing if | 361 // another directory at |dir_path|. This function does nothing if |
| 362 // |dir_path| points to the root directory. | 362 // |dir_path| points to the root directory. |
| 363 // | 363 // |
| 364 // Can be called from UI thread. |callback| is run on the calling thread. | 364 // Can be called from UI thread. |callback| is run on the calling thread. |
| 365 // |callback| must not be null. | 365 // |callback| must not be null. |
| 366 void MoveEntryFromRootDirectory(const FilePath& dir_path, | 366 void MoveEntryFromRootDirectory(const FilePath& dir_path, |
| 367 const FileOperationCallback& callback, | 367 const FileOperationCallback& callback, |
| 368 GDataFileError error, | 368 GDataFileError error, |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 // Callback for handling file downloading requests. | 458 // Callback for handling file downloading requests. |
| 459 void OnFileDownloaded(const GetFileFromCacheParams& params, | 459 void OnFileDownloaded(const GetFileFromCacheParams& params, |
| 460 GDataErrorCode status, | 460 GDataErrorCode status, |
| 461 const GURL& content_url, | 461 const GURL& content_url, |
| 462 const FilePath& downloaded_file_path); | 462 const FilePath& downloaded_file_path); |
| 463 | 463 |
| 464 // Unpins file if cache entry is pinned. | 464 // Unpins file if cache entry is pinned. |
| 465 void UnpinIfPinned(const std::string& resource_id, | 465 void UnpinIfPinned(const std::string& resource_id, |
| 466 const std::string& md5, | 466 const std::string& md5, |
| 467 bool success, | 467 bool success, |
| 468 const GDataCacheEntry& cache_entry); | 468 const DriveCacheEntry& cache_entry); |
| 469 | 469 |
| 470 // Similar to OnFileDownloaded() but takes |has_enough_space| so we report | 470 // Similar to OnFileDownloaded() but takes |has_enough_space| so we report |
| 471 // an error in case we don't have enough disk space. | 471 // an error in case we don't have enough disk space. |
| 472 void OnFileDownloadedAndSpaceChecked(const GetFileFromCacheParams& params, | 472 void OnFileDownloadedAndSpaceChecked(const GetFileFromCacheParams& params, |
| 473 GDataErrorCode status, | 473 GDataErrorCode status, |
| 474 const GURL& content_url, | 474 const GURL& content_url, |
| 475 const FilePath& downloaded_file_path, | 475 const FilePath& downloaded_file_path, |
| 476 bool* has_enough_space); | 476 bool* has_enough_space); |
| 477 | 477 |
| 478 // Callback for handling internal StoreToCache() calls after downloading | 478 // Callback for handling internal StoreToCache() calls after downloading |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 int64* file_size, | 579 int64* file_size, |
| 580 std::string* content_type); | 580 std::string* content_type); |
| 581 | 581 |
| 582 // Part of StartFileUploadOnUIThread(). Called after GetEntryInfoByPath() | 582 // Part of StartFileUploadOnUIThread(). Called after GetEntryInfoByPath() |
| 583 // is complete. | 583 // is complete. |
| 584 void StartFileUploadOnUIThreadAfterGetEntryInfo( | 584 void StartFileUploadOnUIThreadAfterGetEntryInfo( |
| 585 const StartFileUploadParams& params, | 585 const StartFileUploadParams& params, |
| 586 int64 file_size, | 586 int64 file_size, |
| 587 std::string content_type, | 587 std::string content_type, |
| 588 GDataFileError error, | 588 GDataFileError error, |
| 589 scoped_ptr<GDataEntryProto> entry_proto); | 589 scoped_ptr<DriveEntryProto> entry_proto); |
| 590 | 590 |
| 591 // Cache intermediate callbacks, that run on calling thread, for above cache | 591 // Cache intermediate callbacks, that run on calling thread, for above cache |
| 592 // tasks that were run on blocking pool. | 592 // tasks that were run on blocking pool. |
| 593 | 593 |
| 594 // Helper function for internally handling responses from | 594 // Helper function for internally handling responses from |
| 595 // GetFileFromCacheByResourceIdAndMd5() calls during processing of | 595 // GetFileFromCacheByResourceIdAndMd5() calls during processing of |
| 596 // GetFileByPath() request. | 596 // GetFileByPath() request. |
| 597 void OnGetFileFromCache(const GetFileFromCacheParams& params, | 597 void OnGetFileFromCache(const GetFileFromCacheParams& params, |
| 598 GDataFileError error, | 598 GDataFileError error, |
| 599 const std::string& resource_id, | 599 const std::string& resource_id, |
| (...skipping 28 matching lines...) Expand all Loading... |
| 628 // 1) Called when the feed is loaded. | 628 // 1) Called when the feed is loaded. |
| 629 // 2) Called when an entry is found. | 629 // 2) Called when an entry is found. |
| 630 // |callback| must not be null. | 630 // |callback| must not be null. |
| 631 void GetEntryInfoByPathOnUIThreadAfterLoad( | 631 void GetEntryInfoByPathOnUIThreadAfterLoad( |
| 632 const FilePath& file_path, | 632 const FilePath& file_path, |
| 633 const GetEntryInfoCallback& callback, | 633 const GetEntryInfoCallback& callback, |
| 634 GDataFileError error); | 634 GDataFileError error); |
| 635 void GetEntryInfoByPathOnUIThreadAfterGetEntry( | 635 void GetEntryInfoByPathOnUIThreadAfterGetEntry( |
| 636 const GetEntryInfoCallback& callback, | 636 const GetEntryInfoCallback& callback, |
| 637 GDataFileError error, | 637 GDataFileError error, |
| 638 scoped_ptr<GDataEntryProto> entry_proto); | 638 scoped_ptr<DriveEntryProto> entry_proto); |
| 639 | 639 |
| 640 // Part of ReadDirectoryByPathOnUIThread() | 640 // Part of ReadDirectoryByPathOnUIThread() |
| 641 // 1) Called when the feed is loaded. | 641 // 1) Called when the feed is loaded. |
| 642 // 2) Called when an entry is found. | 642 // 2) Called when an entry is found. |
| 643 // |callback| must not be null. | 643 // |callback| must not be null. |
| 644 void ReadDirectoryByPathOnUIThreadAfterLoad( | 644 void ReadDirectoryByPathOnUIThreadAfterLoad( |
| 645 const FilePath& file_path, | 645 const FilePath& file_path, |
| 646 const ReadDirectoryWithSettingCallback& callback, | 646 const ReadDirectoryWithSettingCallback& callback, |
| 647 GDataFileError error); | 647 GDataFileError error); |
| 648 void ReadDirectoryByPathOnUIThreadAfterRead( | 648 void ReadDirectoryByPathOnUIThreadAfterRead( |
| 649 const ReadDirectoryWithSettingCallback& callback, | 649 const ReadDirectoryWithSettingCallback& callback, |
| 650 GDataFileError error, | 650 GDataFileError error, |
| 651 scoped_ptr<GDataEntryProtoVector> entries); | 651 scoped_ptr<DriveEntryProtoVector> entries); |
| 652 | 652 |
| 653 // Loads the feed from the cache or the server if not yet loaded. Runs | 653 // Loads the feed from the cache or the server if not yet loaded. Runs |
| 654 // |callback| upon the completion with the error code. | 654 // |callback| upon the completion with the error code. |
| 655 // |callback| must not be null. | 655 // |callback| must not be null. |
| 656 void LoadFeedIfNeeded(const FileOperationCallback& callback); | 656 void LoadFeedIfNeeded(const FileOperationCallback& callback); |
| 657 | 657 |
| 658 // Gets |file_path| from the file system after the file info is already | 658 // Gets |file_path| from the file system after the file info is already |
| 659 // resolved with GetEntryInfoByPath(). This function is called by | 659 // resolved with GetEntryInfoByPath(). This function is called by |
| 660 // OnGetEntryInfoCompleteForGetFileByPath and | 660 // OnGetEntryInfoCompleteForGetFileByPath and |
| 661 // OnGetEntryInfoCompleteForOpenFile. | 661 // OnGetEntryInfoCompleteForOpenFile. |
| 662 void GetResolvedFileByPath( | 662 void GetResolvedFileByPath( |
| 663 const FilePath& file_path, | 663 const FilePath& file_path, |
| 664 const GetFileCallback& get_file_callback, | 664 const GetFileCallback& get_file_callback, |
| 665 const GetContentCallback& get_content_callback, | 665 const GetContentCallback& get_content_callback, |
| 666 GDataFileError error, | 666 GDataFileError error, |
| 667 const GDataEntryProto* entry_proto); | 667 const DriveEntryProto* entry_proto); |
| 668 | 668 |
| 669 // Called when GDataCache::GetFileOnUIThread() is completed for | 669 // Called when GDataCache::GetFileOnUIThread() is completed for |
| 670 // UpdateFileByResourceId(). | 670 // UpdateFileByResourceId(). |
| 671 void OnGetFileCompleteForUpdateFile(const FileOperationCallback& callback, | 671 void OnGetFileCompleteForUpdateFile(const FileOperationCallback& callback, |
| 672 GDataFileError error, | 672 GDataFileError error, |
| 673 const std::string& resource_id, | 673 const std::string& resource_id, |
| 674 const std::string& md5, | 674 const std::string& md5, |
| 675 const FilePath& cache_file_path); | 675 const FilePath& cache_file_path); |
| 676 | 676 |
| 677 // Callback for getting the size of the cache file in the blocking pool. | 677 // Callback for getting the size of the cache file in the blocking pool. |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 const FileOperationCallback& callback, | 779 const FileOperationCallback& callback, |
| 780 scoped_ptr<EntryInfoPairResult> result); | 780 scoped_ptr<EntryInfoPairResult> result); |
| 781 | 781 |
| 782 // Part of RemoveOnUIThread(). Called after GetEntryInfoByPath() is | 782 // Part of RemoveOnUIThread(). Called after GetEntryInfoByPath() is |
| 783 // complete. | 783 // complete. |
| 784 void RemoveOnUIThreadAfterGetEntryInfo( | 784 void RemoveOnUIThreadAfterGetEntryInfo( |
| 785 const FilePath& file_path, | 785 const FilePath& file_path, |
| 786 bool is_recursive, | 786 bool is_recursive, |
| 787 const FileOperationCallback& callback, | 787 const FileOperationCallback& callback, |
| 788 GDataFileError error, | 788 GDataFileError error, |
| 789 scoped_ptr<GDataEntryProto> entry_proto); | 789 scoped_ptr<DriveEntryProto> entry_proto); |
| 790 | 790 |
| 791 // Part of RequestDirectoryRefreshOnUIThread(). Called after | 791 // Part of RequestDirectoryRefreshOnUIThread(). Called after |
| 792 // GetEntryInfoByPath() is complete. | 792 // GetEntryInfoByPath() is complete. |
| 793 void RequestDirectoryRefreshOnUIThreadAfterGetEntryInfo( | 793 void RequestDirectoryRefreshOnUIThreadAfterGetEntryInfo( |
| 794 const FilePath& file_path, | 794 const FilePath& file_path, |
| 795 GDataFileError error, | 795 GDataFileError error, |
| 796 scoped_ptr<GDataEntryProto> entry_proto); | 796 scoped_ptr<DriveEntryProto> entry_proto); |
| 797 | 797 |
| 798 // Part of GetEntryByResourceId and GetEntryByPath. Checks whether there is a | 798 // Part of GetEntryByResourceId and GetEntryByPath. Checks whether there is a |
| 799 // local dirty cache for the entry, and if there is, replace the | 799 // local dirty cache for the entry, and if there is, replace the |
| 800 // PlatformFileInfo part of the |entry_proto| with the locally modified info. | 800 // PlatformFileInfo part of the |entry_proto| with the locally modified info. |
| 801 // |callback| must not be null. | 801 // |callback| must not be null. |
| 802 void CheckLocalModificationAndRun(scoped_ptr<GDataEntryProto> entry_proto, | 802 void CheckLocalModificationAndRun(scoped_ptr<DriveEntryProto> entry_proto, |
| 803 const GetEntryInfoCallback& callback); | 803 const GetEntryInfoCallback& callback); |
| 804 void CheckLocalModificationAndRunAfterGetCacheEntry( | 804 void CheckLocalModificationAndRunAfterGetCacheEntry( |
| 805 scoped_ptr<GDataEntryProto> entry_proto, | 805 scoped_ptr<DriveEntryProto> entry_proto, |
| 806 const GetEntryInfoCallback& callback, | 806 const GetEntryInfoCallback& callback, |
| 807 bool success, | 807 bool success, |
| 808 const GDataCacheEntry& cache_entry); | 808 const DriveCacheEntry& cache_entry); |
| 809 void CheckLocalModificationAndRunAfterGetCacheFile( | 809 void CheckLocalModificationAndRunAfterGetCacheFile( |
| 810 scoped_ptr<GDataEntryProto> entry_proto, | 810 scoped_ptr<DriveEntryProto> entry_proto, |
| 811 const GetEntryInfoCallback& callback, | 811 const GetEntryInfoCallback& callback, |
| 812 GDataFileError error, | 812 GDataFileError error, |
| 813 const std::string& resource_id, | 813 const std::string& resource_id, |
| 814 const std::string& md5, | 814 const std::string& md5, |
| 815 const FilePath& local_cache_path); | 815 const FilePath& local_cache_path); |
| 816 void CheckLocalModificationAndRunAfterGetFileInfo( | 816 void CheckLocalModificationAndRunAfterGetFileInfo( |
| 817 scoped_ptr<GDataEntryProto> entry_proto, | 817 scoped_ptr<DriveEntryProto> entry_proto, |
| 818 const GetEntryInfoCallback& callback, | 818 const GetEntryInfoCallback& callback, |
| 819 base::PlatformFileInfo* file_info, | 819 base::PlatformFileInfo* file_info, |
| 820 bool* get_file_info_result); | 820 bool* get_file_info_result); |
| 821 | 821 |
| 822 // All members should be accessed only on UI thread. Do not post tasks to | 822 // All members should be accessed only on UI thread. Do not post tasks to |
| 823 // other threads with base::Unretained(this). | 823 // other threads with base::Unretained(this). |
| 824 scoped_ptr<GDataDirectoryService> directory_service_; | 824 scoped_ptr<GDataDirectoryService> directory_service_; |
| 825 | 825 |
| 826 // The profile hosts the GDataFileSystem via GDataSystemService. | 826 // The profile hosts the GDataFileSystem via GDataSystemService. |
| 827 Profile* profile_; | 827 Profile* profile_; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 861 // invalidate the weak pointers before any other members are destroyed. | 861 // invalidate the weak pointers before any other members are destroyed. |
| 862 base::WeakPtrFactory<GDataFileSystem> ui_weak_ptr_factory_; | 862 base::WeakPtrFactory<GDataFileSystem> ui_weak_ptr_factory_; |
| 863 // Unlike other classes, we need this as we need this to redirect a task | 863 // Unlike other classes, we need this as we need this to redirect a task |
| 864 // from IO thread to UI thread. | 864 // from IO thread to UI thread. |
| 865 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; | 865 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; |
| 866 }; | 866 }; |
| 867 | 867 |
| 868 } // namespace gdata | 868 } // namespace gdata |
| 869 | 869 |
| 870 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ | 870 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ |
| OLD | NEW |