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

Unified Diff: components/sync/model/syncable_service.h

Issue 2824073002: [sync] Prevent sessions flare on startup (Closed)
Patch Set: Disable test on android Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/model/syncable_service.h
diff --git a/components/sync/model/syncable_service.h b/components/sync/model/syncable_service.h
index 4e25a371d8e6ca263ab1dbef72d25394eba5aeae..f12b2ad8ee9797aaf974e06edcb304497624ce17 100644
--- a/components/sync/model/syncable_service.h
+++ b/components/sync/model/syncable_service.h
@@ -30,12 +30,17 @@ class SyncableService : public SyncChangeProcessor,
public base::SupportsWeakPtr<SyncableService> {
public:
// A StartSyncFlare is useful when your SyncableService has a need for sync
- // to start ASAP, typically because a local change event has occurred but
- // MergeDataAndStartSyncing hasn't been called yet, meaning you don't have a
- // SyncChangeProcessor. The sync subsystem will respond soon after invoking
- // Run() on your flare by calling MergeDataAndStartSyncing. The ModelType
- // parameter is included so that the recieving end can track usage and timing
- // statistics, make optimizations or tradeoffs by type, etc.
+ // to start ASAP. This is typically for one of three reasons:
+ // 1) Because a local change event has occurred but MergeDataAndStartSyncing
+ // hasn't been called yet, meaning you don't have a SyncChangeProcessor. The
+ // sync subsystem will respond soon after invoking Run() on your flare by
+ // calling MergeDataAndStartSyncing.
+ // 2) You want remote data to be visible immediately; for example if the
+ // history page is open, you want remote sessions data to be available there.
+ // 3) You want to signal to sync that it's safe to start now that the
+ // browser's IO-intensive startup process is over. The ModelType parameter is
+ // included so that the recieving end can track usage and timing statistics,
+ // make pptimizations or tradeoffs by type, etc.
using StartSyncFlare = base::Callback<void(ModelType)>;
// Informs the service to begin syncing the specified synced datatype |type|.
« no previous file with comments | « chrome/test/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698