Chromium Code Reviews| Index: chrome/browser/sync/internal_api/sync_manager.h |
| diff --git a/chrome/browser/sync/internal_api/sync_manager.h b/chrome/browser/sync/internal_api/sync_manager.h |
| index 27e0dc35869d293fc6aed566ce6a1cada10ba72d..097cd35b127ebb0a0ee536bdad7d9d9a005bd71d 100644 |
| --- a/chrome/browser/sync/internal_api/sync_manager.h |
| +++ b/chrome/browser/sync/internal_api/sync_manager.h |
| @@ -10,6 +10,7 @@ |
| #include "base/basictypes.h" |
| #include "base/callback_forward.h" |
| +#include "base/time.h" |
| #include "base/threading/thread_checker.h" |
| #include "chrome/browser/sync/internal_api/change_record.h" |
| #include "chrome/browser/sync/internal_api/configure_reason.h" |
| @@ -56,6 +57,21 @@ enum PassphraseRequiredReason { |
| // was unsuccessful. |
| }; |
| +// Possible types of nudge delay for datatypes. |
| +// Note: These are just hints. If a sync happens then all dirty entries |
| +// would be committed as part of the sync. |
| +enum NudgeDelayType { |
|
tim (not reviewing)
2011/12/09 23:07:22
Instead of 'Type', maybe 'Strategy' or 'Behavior'.
lipalani1
2011/12/15 01:35:16
Done.
|
| + // Sync right away. |
| + IMMEDIATE, |
| + |
| + // Sync this change while syncing another change. |
| + PIGGY_BACK_WITH_ANOTHER_CHANGE, |
|
tim (not reviewing)
2011/12/09 23:07:22
I thought about this naming for a while since PIGG
lipalani1
2011/12/15 01:35:16
Done.
|
| + |
| + // The datatype does not use one of the predefined wait times but defines its |
| + // own wait time logic for nudge. |
| + CUSTOM, |
| +}; |
| + |
| // Contains everything needed to talk to and identify a user account. |
| struct SyncCredentials { |
| std::string email; |
| @@ -578,7 +594,16 @@ class SyncManager { |
| void TriggerOnIncomingNotificationForTest( |
| const syncable::ModelTypeBitSet& model_types); |
| + static const int kDefaultNudgeDelayMilliseconds; |
| + static const int kPreferencesNudgeDelayMilliseconds; |
| + static const int kPiggybackNudgeDelay; |
| + |
| private: |
| + FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, NudgeDelayTest); |
| + |
| + // For unit tests. |
| + base::TimeDelta GetNudgeDelayTimeDelta(const syncable::ModelType& model_type); |
| + |
| base::ThreadChecker thread_checker_; |
| // An opaque pointer to the nested private class. |