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

Unified Diff: chrome/browser/sync/engine/syncer_thread.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/engine/syncer_thread.cc
diff --git a/chrome/browser/sync/engine/syncer_thread.cc b/chrome/browser/sync/engine/syncer_thread.cc
index 12b343555faa67f4b270f5d35c506279c9fe9ed3..12bcab049052a40daeb0c779613f16d7f8d1560c 100644
--- a/chrome/browser/sync/engine/syncer_thread.cc
+++ b/chrome/browser/sync/engine/syncer_thread.cc
@@ -336,9 +336,9 @@ void SyncerThread::ThreadMainLoop() {
// event. This will also update the source of the following SyncMain call.
VLOG(1) << "Calling Sync Main at time " << Time::Now().ToInternalValue();
bool nudged = false;
- scoped_ptr<SyncSession> session;
- session.reset(SyncMain(vault_.syncer_,
- throttled, continue_sync_cycle, &initial_sync_for_thread, &nudged));
+ scoped_refptr<SyncSession> session;
+ session = SyncMain(vault_.syncer_,
+ throttled, continue_sync_cycle, &initial_sync_for_thread, &nudged);
// Update timing information for how often these datatypes are triggering
// nudges.
@@ -535,12 +535,12 @@ SyncSession* SyncerThread::SyncMain(Syncer* syncer, bool was_throttled,
session_context_->registrar()->GetWorkers(&workers);
SyncSourceInfo info(GetAndResetNudgeSource(was_throttled,
continue_sync_cycle, initial_sync_for_thread, was_nudged));
- scoped_ptr<SyncSession> session;
+ scoped_refptr<SyncSession> session;
AutoUnlock unlock(lock_);
do {
- session.reset(new SyncSession(session_context_.get(), this,
- info, routes, workers));
+ session = new SyncSession(session_context_.get(), this,
+ info, routes, workers);
VLOG(1) << "Calling SyncShare.";
syncer->SyncShare(session.get());
} while (session->HasMoreToSync() && silenced_until_.is_null());

Powered by Google App Engine
This is Rietveld 408576698