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

Side by Side Diff: chrome/browser/sync/about_sync_util.cc

Issue 10991005: Added nudge source counters to about:sync. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed indentation Created 8 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | sync/engine/all_status.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/sync/about_sync_util.h" 5 #include "chrome/browser/sync/about_sync_util.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 IntSyncStat server_conflicts(section_this_cycle, "Server Conflicts"); 246 IntSyncStat server_conflicts(section_this_cycle, "Server Conflicts");
247 IntSyncStat committed_items(section_this_cycle, "Committed Items"); 247 IntSyncStat committed_items(section_this_cycle, "Committed Items");
248 IntSyncStat updates_remaining(section_this_cycle, "Updates Remaining"); 248 IntSyncStat updates_remaining(section_this_cycle, "Updates Remaining");
249 249
250 ListValue* section_that_cycle = AddSection( 250 ListValue* section_that_cycle = AddSection(
251 stats_list, "Transient Counters (last cycle of last completed session)"); 251 stats_list, "Transient Counters (last cycle of last completed session)");
252 IntSyncStat updates_downloaded(section_that_cycle, "Updates Downloaded"); 252 IntSyncStat updates_downloaded(section_that_cycle, "Updates Downloaded");
253 IntSyncStat committed_count(section_that_cycle, "Committed Count"); 253 IntSyncStat committed_count(section_that_cycle, "Committed Count");
254 IntSyncStat entries(section_that_cycle, "Entries"); 254 IntSyncStat entries(section_that_cycle, "Entries");
255 255
256 ListValue* section_nudge_info = AddSection(
257 stats_list, "Nudge Source Counters");
258 IntSyncStat nudge_source_notification(
259 section_nudge_info, "Server Invalidations");
260 IntSyncStat nudge_source_local(section_nudge_info, "Local Changes");
261 IntSyncStat nudge_source_continuation(section_nudge_info, "Continuations");
262 IntSyncStat nudge_source_local_refresh(section_nudge_info, "Local Refreshes");
263
256 // This list of sections belongs in the 'details' field of the returned 264 // This list of sections belongs in the 'details' field of the returned
257 // message. 265 // message.
258 about_info->Set("details", stats_list); 266 about_info->Set("details", stats_list);
259 267
260 // Populate all the fields we declared above. 268 // Populate all the fields we declared above.
261 client_version.SetValue(GetVersionString()); 269 client_version.SetValue(GetVersionString());
262 270
263 if (!service) { 271 if (!service) {
264 summary_string.SetValue("Sync service does not exist"); 272 summary_string.SetValue("Sync service does not exist");
265 return about_info.Pass(); 273 return about_info.Pass();
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 360
353 if (is_status_valid) { 361 if (is_status_valid) {
354 encryption_conflicts.SetValue(full_status.encryption_conflicts); 362 encryption_conflicts.SetValue(full_status.encryption_conflicts);
355 hierarchy_conflicts.SetValue(full_status.hierarchy_conflicts); 363 hierarchy_conflicts.SetValue(full_status.hierarchy_conflicts);
356 simple_conflicts.SetValue(full_status.simple_conflicts); 364 simple_conflicts.SetValue(full_status.simple_conflicts);
357 server_conflicts.SetValue(full_status.server_conflicts); 365 server_conflicts.SetValue(full_status.server_conflicts);
358 committed_items.SetValue(full_status.committed_count); 366 committed_items.SetValue(full_status.committed_count);
359 updates_remaining.SetValue(full_status.updates_available); 367 updates_remaining.SetValue(full_status.updates_available);
360 } 368 }
361 369
370 if (is_status_valid) {
371 nudge_source_notification.SetValue(full_status.nudge_source_notification);
372 nudge_source_local.SetValue(full_status.nudge_source_local);
373 nudge_source_continuation.SetValue(full_status.nudge_source_continuation);
374 nudge_source_local_refresh.SetValue(full_status.nudge_source_local_refresh);
375 }
376
362 if (snapshot.is_initialized()) { 377 if (snapshot.is_initialized()) {
363 updates_downloaded.SetValue( 378 updates_downloaded.SetValue(
364 snapshot.model_neutral_state().num_updates_downloaded_total); 379 snapshot.model_neutral_state().num_updates_downloaded_total);
365 committed_count.SetValue( 380 committed_count.SetValue(
366 snapshot.model_neutral_state().num_successful_commits); 381 snapshot.model_neutral_state().num_successful_commits);
367 entries.SetValue(snapshot.num_entries()); 382 entries.SetValue(snapshot.num_entries());
368 } 383 }
369 384
370 // The values set from this point onwards do not belong in the 385 // The values set from this point onwards do not belong in the
371 // details list. 386 // details list.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 about_info->SetString("unrecoverable_error_message", 428 about_info->SetString("unrecoverable_error_message",
414 unrecoverable_error_message); 429 unrecoverable_error_message);
415 } 430 }
416 431
417 about_info->Set("type_status", service->GetTypeStatusMap()); 432 about_info->Set("type_status", service->GetTypeStatusMap());
418 433
419 return about_info.Pass(); 434 return about_info.Pass();
420 } 435 }
421 436
422 } // namespace sync_ui_util 437 } // namespace sync_ui_util
OLDNEW
« no previous file with comments | « no previous file | sync/engine/all_status.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698