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

Unified Diff: chrome/browser/sync/sessions/sync_session.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/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,7 @@
#define CHROME_BROWSER_SYNC_SESSIONS_SYNC_SESSION_H_
#pragma once
+#include <string>
#include <utility>
#include <vector>
@@ -35,9 +36,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::vector<std::string>& p)
+ : updates_source(u), types(t), payloads(p) {}
+ sync_pb::GetUpdatesCallerInfo::GetUpdatesSource updates_source;
+ syncable::ModelTypeBitSet types;
akalin 2011/01/19 22:14:52 As discussed, we can combine types and payloads in
Nicolas Zea 2011/01/19 22:54:55 Done.
+ std::vector<std::string> payloads;
+};
+
class SyncSession {
public:
// The Delegate services events that occur during the session requiring an

Powered by Google App Engine
This is Rietveld 408576698