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

Unified Diff: sync/syncable/directory.cc

Issue 1035573002: [Sync] Replace AttachmentIdSet with AttachmentIdList in interfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes after Nick's feedback. Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/syncable/directory.h ('k') | sync/syncable/directory_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/syncable/directory.cc
diff --git a/sync/syncable/directory.cc b/sync/syncable/directory.cc
index 12616959984419a1c9e5cae9f412c821305460dd..30b17164a421896b2c5cc89b6d9ca59d2d3d37ed 100644
--- a/sync/syncable/directory.cc
+++ b/sync/syncable/directory.cc
@@ -1498,13 +1498,13 @@ void Directory::UnmarkDirtyEntry(WriteTransaction* trans, Entry* entry) {
void Directory::GetAttachmentIdsToUpload(BaseTransaction* trans,
ModelType type,
- AttachmentIdSet* id_set) {
+ AttachmentIdList* ids) {
// TODO(maniscalco): Maintain an index by ModelType and rewrite this method to
// use it. The approach below is likely very expensive because it iterates
// all entries (bug 415199).
DCHECK(trans);
- DCHECK(id_set);
- id_set->clear();
+ DCHECK(ids);
+ ids->clear();
AttachmentIdSet on_server_id_set;
AttachmentIdSet not_on_server_id_set;
std::vector<int64> metahandles;
@@ -1543,11 +1543,9 @@ void Directory::GetAttachmentIdsToUpload(BaseTransaction* trans,
// return.
//
// TODO(maniscalco): Eliminate redundant metadata storage (bug 415203).
- std::set_difference(not_on_server_id_set.begin(),
- not_on_server_id_set.end(),
- on_server_id_set.begin(),
- on_server_id_set.end(),
- std::inserter(*id_set, id_set->end()));
+ std::set_difference(not_on_server_id_set.begin(), not_on_server_id_set.end(),
+ on_server_id_set.begin(), on_server_id_set.end(),
+ std::back_inserter(*ids));
}
} // namespace syncable
« no previous file with comments | « sync/syncable/directory.h ('k') | sync/syncable/directory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698