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

Unified Diff: sync/syncable/directory_backing_store.cc

Issue 1554443002: [Sync] ModelTypeCount UMA doesn't include server-side only unapplied entries (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: start from 0 Created 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/syncable/directory_backing_store.cc
diff --git a/sync/syncable/directory_backing_store.cc b/sync/syncable/directory_backing_store.cc
index 11355e404324621b07c2f1069e175cd27bb593a3..c5f1fd5c096fa5298a7acf7054a3b29284b68c38 100644
--- a/sync/syncable/directory_backing_store.cc
+++ b/sync/syncable/directory_backing_store.cc
@@ -656,7 +656,7 @@ bool DirectoryBackingStore::LoadEntries(Directory::MetahandlesMap* handles_map,
select.append(" FROM metas");
int total_specifics_copies = 0;
int model_type_entry_count[MODEL_TYPE_COUNT];
- for (int i = FIRST_REAL_MODEL_TYPE; i < MODEL_TYPE_COUNT; ++i) {
+ for (int i = 0; i < MODEL_TYPE_COUNT; ++i) {
model_type_entry_count[i] = 0;
}
@@ -672,7 +672,11 @@ bool DirectoryBackingStore::LoadEntries(Directory::MetahandlesMap* handles_map,
if (SafeToPurgeOnLoading(*kernel)) {
metahandles_to_purge->insert(handle);
} else {
- ++model_type_entry_count[kernel->GetModelType()];
+ ModelType model_type = kernel->GetModelType();
+ if (!IsRealDataType(model_type)) {
+ model_type = kernel->GetServerModelType();
+ }
+ ++model_type_entry_count[model_type];
(*handles_map)[handle] = kernel.release();
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698