| OLD | NEW |
| 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/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 "Conflicts Resolved: Client Wins"); | 291 "Conflicts Resolved: Client Wins"); |
| 292 IntSyncStat conflicts_resolved_server_wins(section_counters, | 292 IntSyncStat conflicts_resolved_server_wins(section_counters, |
| 293 "Conflicts Resolved: Server Wins"); | 293 "Conflicts Resolved: Server Wins"); |
| 294 | 294 |
| 295 base::ListValue *section_this_cycle = AddSection(stats_list, | 295 base::ListValue *section_this_cycle = AddSection(stats_list, |
| 296 "Transient Counters (this cycle)"); | 296 "Transient Counters (this cycle)"); |
| 297 IntSyncStat encryption_conflicts(section_this_cycle, "Encryption Conflicts"); | 297 IntSyncStat encryption_conflicts(section_this_cycle, "Encryption Conflicts"); |
| 298 IntSyncStat hierarchy_conflicts(section_this_cycle, "Hierarchy Conflicts"); | 298 IntSyncStat hierarchy_conflicts(section_this_cycle, "Hierarchy Conflicts"); |
| 299 IntSyncStat server_conflicts(section_this_cycle, "Server Conflicts"); | 299 IntSyncStat server_conflicts(section_this_cycle, "Server Conflicts"); |
| 300 IntSyncStat committed_items(section_this_cycle, "Committed Items"); | 300 IntSyncStat committed_items(section_this_cycle, "Committed Items"); |
| 301 IntSyncStat updates_remaining(section_this_cycle, "Updates Remaining"); | |
| 302 | 301 |
| 303 base::ListValue* section_that_cycle = AddSection( | 302 base::ListValue* section_that_cycle = AddSection( |
| 304 stats_list, "Transient Counters (last cycle of last completed session)"); | 303 stats_list, "Transient Counters (last cycle of last completed session)"); |
| 305 IntSyncStat updates_downloaded(section_that_cycle, "Updates Downloaded"); | 304 IntSyncStat updates_downloaded(section_that_cycle, "Updates Downloaded"); |
| 306 IntSyncStat committed_count(section_that_cycle, "Committed Count"); | 305 IntSyncStat committed_count(section_that_cycle, "Committed Count"); |
| 307 IntSyncStat entries(section_that_cycle, "Entries"); | 306 IntSyncStat entries(section_that_cycle, "Entries"); |
| 308 | 307 |
| 309 base::ListValue* section_nudge_info = AddSection( | 308 base::ListValue* section_nudge_info = AddSection( |
| 310 stats_list, "Nudge Source Counters"); | 309 stats_list, "Nudge Source Counters"); |
| 311 IntSyncStat nudge_source_notification( | 310 IntSyncStat nudge_source_notification( |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 full_status.num_local_overwrites_total); | 419 full_status.num_local_overwrites_total); |
| 421 conflicts_resolved_server_wins.SetValue( | 420 conflicts_resolved_server_wins.SetValue( |
| 422 full_status.num_server_overwrites_total); | 421 full_status.num_server_overwrites_total); |
| 423 } | 422 } |
| 424 | 423 |
| 425 if (is_status_valid) { | 424 if (is_status_valid) { |
| 426 encryption_conflicts.SetValue(full_status.encryption_conflicts); | 425 encryption_conflicts.SetValue(full_status.encryption_conflicts); |
| 427 hierarchy_conflicts.SetValue(full_status.hierarchy_conflicts); | 426 hierarchy_conflicts.SetValue(full_status.hierarchy_conflicts); |
| 428 server_conflicts.SetValue(full_status.server_conflicts); | 427 server_conflicts.SetValue(full_status.server_conflicts); |
| 429 committed_items.SetValue(full_status.committed_count); | 428 committed_items.SetValue(full_status.committed_count); |
| 430 updates_remaining.SetValue(full_status.updates_available); | |
| 431 } | 429 } |
| 432 | 430 |
| 433 if (is_status_valid) { | 431 if (is_status_valid) { |
| 434 nudge_source_notification.SetValue(full_status.nudge_source_notification); | 432 nudge_source_notification.SetValue(full_status.nudge_source_notification); |
| 435 nudge_source_local.SetValue(full_status.nudge_source_local); | 433 nudge_source_local.SetValue(full_status.nudge_source_local); |
| 436 nudge_source_local_refresh.SetValue(full_status.nudge_source_local_refresh); | 434 nudge_source_local_refresh.SetValue(full_status.nudge_source_local_refresh); |
| 437 } | 435 } |
| 438 | 436 |
| 439 if (snapshot.is_initialized()) { | 437 if (snapshot.is_initialized()) { |
| 440 updates_downloaded.SetValue( | 438 updates_downloaded.SetValue( |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 about_info->SetString("unrecoverable_error_message", | 488 about_info->SetString("unrecoverable_error_message", |
| 491 unrecoverable_error_message); | 489 unrecoverable_error_message); |
| 492 } | 490 } |
| 493 | 491 |
| 494 about_info->Set("type_status", service->GetTypeStatusMap()); | 492 about_info->Set("type_status", service->GetTypeStatusMap()); |
| 495 | 493 |
| 496 return about_info.Pass(); | 494 return about_info.Pass(); |
| 497 } | 495 } |
| 498 | 496 |
| 499 } // namespace sync_ui_util | 497 } // namespace sync_ui_util |
| OLD | NEW |