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

Unified Diff: sync/syncable/syncable.cc

Issue 9950137: [not for review] sync: Don't use group_restriction from ApplyUpdatesCommand. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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/syncable.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/syncable/syncable.cc
diff --git a/sync/syncable/syncable.cc b/sync/syncable/syncable.cc
index 7bf1a58629caa4a85bf5400d34d3493bfc6cd5e5..418042dd99e5ebfcda9b61aa188c090b6c35826c 100644
--- a/sync/syncable/syncable.cc
+++ b/sync/syncable/syncable.cc
@@ -1158,19 +1158,6 @@ int64 Directory::unsynced_entity_count() const {
return kernel_->unsynced_metahandles->size();
}
-FullModelTypeSet Directory::GetServerTypesWithUnappliedUpdates(
- BaseTransaction* trans) const {
- syncable::FullModelTypeSet server_types;
- ScopedKernelLock lock(this);
- for (int i = UNSPECIFIED; i < MODEL_TYPE_COUNT; ++i) {
- const ModelType type = ModelTypeFromInt(i);
- if (!kernel_->unapplied_update_metahandles[type].empty()) {
- server_types.Put(type);
- }
- }
- return server_types;
-}
-
void Directory::GetUnappliedUpdateMetaHandles(
BaseTransaction* trans,
FullModelTypeSet server_types,
@@ -1180,6 +1167,8 @@ void Directory::GetUnappliedUpdateMetaHandles(
for (int i = UNSPECIFIED; i < MODEL_TYPE_COUNT; ++i) {
const ModelType type = ModelTypeFromInt(i);
if (server_types.Has(type)) {
+ if (kernel_->unapplied_update_metahandles[type].empty())
+ continue;
std::copy(kernel_->unapplied_update_metahandles[type].begin(),
kernel_->unapplied_update_metahandles[type].end(),
back_inserter(*result));
« no previous file with comments | « sync/syncable/syncable.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698