OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // A class to schedule syncer tasks intelligently. | 5 // A class to schedule syncer tasks intelligently. |
6 #ifndef CHROME_BROWSER_SYNC_ENGINE_SYNC_SCHEDULER_H_ | 6 #ifndef CHROME_BROWSER_SYNC_ENGINE_SYNC_SCHEDULER_H_ |
7 #define CHROME_BROWSER_SYNC_ENGINE_SYNC_SCHEDULER_H_ | 7 #define CHROME_BROWSER_SYNC_ENGINE_SYNC_SCHEDULER_H_ |
8 #pragma once | 8 #pragma once |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 virtual void OnSilencedUntil( | 110 virtual void OnSilencedUntil( |
111 const base::TimeTicks& silenced_until) OVERRIDE; | 111 const base::TimeTicks& silenced_until) OVERRIDE; |
112 virtual bool IsSyncingCurrentlySilenced() OVERRIDE; | 112 virtual bool IsSyncingCurrentlySilenced() OVERRIDE; |
113 virtual void OnReceivedShortPollIntervalUpdate( | 113 virtual void OnReceivedShortPollIntervalUpdate( |
114 const base::TimeDelta& new_interval) OVERRIDE; | 114 const base::TimeDelta& new_interval) OVERRIDE; |
115 virtual void OnReceivedLongPollIntervalUpdate( | 115 virtual void OnReceivedLongPollIntervalUpdate( |
116 const base::TimeDelta& new_interval) OVERRIDE; | 116 const base::TimeDelta& new_interval) OVERRIDE; |
117 virtual void OnReceivedSessionsCommitDelay( | 117 virtual void OnReceivedSessionsCommitDelay( |
118 const base::TimeDelta& new_delay) OVERRIDE; | 118 const base::TimeDelta& new_delay) OVERRIDE; |
119 virtual void OnShouldStopSyncingPermanently() OVERRIDE; | 119 virtual void OnShouldStopSyncingPermanently() OVERRIDE; |
| 120 virtual void OnRequestEarlyExit() OVERRIDE; |
| 121 virtual void OnActionableError(sessions::SyncSession* session) OVERRIDE; |
120 | 122 |
121 // ServerConnectionEventListener implementation. | 123 // ServerConnectionEventListener implementation. |
122 // TODO(tim): schedule a nudge when valid connection detected? in 1 minute? | 124 // TODO(tim): schedule a nudge when valid connection detected? in 1 minute? |
123 virtual void OnServerConnectionEvent( | 125 virtual void OnServerConnectionEvent( |
124 const ServerConnectionEvent& event) OVERRIDE; | 126 const ServerConnectionEvent& event) OVERRIDE; |
125 | 127 |
126 private: | 128 private: |
127 enum JobProcessDecision { | 129 enum JobProcessDecision { |
128 // Indicates we should continue with the current job. | 130 // Indicates we should continue with the current job. |
129 CONTINUE, | 131 CONTINUE, |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 scoped_ptr<Syncer> syncer_; | 396 scoped_ptr<Syncer> syncer_; |
395 | 397 |
396 scoped_ptr<sessions::SyncSessionContext> session_context_; | 398 scoped_ptr<sessions::SyncSessionContext> session_context_; |
397 | 399 |
398 DISALLOW_COPY_AND_ASSIGN(SyncScheduler); | 400 DISALLOW_COPY_AND_ASSIGN(SyncScheduler); |
399 }; | 401 }; |
400 | 402 |
401 } // namespace browser_sync | 403 } // namespace browser_sync |
402 | 404 |
403 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNC_SCHEDULER_H_ | 405 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNC_SCHEDULER_H_ |
OLD | NEW |