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

Side by Side Diff: chrome/browser/sync_file_system/drive_file_sync_client.h

Issue 14146006: Refactoring: replace SearchInDirectory by SearchByTitle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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
OLDNEW
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_SYNC_FILE_SYSTEM_DRIVE_FILE_SYNC_CLIENT_H_ 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_FILE_SYNC_CLIENT_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_FILE_SYNC_CLIENT_H_ 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_FILE_SYNC_CLIENT_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 const std::string& title, 125 const std::string& title,
126 const ResourceIdCallback& callback, 126 const ResourceIdCallback& callback,
127 google_apis::GDataErrorCode error, 127 google_apis::GDataErrorCode error,
128 scoped_ptr<google_apis::ResourceEntry> entry); 128 scoped_ptr<google_apis::ResourceEntry> entry);
129 129
130 void DidEnsureUniquenessForCreateDirectory( 130 void DidEnsureUniquenessForCreateDirectory(
131 const ResourceIdCallback& callback, 131 const ResourceIdCallback& callback,
132 google_apis::GDataErrorCode error, 132 google_apis::GDataErrorCode error,
133 scoped_ptr<google_apis::ResourceEntry> entry); 133 scoped_ptr<google_apis::ResourceEntry> entry);
134 134
135 void SearchFilesInDirectory(const std::string& directory_resource_id, 135 void SearchByTitle(const std::string& title,
136 const std::string& search_query, 136 const std::string& directory_resource_id,
137 const ResourceListCallback& callback); 137 const ResourceListCallback& callback);
138 138
139 void DidGetAboutResource( 139 void DidGetAboutResource(
140 const ChangeStampCallback& callback, 140 const ChangeStampCallback& callback,
141 google_apis::GDataErrorCode error, 141 google_apis::GDataErrorCode error,
142 scoped_ptr<google_apis::AboutResource> about_resource); 142 scoped_ptr<google_apis::AboutResource> about_resource);
143 143
144 void DidGetResourceList( 144 void DidGetResourceList(
145 const ResourceListCallback& callback, 145 const ResourceListCallback& callback,
146 google_apis::GDataErrorCode error, 146 google_apis::GDataErrorCode error,
147 scoped_ptr<google_apis::ResourceList> resource_list); 147 scoped_ptr<google_apis::ResourceList> resource_list);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 const GDataErrorCallback& callback); 206 const GDataErrorCallback& callback);
207 void DidDeleteEntriesForEnsuringTitleUniqueness( 207 void DidDeleteEntriesForEnsuringTitleUniqueness(
208 ScopedVector<google_apis::ResourceEntry> entries, 208 ScopedVector<google_apis::ResourceEntry> entries,
209 const GDataErrorCallback& callback, 209 const GDataErrorCallback& callback,
210 google_apis::GDataErrorCode error); 210 google_apis::GDataErrorCode error);
211 211
212 UploadKey RegisterUploadCallback(const UploadFileCallback& callback); 212 UploadKey RegisterUploadCallback(const UploadFileCallback& callback);
213 UploadFileCallback GetAndUnregisterUploadCallback(UploadKey key); 213 UploadFileCallback GetAndUnregisterUploadCallback(UploadKey key);
214 void CancelAllUploads(google_apis::GDataErrorCode error); 214 void CancelAllUploads(google_apis::GDataErrorCode error);
215 215
216 static std::string FormatTitleQuery(const std::string& title);
217
218 scoped_ptr<google_apis::DriveServiceInterface> drive_service_; 216 scoped_ptr<google_apis::DriveServiceInterface> drive_service_;
219 scoped_ptr<google_apis::DriveUploaderInterface> drive_uploader_; 217 scoped_ptr<google_apis::DriveUploaderInterface> drive_uploader_;
220 google_apis::GDataWapiUrlGenerator url_generator_; 218 google_apis::GDataWapiUrlGenerator url_generator_;
221 219
222 UploadCallbackMap upload_callback_map_; 220 UploadCallbackMap upload_callback_map_;
223 UploadKey upload_next_key_; 221 UploadKey upload_next_key_;
224 222
225 ObserverList<DriveFileSyncClientObserver> observers_; 223 ObserverList<DriveFileSyncClientObserver> observers_;
226 224
227 DISALLOW_COPY_AND_ASSIGN(DriveFileSyncClient); 225 DISALLOW_COPY_AND_ASSIGN(DriveFileSyncClient);
228 }; 226 };
229 227
230 } // namespace sync_file_system 228 } // namespace sync_file_system
231 229
232 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_FILE_SYNC_CLIENT_H_ 230 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_FILE_SYNC_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698