| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 virtual bool IsSyncingCurrentlySilenced() OVERRIDE; | 115 virtual bool IsSyncingCurrentlySilenced() OVERRIDE; |
| 116 virtual void OnReceivedShortPollIntervalUpdate( | 116 virtual void OnReceivedShortPollIntervalUpdate( |
| 117 const base::TimeDelta& new_interval) OVERRIDE; | 117 const base::TimeDelta& new_interval) OVERRIDE; |
| 118 virtual void OnReceivedLongPollIntervalUpdate( | 118 virtual void OnReceivedLongPollIntervalUpdate( |
| 119 const base::TimeDelta& new_interval) OVERRIDE; | 119 const base::TimeDelta& new_interval) OVERRIDE; |
| 120 virtual void OnReceivedSessionsCommitDelay( | 120 virtual void OnReceivedSessionsCommitDelay( |
| 121 const base::TimeDelta& new_delay) OVERRIDE; | 121 const base::TimeDelta& new_delay) OVERRIDE; |
| 122 virtual void OnShouldStopSyncingPermanently() OVERRIDE; | 122 virtual void OnShouldStopSyncingPermanently() OVERRIDE; |
| 123 virtual void OnSyncProtocolError( | 123 virtual void OnSyncProtocolError( |
| 124 const sessions::SyncSessionSnapshot& snapshot) OVERRIDE; | 124 const sessions::SyncSessionSnapshot& snapshot) OVERRIDE; |
| 125 virtual void OnUnrecoverableError( |
| 126 const tracked_objects::Location& from_here, |
| 127 const std::string& message) OVERRIDE; |
| 125 | 128 |
| 126 // ServerConnectionEventListener implementation. | 129 // ServerConnectionEventListener implementation. |
| 127 // TODO(tim): schedule a nudge when valid connection detected? in 1 minute? | 130 // TODO(tim): schedule a nudge when valid connection detected? in 1 minute? |
| 128 virtual void OnServerConnectionEvent( | 131 virtual void OnServerConnectionEvent( |
| 129 const ServerConnectionEvent& event) OVERRIDE; | 132 const ServerConnectionEvent& event) OVERRIDE; |
| 130 | 133 |
| 131 private: | 134 private: |
| 132 enum JobProcessDecision { | 135 enum JobProcessDecision { |
| 133 // Indicates we should continue with the current job. | 136 // Indicates we should continue with the current job. |
| 134 CONTINUE, | 137 CONTINUE, |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 scoped_ptr<Syncer> syncer_; | 413 scoped_ptr<Syncer> syncer_; |
| 411 | 414 |
| 412 scoped_ptr<sessions::SyncSessionContext> session_context_; | 415 scoped_ptr<sessions::SyncSessionContext> session_context_; |
| 413 | 416 |
| 414 DISALLOW_COPY_AND_ASSIGN(SyncScheduler); | 417 DISALLOW_COPY_AND_ASSIGN(SyncScheduler); |
| 415 }; | 418 }; |
| 416 | 419 |
| 417 } // namespace browser_sync | 420 } // namespace browser_sync |
| 418 | 421 |
| 419 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNC_SCHEDULER_H_ | 422 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNC_SCHEDULER_H_ |
| OLD | NEW |