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

Unified Diff: components/sync/driver/resources/about.js

Issue 2666023002: [Sync] Fix USS type status counters. (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | components/sync/engine_impl/cycle/non_blocking_type_debug_info_emitter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/driver/resources/about.js
diff --git a/components/sync/driver/resources/about.js b/components/sync/driver/resources/about.js
index f562c80cad194f0414c760751ccc173703e742fe..cebf496e805b3cc336daad67a1436d9fb3776d23 100644
--- a/components/sync/driver/resources/about.js
+++ b/components/sync/driver/resources/about.js
@@ -41,8 +41,14 @@ cr.define('chrome.sync.about_tab', function() {
var type_status_array = chrome.sync.aboutInfo.type_status;
type_status_array.forEach(function(row) {
if (row.name == modelType) {
- row.num_entries = counters.numEntriesAndTombstones;
- row.num_live = counters.numEntries;
+ // There are three types of counters, only "status" counters have these
+ // fields. Keep the old values if updated fields are not present.
+ if (counters.numEntriesAndTombstones) {
+ row.num_entries = counters.numEntriesAndTombstones;
+ }
+ if (counters.numEntries) {
+ row.num_live = counters.numEntries;
+ }
}
});
jstProcess(
« no previous file with comments | « no previous file | components/sync/engine_impl/cycle/non_blocking_type_debug_info_emitter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698