| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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. A context is accessible via | 6 // components specific to a SyncSession. A context is accessible via |
| 7 // a SyncSession so that session SyncerCommands and parts of the engine have | 7 // a SyncSession so that session SyncerCommands and parts of the engine have |
| 8 // a convenient way to access other parts. In this way it can be thought of as | 8 // a convenient way to access other parts. In this way it can be thought of as |
| 9 // the surrounding environment for the SyncSession. The components of this | 9 // the surrounding environment for the SyncSession. The components of this |
| 10 // environment are either valid or not valid for the entire context lifetime, | 10 // environment are either valid or not valid for the entire context lifetime, |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 static const int kDefaultMaxCommitBatchSize = 25; | 45 static const int kDefaultMaxCommitBatchSize = 25; |
| 46 | 46 |
| 47 namespace sessions { | 47 namespace sessions { |
| 48 class ScopedSessionContextConflictResolver; | 48 class ScopedSessionContextConflictResolver; |
| 49 class TestScopedSessionEventListener; | 49 class TestScopedSessionEventListener; |
| 50 | 50 |
| 51 class SyncSessionContext { | 51 class SyncSessionContext { |
| 52 public: | 52 public: |
| 53 SyncSessionContext(ServerConnectionManager* connection_manager, | 53 SyncSessionContext(ServerConnectionManager* connection_manager, |
| 54 syncable::Directory* directory, | 54 syncable::Directory* directory, |
| 55 const ModelSafeRoutingInfo& model_safe_routing_info, | |
| 56 const std::vector<ModelSafeWorker*>& workers, | 55 const std::vector<ModelSafeWorker*>& workers, |
| 57 ExtensionsActivityMonitor* extensions_activity_monitor, | 56 ExtensionsActivityMonitor* extensions_activity_monitor, |
| 58 const std::vector<SyncEngineEventListener*>& listeners, | 57 const std::vector<SyncEngineEventListener*>& listeners, |
| 59 DebugInfoGetter* debug_info_getter, | 58 DebugInfoGetter* debug_info_getter, |
| 60 browser_sync::TrafficRecorder* traffic_recorder); | 59 browser_sync::TrafficRecorder* traffic_recorder); |
| 61 | 60 |
| 62 // Empty constructor for unit tests. | 61 // Empty constructor for unit tests. |
| 63 SyncSessionContext(); | 62 SyncSessionContext(); |
| 64 virtual ~SyncSessionContext(); | 63 virtual ~SyncSessionContext(); |
| 65 | 64 |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 private: | 216 private: |
| 218 SyncSessionContext* context_; | 217 SyncSessionContext* context_; |
| 219 ConflictResolver* resolver_; | 218 ConflictResolver* resolver_; |
| 220 DISALLOW_COPY_AND_ASSIGN(ScopedSessionContextConflictResolver); | 219 DISALLOW_COPY_AND_ASSIGN(ScopedSessionContextConflictResolver); |
| 221 }; | 220 }; |
| 222 | 221 |
| 223 } // namespace sessions | 222 } // namespace sessions |
| 224 } // namespace browser_sync | 223 } // namespace browser_sync |
| 225 | 224 |
| 226 #endif // SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_ | 225 #endif // SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_ |
| OLD | NEW |