| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SYNC_FILE_SYSTEM_DRIVE_BACKEND_LOCAL_TO_REMOTE_SYNCER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_LOCAL_TO_REMOTE_SYNCER_H_ |
| 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_LOCAL_TO_REMOTE_SYNCER_H_ | 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_LOCAL_TO_REMOTE_SYNCER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 void DidGetMD5ForUpload(scoped_ptr<SyncTaskToken> token, | 71 void DidGetMD5ForUpload(scoped_ptr<SyncTaskToken> token, |
| 72 const std::string& local_file_md5); | 72 const std::string& local_file_md5); |
| 73 void DidUploadExistingFile(scoped_ptr<SyncTaskToken> token, | 73 void DidUploadExistingFile(scoped_ptr<SyncTaskToken> token, |
| 74 google_apis::GDataErrorCode error, | 74 google_apis::GDataErrorCode error, |
| 75 const GURL&, | 75 const GURL&, |
| 76 scoped_ptr<google_apis::FileResource>); | 76 scoped_ptr<google_apis::FileResource>); |
| 77 void DidUpdateDatabaseForUploadExistingFile( | 77 void DidUpdateDatabaseForUploadExistingFile( |
| 78 scoped_ptr<SyncTaskToken> token, | 78 scoped_ptr<SyncTaskToken> token, |
| 79 SyncStatusCode status); | 79 SyncStatusCode status); |
| 80 void UpdateRemoteMetadata(const std::string& file_id, | 80 void UpdateRemoteMetadata(const std::string& file_id, |
| 81 const SyncStatusCallback& callback); | 81 scoped_ptr<SyncTaskToken> token); |
| 82 void DidGetRemoteMetadata(const std::string& file_id, | 82 void DidGetRemoteMetadata(const std::string& file_id, |
| 83 const SyncStatusCallback& callback, | 83 scoped_ptr<SyncTaskToken> token, |
| 84 google_apis::GDataErrorCode error, | 84 google_apis::GDataErrorCode error, |
| 85 scoped_ptr<google_apis::FileResource> entry); | 85 scoped_ptr<google_apis::FileResource> entry); |
| 86 | 86 |
| 87 void DidDeleteForUploadNewFile(scoped_ptr<SyncTaskToken> token, | 87 void DidDeleteForUploadNewFile(scoped_ptr<SyncTaskToken> token, |
| 88 SyncStatusCode status); | 88 SyncStatusCode status); |
| 89 void DidDeleteForCreateFolder(scoped_ptr<SyncTaskToken> token, | 89 void DidDeleteForCreateFolder(scoped_ptr<SyncTaskToken> token, |
| 90 SyncStatusCode status); | 90 SyncStatusCode status); |
| 91 | 91 |
| 92 void UploadNewFile(scoped_ptr<SyncTaskToken> token); | 92 void UploadNewFile(scoped_ptr<SyncTaskToken> token); |
| 93 void DidUploadNewFile(scoped_ptr<SyncTaskToken> token, | 93 void DidUploadNewFile(scoped_ptr<SyncTaskToken> token, |
| 94 google_apis::GDataErrorCode error, | 94 google_apis::GDataErrorCode error, |
| 95 const GURL& upload_location, | 95 const GURL& upload_location, |
| 96 scoped_ptr<google_apis::FileResource> entry); | 96 scoped_ptr<google_apis::FileResource> entry); |
| 97 | 97 |
| 98 void CreateRemoteFolder(scoped_ptr<SyncTaskToken> token); | 98 void CreateRemoteFolder(scoped_ptr<SyncTaskToken> token); |
| 99 void DidCreateRemoteFolder(scoped_ptr<SyncTaskToken> token, | 99 void DidCreateRemoteFolder(scoped_ptr<SyncTaskToken> token, |
| 100 const std::string& file_id, | 100 const std::string& file_id, |
| 101 SyncStatusCode status); | 101 SyncStatusCode status); |
| 102 void DidDetachResourceForCreationConflict(scoped_ptr<SyncTaskToken> token, | 102 void DidDetachResourceForCreationConflict(scoped_ptr<SyncTaskToken> token, |
| 103 google_apis::GDataErrorCode error); | 103 google_apis::GDataErrorCode error); |
| 104 | 104 |
| 105 bool IsContextReady(); | 105 bool IsContextReady(); |
| 106 drive::DriveServiceInterface* drive_service(); | 106 drive::DriveServiceInterface* drive_service(); |
| 107 drive::DriveUploaderInterface* drive_uploader(); | 107 drive::DriveUploaderInterface* drive_uploader(); |
| 108 MetadataDatabase* metadata_database(); | 108 MetadataDatabase* metadata_database(); |
| 109 | 109 |
| 110 void CompleteWithRetryStatus(scoped_ptr<SyncTaskToken> token, |
| 111 SyncStatusCode status); |
| 112 |
| 110 SyncEngineContext* sync_context_; // Not owned. | 113 SyncEngineContext* sync_context_; // Not owned. |
| 111 | 114 |
| 112 FileChange local_change_; | 115 FileChange local_change_; |
| 113 bool local_is_missing_; | 116 bool local_is_missing_; |
| 114 base::FilePath local_path_; | 117 base::FilePath local_path_; |
| 115 fileapi::FileSystemURL url_; | 118 fileapi::FileSystemURL url_; |
| 116 SyncAction sync_action_; | 119 SyncAction sync_action_; |
| 117 | 120 |
| 118 scoped_ptr<FileTracker> remote_file_tracker_; | 121 scoped_ptr<FileTracker> remote_file_tracker_; |
| 119 scoped_ptr<FileTracker> remote_parent_folder_tracker_; | 122 scoped_ptr<FileTracker> remote_parent_folder_tracker_; |
| 120 base::FilePath target_path_; | 123 base::FilePath target_path_; |
| 121 | 124 |
| 122 bool needs_remote_change_listing_; | 125 bool needs_remote_change_listing_; |
| 123 | 126 |
| 124 scoped_ptr<FolderCreator> folder_creator_; | 127 scoped_ptr<FolderCreator> folder_creator_; |
| 125 | 128 |
| 126 base::WeakPtrFactory<LocalToRemoteSyncer> weak_ptr_factory_; | 129 base::WeakPtrFactory<LocalToRemoteSyncer> weak_ptr_factory_; |
| 127 | 130 |
| 128 DISALLOW_COPY_AND_ASSIGN(LocalToRemoteSyncer); | 131 DISALLOW_COPY_AND_ASSIGN(LocalToRemoteSyncer); |
| 129 }; | 132 }; |
| 130 | 133 |
| 131 } // namespace drive_backend | 134 } // namespace drive_backend |
| 132 } // namespace sync_file_system | 135 } // namespace sync_file_system |
| 133 | 136 |
| 134 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_LOCAL_TO_REMOTE_SYNCER_
H_ | 137 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_LOCAL_TO_REMOTE_SYNCER_
H_ |
| OLD | NEW |