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 // SyncSessionContext encapsulates the contextual information and engine | 5 // SyncSessionContext encapsulates the contextual information and engine |
6 // components specific to a SyncSession. Unlike the SyncSession, the context | 6 // components specific to a SyncSession. Unlike the SyncSession, the context |
7 // can be reused across several sync cycles. | 7 // can be reused across several sync cycles. |
8 // | 8 // |
9 // The context does not take ownership of its pointer members. It's up to | 9 // The context does not take ownership of its pointer members. It's up to |
10 // the surrounding classes to ensure those members remain valid while the | 10 // the surrounding classes to ensure those members remain valid while the |
(...skipping 29 matching lines...) Expand all Loading... |
40 } | 40 } |
41 | 41 |
42 // Default number of items a client can commit in a single message. | 42 // Default number of items a client can commit in a single message. |
43 static const int kDefaultMaxCommitBatchSize = 25; | 43 static const int kDefaultMaxCommitBatchSize = 25; |
44 | 44 |
45 namespace sessions { | 45 namespace sessions { |
46 class TestScopedSessionEventListener; | 46 class TestScopedSessionEventListener; |
47 | 47 |
48 class SYNC_EXPORT_PRIVATE SyncSessionContext { | 48 class SYNC_EXPORT_PRIVATE SyncSessionContext { |
49 public: | 49 public: |
50 SyncSessionContext(ServerConnectionManager* connection_manager, | 50 SyncSessionContext( |
51 syncable::Directory* directory, | 51 ServerConnectionManager* connection_manager, |
52 const std::vector<ModelSafeWorker*>& workers, | 52 syncable::Directory* directory, |
53 ExtensionsActivity* extensions_activity, | 53 const std::vector<scoped_refptr<ModelSafeWorker> >& workers, |
54 const std::vector<SyncEngineEventListener*>& listeners, | 54 ExtensionsActivity* extensions_activity, |
55 DebugInfoGetter* debug_info_getter, | 55 const std::vector<SyncEngineEventListener*>& listeners, |
56 TrafficRecorder* traffic_recorder, | 56 DebugInfoGetter* debug_info_getter, |
57 bool keystore_encryption_enabled, | 57 TrafficRecorder* traffic_recorder, |
58 bool client_enabled_pre_commit_update_avoidance, | 58 bool keystore_encryption_enabled, |
59 const std::string& invalidator_client_id); | 59 bool client_enabled_pre_commit_update_avoidance, |
| 60 const std::string& invalidator_client_id); |
60 | 61 |
61 ~SyncSessionContext(); | 62 ~SyncSessionContext(); |
62 | 63 |
63 ServerConnectionManager* connection_manager() { | 64 ServerConnectionManager* connection_manager() { |
64 return connection_manager_; | 65 return connection_manager_; |
65 } | 66 } |
66 syncable::Directory* directory() { | 67 syncable::Directory* directory() { |
67 return directory_; | 68 return directory_; |
68 } | 69 } |
69 | 70 |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 // enable the pre-commit update avoidance experiment described above. | 219 // enable the pre-commit update avoidance experiment described above. |
219 const bool client_enabled_pre_commit_update_avoidance_; | 220 const bool client_enabled_pre_commit_update_avoidance_; |
220 | 221 |
221 DISALLOW_COPY_AND_ASSIGN(SyncSessionContext); | 222 DISALLOW_COPY_AND_ASSIGN(SyncSessionContext); |
222 }; | 223 }; |
223 | 224 |
224 } // namespace sessions | 225 } // namespace sessions |
225 } // namespace syncer | 226 } // namespace syncer |
226 | 227 |
227 #endif // SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_ | 228 #endif // SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_ |
OLD | NEW |