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

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

Issue 11314008: sync: Follow-up to conflict resolution refactor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/sync/profile_sync_service_harness.cc » ('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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 IntSyncStat successful_commits(section_counters, "Successful Commits"); 240 IntSyncStat successful_commits(section_counters, "Successful Commits");
241 IntSyncStat conflicts_resolved_local_wins(section_counters, 241 IntSyncStat conflicts_resolved_local_wins(section_counters,
242 "Conflicts Resolved: Client Wins"); 242 "Conflicts Resolved: Client Wins");
243 IntSyncStat conflicts_resolved_server_wins(section_counters, 243 IntSyncStat conflicts_resolved_server_wins(section_counters,
244 "Conflicts Resolved: Server Wins"); 244 "Conflicts Resolved: Server Wins");
245 245
246 ListValue *section_this_cycle = AddSection(stats_list, 246 ListValue *section_this_cycle = AddSection(stats_list,
247 "Transient Counters (this cycle)"); 247 "Transient Counters (this cycle)");
248 IntSyncStat encryption_conflicts(section_this_cycle, "Encryption Conflicts"); 248 IntSyncStat encryption_conflicts(section_this_cycle, "Encryption Conflicts");
249 IntSyncStat hierarchy_conflicts(section_this_cycle, "Hierarchy Conflicts"); 249 IntSyncStat hierarchy_conflicts(section_this_cycle, "Hierarchy Conflicts");
250 IntSyncStat simple_conflicts(section_this_cycle, "Simple Conflicts");
251 IntSyncStat server_conflicts(section_this_cycle, "Server Conflicts"); 250 IntSyncStat server_conflicts(section_this_cycle, "Server Conflicts");
252 IntSyncStat committed_items(section_this_cycle, "Committed Items"); 251 IntSyncStat committed_items(section_this_cycle, "Committed Items");
253 IntSyncStat updates_remaining(section_this_cycle, "Updates Remaining"); 252 IntSyncStat updates_remaining(section_this_cycle, "Updates Remaining");
254 253
255 ListValue* section_that_cycle = AddSection( 254 ListValue* section_that_cycle = AddSection(
256 stats_list, "Transient Counters (last cycle of last completed session)"); 255 stats_list, "Transient Counters (last cycle of last completed session)");
257 IntSyncStat updates_downloaded(section_that_cycle, "Updates Downloaded"); 256 IntSyncStat updates_downloaded(section_that_cycle, "Updates Downloaded");
258 IntSyncStat committed_count(section_that_cycle, "Committed Count"); 257 IntSyncStat committed_count(section_that_cycle, "Committed Count");
259 IntSyncStat entries(section_that_cycle, "Entries"); 258 IntSyncStat entries(section_that_cycle, "Entries");
260 259
261 ListValue* section_nudge_info = AddSection( 260 ListValue* section_nudge_info = AddSection(
262 stats_list, "Nudge Source Counters"); 261 stats_list, "Nudge Source Counters");
263 IntSyncStat nudge_source_notification( 262 IntSyncStat nudge_source_notification(
264 section_nudge_info, "Server Invalidations"); 263 section_nudge_info, "Server Invalidations");
265 IntSyncStat nudge_source_local(section_nudge_info, "Local Changes"); 264 IntSyncStat nudge_source_local(section_nudge_info, "Local Changes");
266 IntSyncStat nudge_source_continuation(section_nudge_info, "Continuations");
267 IntSyncStat nudge_source_local_refresh(section_nudge_info, "Local Refreshes"); 265 IntSyncStat nudge_source_local_refresh(section_nudge_info, "Local Refreshes");
268 266
269 // This list of sections belongs in the 'details' field of the returned 267 // This list of sections belongs in the 'details' field of the returned
270 // message. 268 // message.
271 about_info->Set(kDetailsKey, stats_list); 269 about_info->Set(kDetailsKey, stats_list);
272 270
273 // Populate all the fields we declared above. 271 // Populate all the fields we declared above.
274 client_version.SetValue(GetVersionString()); 272 client_version.SetValue(GetVersionString());
275 273
276 if (!service) { 274 if (!service) {
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 successful_commits.SetValue(full_status.num_commits_total); 359 successful_commits.SetValue(full_status.num_commits_total);
362 conflicts_resolved_local_wins.SetValue( 360 conflicts_resolved_local_wins.SetValue(
363 full_status.num_local_overwrites_total); 361 full_status.num_local_overwrites_total);
364 conflicts_resolved_server_wins.SetValue( 362 conflicts_resolved_server_wins.SetValue(
365 full_status.num_server_overwrites_total); 363 full_status.num_server_overwrites_total);
366 } 364 }
367 365
368 if (is_status_valid) { 366 if (is_status_valid) {
369 encryption_conflicts.SetValue(full_status.encryption_conflicts); 367 encryption_conflicts.SetValue(full_status.encryption_conflicts);
370 hierarchy_conflicts.SetValue(full_status.hierarchy_conflicts); 368 hierarchy_conflicts.SetValue(full_status.hierarchy_conflicts);
371 simple_conflicts.SetValue(full_status.simple_conflicts);
372 server_conflicts.SetValue(full_status.server_conflicts); 369 server_conflicts.SetValue(full_status.server_conflicts);
373 committed_items.SetValue(full_status.committed_count); 370 committed_items.SetValue(full_status.committed_count);
374 updates_remaining.SetValue(full_status.updates_available); 371 updates_remaining.SetValue(full_status.updates_available);
375 } 372 }
376 373
377 if (is_status_valid) { 374 if (is_status_valid) {
378 nudge_source_notification.SetValue(full_status.nudge_source_notification); 375 nudge_source_notification.SetValue(full_status.nudge_source_notification);
379 nudge_source_local.SetValue(full_status.nudge_source_local); 376 nudge_source_local.SetValue(full_status.nudge_source_local);
380 nudge_source_continuation.SetValue(full_status.nudge_source_continuation);
381 nudge_source_local_refresh.SetValue(full_status.nudge_source_local_refresh); 377 nudge_source_local_refresh.SetValue(full_status.nudge_source_local_refresh);
382 } 378 }
383 379
384 if (snapshot.is_initialized()) { 380 if (snapshot.is_initialized()) {
385 updates_downloaded.SetValue( 381 updates_downloaded.SetValue(
386 snapshot.model_neutral_state().num_updates_downloaded_total); 382 snapshot.model_neutral_state().num_updates_downloaded_total);
387 committed_count.SetValue( 383 committed_count.SetValue(
388 snapshot.model_neutral_state().num_successful_commits); 384 snapshot.model_neutral_state().num_successful_commits);
389 entries.SetValue(snapshot.num_entries()); 385 entries.SetValue(snapshot.num_entries());
390 } 386 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 about_info->SetString("unrecoverable_error_message", 431 about_info->SetString("unrecoverable_error_message",
436 unrecoverable_error_message); 432 unrecoverable_error_message);
437 } 433 }
438 434
439 about_info->Set("type_status", service->GetTypeStatusMap()); 435 about_info->Set("type_status", service->GetTypeStatusMap());
440 436
441 return about_info.Pass(); 437 return about_info.Pass();
442 } 438 }
443 439
444 } // namespace sync_ui_util 440 } // namespace sync_ui_util
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/profile_sync_service_harness.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698