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

Unified Diff: sync/syncable/directory.cc

Issue 72403003: sync: Per-type update application (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + fix typo 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/syncable/directory.h ('k') | sync/test/engine/syncer_command_test.h » ('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 85e5107a19e81363da065043b374eca8163000e8..33b7e15be6cbd41170167848665f776c45dcbc57 100644
--- a/sync/syncable/directory.cc
+++ b/sync/syncable/directory.cc
@@ -910,17 +910,9 @@ int64 Directory::unsynced_entity_count() const {
return kernel_->unsynced_metahandles.size();
}
-FullModelTypeSet Directory::GetServerTypesWithUnappliedUpdates(
- BaseTransaction* trans) const {
- FullModelTypeSet server_types;
+bool Directory::TypeHasUnappliedUpdates(ModelType type) {
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;
+ return !kernel_->unapplied_update_metahandles[type].empty();
}
void Directory::GetUnappliedUpdateMetaHandles(
« no previous file with comments | « sync/syncable/directory.h ('k') | sync/test/engine/syncer_command_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698