| OLD | NEW | 
|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include "chrome/browser/sync/engine/syncer_thread.h" | 5 #include "chrome/browser/sync/engine/syncer_thread.h" | 
| 6 | 6 | 
| 7 #include <algorithm> | 7 #include <algorithm> | 
| 8 #include <map> | 8 #include <map> | 
| 9 #include <queue> | 9 #include <queue> | 
| 10 | 10 | 
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 549   silenced_until_ = base::TimeTicks(); | 549   silenced_until_ = base::TimeTicks(); | 
| 550 | 550 | 
| 551   ModelSafeRoutingInfo routes; | 551   ModelSafeRoutingInfo routes; | 
| 552   std::vector<ModelSafeWorker*> workers; | 552   std::vector<ModelSafeWorker*> workers; | 
| 553   session_context_->registrar()->GetModelSafeRoutingInfo(&routes); | 553   session_context_->registrar()->GetModelSafeRoutingInfo(&routes); | 
| 554   session_context_->registrar()->GetWorkers(&workers); | 554   session_context_->registrar()->GetWorkers(&workers); | 
| 555   SyncSourceInfo info(GetAndResetNudgeSource(was_throttled, | 555   SyncSourceInfo info(GetAndResetNudgeSource(was_throttled, | 
| 556       continue_sync_cycle, initial_sync_for_thread, was_nudged)); | 556       continue_sync_cycle, initial_sync_for_thread, was_nudged)); | 
| 557   scoped_ptr<SyncSession> session; | 557   scoped_ptr<SyncSession> session; | 
| 558 | 558 | 
| 559   AutoUnlock unlock(lock_); | 559   base::AutoUnlock unlock(lock_); | 
| 560   do { | 560   do { | 
| 561     session.reset(new SyncSession(session_context_.get(), this, | 561     session.reset(new SyncSession(session_context_.get(), this, | 
| 562                                   info, routes, workers)); | 562                                   info, routes, workers)); | 
| 563     VLOG(1) << "Calling SyncShare."; | 563     VLOG(1) << "Calling SyncShare."; | 
| 564     syncer->SyncShare(session.get()); | 564     syncer->SyncShare(session.get()); | 
| 565   } while (session->HasMoreToSync() && silenced_until_.is_null()); | 565   } while (session->HasMoreToSync() && silenced_until_.is_null()); | 
| 566 | 566 | 
| 567   VLOG(1) << "Done calling SyncShare."; | 567   VLOG(1) << "Done calling SyncShare."; | 
| 568   return session.release(); | 568   return session.release(); | 
| 569 } | 569 } | 
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 842     was_logged = true; | 842     was_logged = true; | 
| 843     VLOG(1) << "UserIdleTime unimplemented on this platform, synchronization " | 843     VLOG(1) << "UserIdleTime unimplemented on this platform, synchronization " | 
| 844                "will not throttle when user idle"; | 844                "will not throttle when user idle"; | 
| 845   } | 845   } | 
| 846 #endif | 846 #endif | 
| 847 | 847 | 
| 848   return 0; | 848   return 0; | 
| 849 } | 849 } | 
| 850 | 850 | 
| 851 }  // namespace browser_sync | 851 }  // namespace browser_sync | 
| OLD | NEW | 
|---|