| Index: chrome/browser/sync/engine/syncer_thread.h
|
| ===================================================================
|
| --- chrome/browser/sync/engine/syncer_thread.h (revision 71618)
|
| +++ chrome/browser/sync/engine/syncer_thread.h (working copy)
|
| @@ -10,6 +10,7 @@
|
| #pragma once
|
|
|
| #include <list>
|
| +#include <map>
|
| #include <string>
|
| #include <vector>
|
|
|
| @@ -49,6 +50,9 @@
|
| FRIEND_TEST_ALL_PREFIXES(SyncerThreadWithSyncerTest, NudgeWithDataTypes);
|
| FRIEND_TEST_ALL_PREFIXES(SyncerThreadWithSyncerTest,
|
| NudgeWithDataTypesCoalesced);
|
| + FRIEND_TEST_ALL_PREFIXES(SyncerThreadWithSyncerTest, NudgeWithPayloads);
|
| + FRIEND_TEST_ALL_PREFIXES(SyncerThreadWithSyncerTest,
|
| + NudgeWithPayloadsCoalesced);
|
| FRIEND_TEST_ALL_PREFIXES(SyncerThreadWithSyncerTest, Throttling);
|
| FRIEND_TEST_ALL_PREFIXES(SyncerThreadWithSyncerTest, AuthInvalid);
|
| FRIEND_TEST_ALL_PREFIXES(SyncerThreadWithSyncerTest, Pause);
|
| @@ -140,6 +144,14 @@
|
| NudgeSource source,
|
| const syncable::ModelTypeBitSet& model_type);
|
|
|
| + // Same as |NudgeSyncer|, but supports including a payload for passing on to
|
| + // the download updates command. Datatypes with payloads are also considered
|
| + // to have caused a nudged to occur and treated accordingly.
|
| + virtual void NudgeSyncerWithPayloads(
|
| + int milliseconds_from_now,
|
| + NudgeSource source,
|
| + const std::map<syncable::ModelType, std::string>& payloads);
|
| +
|
| void SetNotificationsEnabled(bool notifications_enabled);
|
|
|
| // Call this when a directory is opened
|
| @@ -193,6 +205,11 @@
|
| // (can be union of various bitsets when multiple nudges are coalesced)
|
| syncable::ModelTypeBitSet pending_nudge_types_;
|
|
|
| + // Payloads associated with each of the datatypes we're polling on.
|
| + // These payloads are used by the download updates command and can contain
|
| + // datatype specific information the server might use.
|
| + std::vector<std::string> datatype_payloads_;
|
| +
|
| // null iff there is no pending nudge.
|
| base::TimeTicks pending_nudge_time_;
|
|
|
| @@ -281,6 +298,7 @@
|
| bool nudged,
|
| NudgeSource nudge_source,
|
| const syncable::ModelTypeBitSet& nudge_types,
|
| + const std::vector<std::string>& payloads,
|
| bool* initial_sync);
|
|
|
| int UserIdleTime();
|
| @@ -327,7 +345,8 @@
|
| void NudgeSyncImpl(
|
| int milliseconds_from_now,
|
| NudgeSource source,
|
| - const syncable::ModelTypeBitSet& model_types);
|
| + const syncable::ModelTypeBitSet& model_types,
|
| + const std::map<syncable::ModelType, std::string>& payloads);
|
|
|
| #if defined(OS_LINUX)
|
| // On Linux, we need this information in order to query idle time.
|
|
|