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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 const base::TimeDelta& new_delay) = 0; | 74 const base::TimeDelta& new_delay) = 0; |
75 | 75 |
76 // Called for the syncer to respond to the error sent by the server. | 76 // Called for the syncer to respond to the error sent by the server. |
77 virtual void OnSyncProtocolError( | 77 virtual void OnSyncProtocolError( |
78 const sessions::SyncSessionSnapshot& snapshot) = 0; | 78 const sessions::SyncSessionSnapshot& snapshot) = 0; |
79 | 79 |
80 // Called when the server wants to change the number of hints the client | 80 // Called when the server wants to change the number of hints the client |
81 // will buffer locally. | 81 // will buffer locally. |
82 virtual void OnReceivedClientInvalidationHintBufferSize(int size) = 0; | 82 virtual void OnReceivedClientInvalidationHintBufferSize(int size) = 0; |
83 | 83 |
84 // Called when server wants to schedule a retry GU. | |
85 virtual void OnReceivedGuRetryDelay(const base::TimeDelta& delay) = 0; | |
86 | |
87 protected: | 84 protected: |
88 virtual ~Delegate() {} | 85 virtual ~Delegate() {} |
89 }; | 86 }; |
90 | 87 |
91 // Build a session without a nudge tracker. Used for poll or configure type | 88 // Build a session without a nudge tracker. Used for poll or configure type |
92 // sync cycles. | 89 // sync cycles. |
93 static SyncSession* Build(SyncSessionContext* context, | 90 static SyncSession* Build(SyncSessionContext* context, |
94 Delegate* delegate); | 91 Delegate* delegate); |
95 ~SyncSession(); | 92 ~SyncSession(); |
96 | 93 |
(...skipping 30 matching lines...) Expand all Loading... |
127 // Our controller for various status and error counters. | 124 // Our controller for various status and error counters. |
128 scoped_ptr<StatusController> status_controller_; | 125 scoped_ptr<StatusController> status_controller_; |
129 | 126 |
130 DISALLOW_COPY_AND_ASSIGN(SyncSession); | 127 DISALLOW_COPY_AND_ASSIGN(SyncSession); |
131 }; | 128 }; |
132 | 129 |
133 } // namespace sessions | 130 } // namespace sessions |
134 } // namespace syncer | 131 } // namespace syncer |
135 | 132 |
136 #endif // SYNC_SESSIONS_SYNC_SESSION_H_ | 133 #endif // SYNC_SESSIONS_SYNC_SESSION_H_ |
OLD | NEW |