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

Unified Diff: chrome/browser/sync/engine/syncer_thread.h

Issue 6182004: [SYNC] Refactor SyncSourceInfo and add support in chrome invalidation client ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Done! Created 9 years, 11 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/browser/sync/engine/syncer.cc ('k') | chrome/browser/sync/engine/syncer_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
@@ -49,6 +49,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);
@@ -138,8 +141,16 @@
virtual void NudgeSyncerWithDataTypes(
int milliseconds_from_now,
NudgeSource source,
- const syncable::ModelTypeBitSet& model_type);
+ const syncable::ModelTypeBitSet& model_types);
+ // 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 sessions::TypePayloadMap& model_types_with_payloads);
+
void SetNotificationsEnabled(bool notifications_enabled);
// Call this when a directory is opened
@@ -189,9 +200,13 @@
// check pending_nudge_time_.)
NudgeSource pending_nudge_source_;
- // BitSet of the datatypes that have triggered the current nudge
- // (can be union of various bitsets when multiple nudges are coalesced)
- syncable::ModelTypeBitSet pending_nudge_types_;
+ // Map of all datatypes that are requesting a nudge. Can be union
+ // from multiple nudges that are coalesced. In addition, we
+ // optionally track a payload associated with each datatype (most recent
+ // payload overwrites old ones). These payloads are used by the download
+ // updates command and can contain datatype specific information the server
+ // might use.
+ sessions::TypePayloadMap pending_nudge_types_;
// null iff there is no pending nudge.
base::TimeTicks pending_nudge_time_;
@@ -280,7 +295,7 @@
sessions::SyncSourceInfo MakeSyncSourceInfo(
bool nudged,
NudgeSource nudge_source,
- const syncable::ModelTypeBitSet& nudge_types,
+ const sessions::TypePayloadMap& model_types_with_payloads,
bool* initial_sync);
int UserIdleTime();
@@ -327,7 +342,7 @@
void NudgeSyncImpl(
int milliseconds_from_now,
NudgeSource source,
- const syncable::ModelTypeBitSet& model_types);
+ const sessions::TypePayloadMap& model_types_with_payloads);
#if defined(OS_LINUX)
// On Linux, we need this information in order to query idle time.
« no previous file with comments | « chrome/browser/sync/engine/syncer.cc ('k') | chrome/browser/sync/engine/syncer_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698