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

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

Issue 5939006: sync: beginnings of MessageLoop based SyncerThread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment Created 10 years 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.cc
diff --git a/chrome/browser/sync/sessions/sync_session.cc b/chrome/browser/sync/sessions/sync_session.cc
index d968e83c953007d7e67f5113dfc03f005ecceeca..95d679252f453b407f82d21a04e48736b8426d75 100644
--- a/chrome/browser/sync/sessions/sync_session.cc
+++ b/chrome/browser/sync/sessions/sync_session.cc
@@ -24,6 +24,21 @@ SyncSession::SyncSession(SyncSessionContext* context, Delegate* delegate,
SyncSession::~SyncSession() {}
+void SyncSession::Coalesce(const SyncSession* session) {
+ if (context_ != session->context() || delegate_ != session->delegate_) {
+ NOTREACHED();
+ return;
+ }
+
+ source_ = SyncSourceInfo(session->source_.first,
+ source_.second | session->source_.second);
+ // TODO(tim): Update routing_info_ and workers_.
+}
+
+void SyncSession::ResetTransientState() {
+ status_controller_.reset(new StatusController(routing_info_));
+}
+
SyncSessionSnapshot SyncSession::TakeSnapshot() const {
syncable::ScopedDirLookup dir(context_->directory_manager(),
context_->account_name());

Powered by Google App Engine
This is Rietveld 408576698