| 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 |
| 11 // context is in use. | 11 // context is in use. |
| 12 // | 12 // |
| 13 // It can only be used from the SyncerThread. | 13 // It can only be used from the SyncerThread. |
| 14 | 14 |
| 15 #ifndef COMPONENTS_SYNC_SESSIONS_IMPL_SYNC_SESSION_CONTEXT_H_ | 15 #ifndef COMPONENTS_SYNC_SESSIONS_IMPL_SYNC_SESSION_CONTEXT_H_ |
| 16 #define COMPONENTS_SYNC_SESSIONS_IMPL_SYNC_SESSION_CONTEXT_H_ | 16 #define COMPONENTS_SYNC_SESSIONS_IMPL_SYNC_SESSION_CONTEXT_H_ |
| 17 | 17 |
| 18 #include <stdint.h> | 18 #include <stdint.h> |
| 19 | 19 |
| 20 #include <string> | 20 #include <string> |
| 21 #include <vector> | 21 #include <vector> |
| 22 | 22 |
| 23 #include "base/macros.h" | 23 #include "base/macros.h" |
| 24 #include "components/sync/base/sync_export.h" | |
| 25 #include "components/sync/engine_impl/sync_engine_event_listener.h" | 24 #include "components/sync/engine_impl/sync_engine_event_listener.h" |
| 26 #include "components/sync/sessions_impl/debug_info_getter.h" | 25 #include "components/sync/sessions_impl/debug_info_getter.h" |
| 27 #include "components/sync/sessions_impl/model_type_registry.h" | 26 #include "components/sync/sessions_impl/model_type_registry.h" |
| 28 | 27 |
| 29 namespace syncer { | 28 namespace syncer { |
| 30 | 29 |
| 31 class ExtensionsActivity; | 30 class ExtensionsActivity; |
| 32 class ModelTypeRegistry; | 31 class ModelTypeRegistry; |
| 33 class ServerConnectionManager; | 32 class ServerConnectionManager; |
| 34 | 33 |
| 35 namespace syncable { | 34 namespace syncable { |
| 36 class Directory; | 35 class Directory; |
| 37 } | 36 } |
| 38 | 37 |
| 39 // Default number of items a client can commit in a single message. | 38 // Default number of items a client can commit in a single message. |
| 40 static const int kDefaultMaxCommitBatchSize = 25; | 39 static const int kDefaultMaxCommitBatchSize = 25; |
| 41 | 40 |
| 42 namespace sessions { | 41 namespace sessions { |
| 43 class TestScopedSessionEventListener; | 42 class TestScopedSessionEventListener; |
| 44 | 43 |
| 45 class SYNC_EXPORT SyncSessionContext { | 44 class SyncSessionContext { |
| 46 public: | 45 public: |
| 47 SyncSessionContext(ServerConnectionManager* connection_manager, | 46 SyncSessionContext(ServerConnectionManager* connection_manager, |
| 48 syncable::Directory* directory, | 47 syncable::Directory* directory, |
| 49 ExtensionsActivity* extensions_activity, | 48 ExtensionsActivity* extensions_activity, |
| 50 const std::vector<SyncEngineEventListener*>& listeners, | 49 const std::vector<SyncEngineEventListener*>& listeners, |
| 51 DebugInfoGetter* debug_info_getter, | 50 DebugInfoGetter* debug_info_getter, |
| 52 ModelTypeRegistry* model_type_registry, | 51 ModelTypeRegistry* model_type_registry, |
| 53 bool keystore_encryption_enabled, | 52 bool keystore_encryption_enabled, |
| 54 bool client_enabled_pre_commit_update_avoidance, | 53 bool client_enabled_pre_commit_update_avoidance, |
| 55 const std::string& invalidator_client_id); | 54 const std::string& invalidator_client_id); |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 // If there's a cookie jar mismatch, whether the cookie jar was empty or not. | 184 // If there's a cookie jar mismatch, whether the cookie jar was empty or not. |
| 186 bool cookie_jar_empty_; | 185 bool cookie_jar_empty_; |
| 187 | 186 |
| 188 DISALLOW_COPY_AND_ASSIGN(SyncSessionContext); | 187 DISALLOW_COPY_AND_ASSIGN(SyncSessionContext); |
| 189 }; | 188 }; |
| 190 | 189 |
| 191 } // namespace sessions | 190 } // namespace sessions |
| 192 } // namespace syncer | 191 } // namespace syncer |
| 193 | 192 |
| 194 #endif // COMPONENTS_SYNC_SESSIONS_IMPL_SYNC_SESSION_CONTEXT_H_ | 193 #endif // COMPONENTS_SYNC_SESSIONS_IMPL_SYNC_SESSION_CONTEXT_H_ |
| OLD | NEW |