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

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: Created 8 years, 3 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') | sync/engine/all_status.cc » ('J')
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_unknown(section_nudge_info, "Unknown Source");
rlarocque 2012/09/24 23:24:37 There should be no nudges with source unknown. Th
259 IntSyncStat nudge_source_notification(
260 section_nudge_info, "Server Invalidations");
261 IntSyncStat nudge_source_local(section_nudge_info, "Local Changes");
262 IntSyncStat nudge_source_continuation(section_nudge_info, "Continuations");
263 IntSyncStat nudge_source_local_refresh(section_nudge_info, "Local Refreshes");
264
256 // This list of sections belongs in the 'details' field of the returned 265 // This list of sections belongs in the 'details' field of the returned
257 // message. 266 // message.
258 about_info->Set("details", stats_list); 267 about_info->Set("details", stats_list);
259 268
260 // Populate all the fields we declared above. 269 // Populate all the fields we declared above.
261 client_version.SetValue(GetVersionString()); 270 client_version.SetValue(GetVersionString());
262 271
263 if (!service) { 272 if (!service) {
264 summary_string.SetValue("Sync service does not exist"); 273 summary_string.SetValue("Sync service does not exist");
265 return about_info.Pass(); 274 return about_info.Pass();
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 361
353 if (is_status_valid) { 362 if (is_status_valid) {
354 encryption_conflicts.SetValue(full_status.encryption_conflicts); 363 encryption_conflicts.SetValue(full_status.encryption_conflicts);
355 hierarchy_conflicts.SetValue(full_status.hierarchy_conflicts); 364 hierarchy_conflicts.SetValue(full_status.hierarchy_conflicts);
356 simple_conflicts.SetValue(full_status.simple_conflicts); 365 simple_conflicts.SetValue(full_status.simple_conflicts);
357 server_conflicts.SetValue(full_status.server_conflicts); 366 server_conflicts.SetValue(full_status.server_conflicts);
358 committed_items.SetValue(full_status.committed_count); 367 committed_items.SetValue(full_status.committed_count);
359 updates_remaining.SetValue(full_status.updates_available); 368 updates_remaining.SetValue(full_status.updates_available);
360 } 369 }
361 370
371 if (is_status_valid) {
372 nudge_source_unknown.SetValue(full_status.nudge_source_unknown);
373 nudge_source_notification.SetValue(full_status.nudge_source_notification);
374 nudge_source_local.SetValue(full_status.nudge_source_local);
375 nudge_source_continuation.SetValue(full_status.nudge_source_continuation);
376 nudge_source_local_refresh.SetValue(full_status.nudge_source_local_refresh);
377 }
378
362 if (snapshot.is_initialized()) { 379 if (snapshot.is_initialized()) {
363 updates_downloaded.SetValue( 380 updates_downloaded.SetValue(
364 snapshot.model_neutral_state().num_updates_downloaded_total); 381 snapshot.model_neutral_state().num_updates_downloaded_total);
365 committed_count.SetValue( 382 committed_count.SetValue(
366 snapshot.model_neutral_state().num_successful_commits); 383 snapshot.model_neutral_state().num_successful_commits);
367 entries.SetValue(snapshot.num_entries()); 384 entries.SetValue(snapshot.num_entries());
368 } 385 }
369 386
370 // The values set from this point onwards do not belong in the 387 // The values set from this point onwards do not belong in the
371 // details list. 388 // details list.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 about_info->SetString("unrecoverable_error_message", 430 about_info->SetString("unrecoverable_error_message",
414 unrecoverable_error_message); 431 unrecoverable_error_message);
415 } 432 }
416 433
417 about_info->Set("type_status", service->GetTypeStatusMap()); 434 about_info->Set("type_status", service->GetTypeStatusMap());
418 435
419 return about_info.Pass(); 436 return about_info.Pass();
420 } 437 }
421 438
422 } // namespace sync_ui_util 439 } // namespace sync_ui_util
OLDNEW
« no previous file with comments | « no previous file | sync/engine/all_status.h » ('j') | sync/engine/all_status.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698