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

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: Rebase 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
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.

Powered by Google App Engine
This is Rietveld 408576698