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

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

Issue 10454105: sync: Refactor per-datatype throttling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments Created 8 years, 6 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 | « chrome/browser/sync/glue/sync_backend_host.h ('k') | 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/sync_ui_util.h" 5 #include "chrome/browser/sync/sync_ui_util.h"
6 6
7 #include "base/i18n/number_formatting.h" 7 #include "base/i18n/number_formatting.h"
8 #include "base/i18n/time_formatting.h" 8 #include "base/i18n/time_formatting.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 CHECK(strings); 512 CHECK(strings);
513 if (!service) { 513 if (!service) {
514 sync_ui_util::AddStringSyncDetails(sync_summary, "Summary", 514 sync_ui_util::AddStringSyncDetails(sync_summary, "Summary",
515 "Sync service does not exist"); 515 "Sync service does not exist");
516 } else { 516 } else {
517 // This bypasses regular inter-thread communication mechanisms to grab a 517 // This bypasses regular inter-thread communication mechanisms to grab a
518 // very recent snapshot from the syncer thread. It should be up to date 518 // very recent snapshot from the syncer thread. It should be up to date
519 // with the last snapshot emitted by the syncer. Keep in mind, though, that 519 // with the last snapshot emitted by the syncer. Keep in mind, though, that
520 // not all events that update these values will ping the UI thread, so you 520 // not all events that update these values will ping the UI thread, so you
521 // might not see all intermediate values. 521 // might not see all intermediate values.
522 sync_api::SyncManager::Status full_status( 522 sync_api::SyncStatus full_status(service->QueryDetailedSyncStatus());
523 service->QueryDetailedSyncStatus());
524 523
525 // This is a cache of the last snapshot of type SYNC_CYCLE_ENDED where 524 // This is a cache of the last snapshot of type SYNC_CYCLE_ENDED where
526 // !snapshot.has_more_to_sync(). In other words, it's the last in this 525 // !snapshot.has_more_to_sync(). In other words, it's the last in this
527 // series of sync cycles. The series ends only when we've done all we can 526 // series of sync cycles. The series ends only when we've done all we can
528 // to resolve conflicts and there is nothing left to commit, or an error 527 // to resolve conflicts and there is nothing left to commit, or an error
529 // occurs. 528 // occurs.
530 // 529 //
531 // Despite the fact that it is updated only at the end of a series of 530 // Despite the fact that it is updated only at the end of a series of
532 // commits, its values do not reflect the series. Its counters are based on 531 // commits, its values do not reflect the series. Its counters are based on
533 // the values from a single sync cycle. 532 // the values from a single sync cycle.
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 } 786 }
788 } else { 787 } else {
789 version_modifier = " " + version_modifier; 788 version_modifier = " " + version_modifier;
790 } 789 }
791 return chrome_version.Name() + " " + chrome_version.OSType() + " " + 790 return chrome_version.Name() + " " + chrome_version.OSType() + " " +
792 chrome_version.Version() + " (" + chrome_version.LastChange() + ")" + 791 chrome_version.Version() + " (" + chrome_version.LastChange() + ")" +
793 version_modifier; 792 version_modifier;
794 } 793 }
795 794
796 } // namespace sync_ui_util 795 } // namespace sync_ui_util
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host.h ('k') | sync/engine/all_status.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698