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

Unified Diff: chrome/browser/sync/sessions/sync_session.h

Issue 5939006: sync: beginnings of MessageLoop based SyncerThread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert syncer_thread.cc 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
diff --git a/chrome/browser/sync/sessions/sync_session.h b/chrome/browser/sync/sessions/sync_session.h
index ce7c9e5dd11da04267ce648cf907b058190a2673..7822f4b802ff20de97c26d0d5a3b785e76f7a555 100644
--- a/chrome/browser/sync/sessions/sync_session.h
+++ b/chrome/browser/sync/sessions/sync_session.h
@@ -35,8 +35,6 @@ namespace browser_sync {
class ModelSafeWorker;
namespace sessions {
-typedef std::pair<sync_pb::GetUpdatesCallerInfo::GetUpdatesSource,
- syncable::ModelTypeBitSet> SyncSourceInfo;
class SyncSession {
public:
@@ -92,8 +90,19 @@ class SyncSession {
// engine again.
bool HasMoreToSync() const;
- SyncSessionContext* context() { return context_; }
- Delegate* delegate() { return delegate_; }
+ // Collects all state pertaining to how and why |s| originated and unions it
+ // with corresponding state in |this|, leaving |s| unchanged. Allows |this|
+ // to take on the responsibilities |s| had (e.g. certain data types) in the
+ // next SyncShare operation using |this|, rather than needed two separate
+ // sessions.
+ void Coalesce(const SyncSession* s);
+
+ // Should be called any time |this| is being re-used in a new call to
+ // SyncShare (e.g., HasMoreToSync returned true).
+ void ResetTransientState();
+
+ SyncSessionContext* context() const { return context_; }
+ Delegate* delegate() const { return delegate_; }
syncable::WriteTransaction* write_transaction() { return write_transaction_; }
StatusController* status_controller() { return status_controller_.get(); }

Powered by Google App Engine
This is Rietveld 408576698