diff options
Diffstat (limited to 'chrome/browser/sync/engine/syncer_thread.cc')
-rw-r--r-- | chrome/browser/sync/engine/syncer_thread.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/chrome/browser/sync/engine/syncer_thread.cc b/chrome/browser/sync/engine/syncer_thread.cc index 12b3435..501577dd 100644 --- a/chrome/browser/sync/engine/syncer_thread.cc +++ b/chrome/browser/sync/engine/syncer_thread.cc @@ -364,6 +364,22 @@ void SyncerThread::ThreadMainLoop() { #endif } +void SyncerThread::SetConnected(bool connected) { + DCHECK(!thread_.IsRunning()); + vault_.connected_ = connected; +} + +void SyncerThread::SetSyncerPollingInterval(base::TimeDelta interval) { + // TODO(timsteele): Use TimeDelta internally. + syncer_polling_interval_ = static_cast<int>(interval.InSeconds()); +} + +void SyncerThread::SetSyncerShortPollInterval(base::TimeDelta interval) { + // TODO(timsteele): Use TimeDelta internally. + syncer_short_poll_interval_seconds_ = + static_cast<int>(interval.InSeconds()); +} + void SyncerThread::WaitUntilConnectedOrQuit() { VLOG(1) << "Syncer thread waiting for connection."; Notify(SyncEngineEvent::SYNCER_THREAD_WAITING_FOR_CONNECTION); @@ -428,6 +444,10 @@ void SyncerThread::ExitPausedState() { Notify(SyncEngineEvent::SYNCER_THREAD_RESUMED); } +void SyncerThread::DisableIdleDetection() { + disable_idle_detection_ = true; +} + // We check how long the user's been idle and sync less often if the machine is // not in use. The aim is to reduce server load. SyncerThread::WaitInterval SyncerThread::CalculatePollingWaitTime( |