| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 representing an attempt to synchronize the local syncable data | 5 // A class representing an attempt to synchronize the local syncable data |
| 6 // store with a sync server. A SyncSession instance is passed as a stateful | 6 // store with a sync server. A SyncSession instance is passed as a stateful |
| 7 // bundle throughout the sync cycle. The SyncSession is not reused across | 7 // bundle throughout the sync cycle. The SyncSession is not reused across |
| 8 // sync cycles; each cycle starts with a new one. | 8 // sync cycles; each cycle starts with a new one. |
| 9 | 9 |
| 10 #ifndef SYNC_SESSIONS_SYNC_SESSION_H_ | 10 #ifndef SYNC_SESSIONS_SYNC_SESSION_H_ |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 virtual void OnSyncProtocolError( | 79 virtual void OnSyncProtocolError( |
| 80 const SyncProtocolError& sync_protocol_error) = 0; | 80 const SyncProtocolError& sync_protocol_error) = 0; |
| 81 | 81 |
| 82 // Called when the server wants to change the number of hints the client | 82 // Called when the server wants to change the number of hints the client |
| 83 // will buffer locally. | 83 // will buffer locally. |
| 84 virtual void OnReceivedClientInvalidationHintBufferSize(int size) = 0; | 84 virtual void OnReceivedClientInvalidationHintBufferSize(int size) = 0; |
| 85 | 85 |
| 86 // Called when server wants to schedule a retry GU. | 86 // Called when server wants to schedule a retry GU. |
| 87 virtual void OnReceivedGuRetryDelay(const base::TimeDelta& delay) = 0; | 87 virtual void OnReceivedGuRetryDelay(const base::TimeDelta& delay) = 0; |
| 88 | 88 |
| 89 // Called when server requests a migration. |
| 90 virtual void OnReceivedMigrationRequest(ModelTypeSet types) = 0; |
| 91 |
| 89 protected: | 92 protected: |
| 90 virtual ~Delegate() {} | 93 virtual ~Delegate() {} |
| 91 }; | 94 }; |
| 92 | 95 |
| 93 // Build a session without a nudge tracker. Used for poll or configure type | 96 // Build a session without a nudge tracker. Used for poll or configure type |
| 94 // sync cycles. | 97 // sync cycles. |
| 95 static SyncSession* Build(SyncSessionContext* context, | 98 static SyncSession* Build(SyncSessionContext* context, |
| 96 Delegate* delegate); | 99 Delegate* delegate); |
| 97 ~SyncSession(); | 100 ~SyncSession(); |
| 98 | 101 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 129 // Our controller for various status and error counters. | 132 // Our controller for various status and error counters. |
| 130 scoped_ptr<StatusController> status_controller_; | 133 scoped_ptr<StatusController> status_controller_; |
| 131 | 134 |
| 132 DISALLOW_COPY_AND_ASSIGN(SyncSession); | 135 DISALLOW_COPY_AND_ASSIGN(SyncSession); |
| 133 }; | 136 }; |
| 134 | 137 |
| 135 } // namespace sessions | 138 } // namespace sessions |
| 136 } // namespace syncer | 139 } // namespace syncer |
| 137 | 140 |
| 138 #endif // SYNC_SESSIONS_SYNC_SESSION_H_ | 141 #endif // SYNC_SESSIONS_SYNC_SESSION_H_ |
| OLD | NEW |