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

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

Issue 95113005: [SyncFS] Add bulk update method to MetadataDatabase (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years 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/metadata_database.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_METADATA_DATABASE_H_ 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_H_ 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 // needed. 240 // needed.
241 void UpdateByChangeList(int64 largest_change_id, 241 void UpdateByChangeList(int64 largest_change_id,
242 ScopedVector<google_apis::ChangeResource> changes, 242 ScopedVector<google_apis::ChangeResource> changes,
243 const SyncStatusCallback& callback); 243 const SyncStatusCallback& callback);
244 244
245 // Updates database by |resource|. 245 // Updates database by |resource|.
246 // Marks each tracker for modified file as dirty and adds new trackers if 246 // Marks each tracker for modified file as dirty and adds new trackers if
247 // needed. 247 // needed.
248 void UpdateByFileResource(const google_apis::FileResource& resource, 248 void UpdateByFileResource(const google_apis::FileResource& resource,
249 const SyncStatusCallback& callback); 249 const SyncStatusCallback& callback);
250 void UpdateByFileResourceList(
251 ScopedVector<google_apis::FileResource> resources,
252 const SyncStatusCallback& callback);
250 253
251 void UpdateByDeletedRemoteFile(const std::string& file_id, 254 void UpdateByDeletedRemoteFile(const std::string& file_id,
252 const SyncStatusCallback& callback); 255 const SyncStatusCallback& callback);
253 256
254 // TODO(tzik): Drop |change_id| parameter. 257 // TODO(tzik): Drop |change_id| parameter.
255 // Adds new FileTracker and FileMetadata. The database must not have 258 // Adds new FileTracker and FileMetadata. The database must not have
256 // |resource| beforehand. 259 // |resource| beforehand.
257 // The newly added tracker under |parent_tracker_id| is active and non-dirty. 260 // The newly added tracker under |parent_tracker_id| is active and non-dirty.
258 // Deactivates existing active tracker if exists that has the same title and 261 // Deactivates existing active tracker if exists that has the same title and
259 // parent_tracker to the newly added tracker. 262 // parent_tracker to the newly added tracker.
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 438
436 base::WeakPtrFactory<MetadataDatabase> weak_ptr_factory_; 439 base::WeakPtrFactory<MetadataDatabase> weak_ptr_factory_;
437 440
438 DISALLOW_COPY_AND_ASSIGN(MetadataDatabase); 441 DISALLOW_COPY_AND_ASSIGN(MetadataDatabase);
439 }; 442 };
440 443
441 } // namespace drive_backend 444 } // namespace drive_backend
442 } // namespace sync_file_system 445 } // namespace sync_file_system
443 446
444 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_H_ 447 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/drive_backend/metadata_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698