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

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

Issue 11185064: FYI: Move conflict resolve + clean up afterwards (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | 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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 IntSyncStat successful_commits(section_counters, "Successful Commits"); 237 IntSyncStat successful_commits(section_counters, "Successful Commits");
238 IntSyncStat conflicts_resolved_local_wins(section_counters, 238 IntSyncStat conflicts_resolved_local_wins(section_counters,
239 "Conflicts Resolved: Client Wins"); 239 "Conflicts Resolved: Client Wins");
240 IntSyncStat conflicts_resolved_server_wins(section_counters, 240 IntSyncStat conflicts_resolved_server_wins(section_counters,
241 "Conflicts Resolved: Server Wins"); 241 "Conflicts Resolved: Server Wins");
242 242
243 ListValue *section_this_cycle = AddSection(stats_list, 243 ListValue *section_this_cycle = AddSection(stats_list,
244 "Transient Counters (this cycle)"); 244 "Transient Counters (this cycle)");
245 IntSyncStat encryption_conflicts(section_this_cycle, "Encryption Conflicts"); 245 IntSyncStat encryption_conflicts(section_this_cycle, "Encryption Conflicts");
246 IntSyncStat hierarchy_conflicts(section_this_cycle, "Hierarchy Conflicts"); 246 IntSyncStat hierarchy_conflicts(section_this_cycle, "Hierarchy Conflicts");
247 IntSyncStat simple_conflicts(section_this_cycle, "Simple Conflicts");
248 IntSyncStat server_conflicts(section_this_cycle, "Server Conflicts"); 247 IntSyncStat server_conflicts(section_this_cycle, "Server Conflicts");
249 IntSyncStat committed_items(section_this_cycle, "Committed Items"); 248 IntSyncStat committed_items(section_this_cycle, "Committed Items");
250 IntSyncStat updates_remaining(section_this_cycle, "Updates Remaining"); 249 IntSyncStat updates_remaining(section_this_cycle, "Updates Remaining");
251 250
252 ListValue* section_that_cycle = AddSection( 251 ListValue* section_that_cycle = AddSection(
253 stats_list, "Transient Counters (last cycle of last completed session)"); 252 stats_list, "Transient Counters (last cycle of last completed session)");
254 IntSyncStat updates_downloaded(section_that_cycle, "Updates Downloaded"); 253 IntSyncStat updates_downloaded(section_that_cycle, "Updates Downloaded");
255 IntSyncStat committed_count(section_that_cycle, "Committed Count"); 254 IntSyncStat committed_count(section_that_cycle, "Committed Count");
256 IntSyncStat entries(section_that_cycle, "Entries"); 255 IntSyncStat entries(section_that_cycle, "Entries");
257 256
258 ListValue* section_nudge_info = AddSection( 257 ListValue* section_nudge_info = AddSection(
259 stats_list, "Nudge Source Counters"); 258 stats_list, "Nudge Source Counters");
260 IntSyncStat nudge_source_notification( 259 IntSyncStat nudge_source_notification(
261 section_nudge_info, "Server Invalidations"); 260 section_nudge_info, "Server Invalidations");
262 IntSyncStat nudge_source_local(section_nudge_info, "Local Changes"); 261 IntSyncStat nudge_source_local(section_nudge_info, "Local Changes");
263 IntSyncStat nudge_source_continuation(section_nudge_info, "Continuations");
264 IntSyncStat nudge_source_local_refresh(section_nudge_info, "Local Refreshes"); 262 IntSyncStat nudge_source_local_refresh(section_nudge_info, "Local Refreshes");
265 263
266 // 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
267 // message. 265 // message.
268 about_info->Set("details", stats_list); 266 about_info->Set("details", stats_list);
269 267
270 // Populate all the fields we declared above. 268 // Populate all the fields we declared above.
271 client_version.SetValue(GetVersionString()); 269 client_version.SetValue(GetVersionString());
272 270
273 if (!service) { 271 if (!service) {
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 successful_commits.SetValue(full_status.num_commits_total); 356 successful_commits.SetValue(full_status.num_commits_total);
359 conflicts_resolved_local_wins.SetValue( 357 conflicts_resolved_local_wins.SetValue(
360 full_status.num_local_overwrites_total); 358 full_status.num_local_overwrites_total);
361 conflicts_resolved_server_wins.SetValue( 359 conflicts_resolved_server_wins.SetValue(
362 full_status.num_server_overwrites_total); 360 full_status.num_server_overwrites_total);
363 } 361 }
364 362
365 if (is_status_valid) { 363 if (is_status_valid) {
366 encryption_conflicts.SetValue(full_status.encryption_conflicts); 364 encryption_conflicts.SetValue(full_status.encryption_conflicts);
367 hierarchy_conflicts.SetValue(full_status.hierarchy_conflicts); 365 hierarchy_conflicts.SetValue(full_status.hierarchy_conflicts);
368 simple_conflicts.SetValue(full_status.simple_conflicts);
369 server_conflicts.SetValue(full_status.server_conflicts); 366 server_conflicts.SetValue(full_status.server_conflicts);
370 committed_items.SetValue(full_status.committed_count); 367 committed_items.SetValue(full_status.committed_count);
371 updates_remaining.SetValue(full_status.updates_available); 368 updates_remaining.SetValue(full_status.updates_available);
372 } 369 }
373 370
374 if (is_status_valid) { 371 if (is_status_valid) {
375 nudge_source_notification.SetValue(full_status.nudge_source_notification); 372 nudge_source_notification.SetValue(full_status.nudge_source_notification);
376 nudge_source_local.SetValue(full_status.nudge_source_local); 373 nudge_source_local.SetValue(full_status.nudge_source_local);
377 nudge_source_continuation.SetValue(full_status.nudge_source_continuation);
378 nudge_source_local_refresh.SetValue(full_status.nudge_source_local_refresh); 374 nudge_source_local_refresh.SetValue(full_status.nudge_source_local_refresh);
379 } 375 }
380 376
381 if (snapshot.is_initialized()) { 377 if (snapshot.is_initialized()) {
382 updates_downloaded.SetValue( 378 updates_downloaded.SetValue(
383 snapshot.model_neutral_state().num_updates_downloaded_total); 379 snapshot.model_neutral_state().num_updates_downloaded_total);
384 committed_count.SetValue( 380 committed_count.SetValue(
385 snapshot.model_neutral_state().num_successful_commits); 381 snapshot.model_neutral_state().num_successful_commits);
386 entries.SetValue(snapshot.num_entries()); 382 entries.SetValue(snapshot.num_entries());
387 } 383 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 about_info->SetString("unrecoverable_error_message", 428 about_info->SetString("unrecoverable_error_message",
433 unrecoverable_error_message); 429 unrecoverable_error_message);
434 } 430 }
435 431
436 about_info->Set("type_status", service->GetTypeStatusMap()); 432 about_info->Set("type_status", service->GetTypeStatusMap());
437 433
438 return about_info.Pass(); 434 return about_info.Pass();
439 } 435 }
440 436
441 } // namespace sync_ui_util 437 } // 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