Chromium Code Reviews| Index: chrome/browser/sync/sessions/sync_session.h |
| =================================================================== |
| --- chrome/browser/sync/sessions/sync_session.h (revision 71618) |
| +++ chrome/browser/sync/sessions/sync_session.h (working copy) |
| @@ -15,6 +15,8 @@ |
| #define CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSION_H_ |
| #pragma once |
| +#include <map> |
| +#include <string> |
| #include <utility> |
| #include <vector> |
| @@ -35,9 +37,27 @@ |
| class ModelSafeWorker; |
| namespace sessions { |
| -typedef std::pair<sync_pb::GetUpdatesCallerInfo::GetUpdatesSource, |
| - syncable::ModelTypeBitSet> SyncSourceInfo; |
| +// A container for the source of a sync session. This includes the update |
| +// source, the datatypes triggering the sync session, and possible session |
| +// specific payloads which should be sent to the server. |
| +struct SyncSourceInfo { |
| + SyncSourceInfo() |
| + : updates_source(sync_pb::GetUpdatesCallerInfo::UNKNOWN) {} |
| + SyncSourceInfo( |
| + const sync_pb::GetUpdatesCallerInfo::GetUpdatesSource& u, |
| + const syncable::ModelTypeBitSet& t) |
| + : updates_source(u), types(t) {} |
| + SyncSourceInfo( |
| + const sync_pb::GetUpdatesCallerInfo::GetUpdatesSource& u, |
| + const syncable::ModelTypeBitSet& t, |
| + const std::map<syncable::ModelType, std::string>& p) |
| + : updates_source(u), types(t), payloads(p) {} |
| + sync_pb::GetUpdatesCallerInfo::GetUpdatesSource updates_source; |
| + syncable::ModelTypeBitSet types; |
|
akalin
2011/01/20 00:28:19
So since we have the payloads map, whose keys are
Nicolas Zea
2011/01/20 02:17:32
Again, correct :-/ (as long as we ensure blank pa
|
| + std::map<syncable::ModelType, std::string> payloads; |
| +}; |
| + |
| class SyncSession { |
| public: |
| // The Delegate services events that occur during the session requiring an |