Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer.h

Issue 330283002: [SyncFS] Replace callback with token in UploadNewFile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 const SyncStatusCallback& callback);
82 void DidGetRemoteMetadata(const std::string& file_id, 82 void DidGetRemoteMetadata(const std::string& file_id,
83 const SyncStatusCallback& callback, 83 const SyncStatusCallback& callback,
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(const SyncStatusCallback& callback, 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(const SyncStatusCallback& callback); 92 void UploadNewFile(scoped_ptr<SyncTaskToken> token);
93 void DidUploadNewFile(const SyncStatusCallback& callback, 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(const SyncStatusCallback& callback, 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 SyncEngineContext* sync_context_; // Not owned. 110 SyncEngineContext* sync_context_; // Not owned.
111 111
112 FileChange local_change_; 112 FileChange local_change_;
(...skipping 12 matching lines...) Expand all
125 125
126 base::WeakPtrFactory<LocalToRemoteSyncer> weak_ptr_factory_; 126 base::WeakPtrFactory<LocalToRemoteSyncer> weak_ptr_factory_;
127 127
128 DISALLOW_COPY_AND_ASSIGN(LocalToRemoteSyncer); 128 DISALLOW_COPY_AND_ASSIGN(LocalToRemoteSyncer);
129 }; 129 };
130 130
131 } // namespace drive_backend 131 } // namespace drive_backend
132 } // namespace sync_file_system 132 } // namespace sync_file_system
133 133
134 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_LOCAL_TO_REMOTE_SYNCER_ H_ 134 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_LOCAL_TO_REMOTE_SYNCER_ H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698