Chromium Code Reviews| Index: components/sync/engine_impl/cycle/sync_cycle_context.h |
| diff --git a/components/sync/sessions_impl/sync_session_context.h b/components/sync/engine_impl/cycle/sync_cycle_context.h |
| similarity index 84% |
| rename from components/sync/sessions_impl/sync_session_context.h |
| rename to components/sync/engine_impl/cycle/sync_cycle_context.h |
| index 11f6183fe61b9635164541065432bddc5c382d5f..7e2dc80697029e94bafda1def785e445bae8270b 100644 |
| --- a/components/sync/sessions_impl/sync_session_context.h |
| +++ b/components/sync/engine_impl/cycle/sync_cycle_context.h |
| @@ -2,8 +2,8 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -// SyncSessionContext encapsulates the contextual information and engine |
| -// components specific to a SyncSession. Unlike the SyncSession, the context |
| +// SyncCycleContext encapsulates the contextual information and engine |
| +// components specific to a SyncCycle. Unlike the SyncCycle, the context |
| // can be reused across several sync cycles. |
| // |
| // The context does not take ownership of its pointer members. It's up to |
| @@ -12,8 +12,8 @@ |
| // |
| // It can only be used from the SyncerThread. |
| -#ifndef COMPONENTS_SYNC_SESSIONS_IMPL_SYNC_SESSION_CONTEXT_H_ |
| -#define COMPONENTS_SYNC_SESSIONS_IMPL_SYNC_SESSION_CONTEXT_H_ |
| +#ifndef COMPONENTS_SYNC_ENGINE_IMPL_CYCLE_SYNC_CYCLE_CONTEXT_H_ |
| +#define COMPONENTS_SYNC_ENGINE_IMPL_CYCLE_SYNC_CYCLE_CONTEXT_H_ |
| #include <stdint.h> |
| @@ -21,15 +21,16 @@ |
| #include <vector> |
| #include "base/macros.h" |
| +#include "components/sync/engine_impl/cycle/debug_info_getter.h" |
| #include "components/sync/engine_impl/model_type_registry.h" |
| #include "components/sync/engine_impl/sync_engine_event_listener.h" |
| -#include "components/sync/sessions_impl/debug_info_getter.h" |
| namespace syncer { |
| class ExtensionsActivity; |
| class ModelTypeRegistry; |
| class ServerConnectionManager; |
| +class TestScopedSessionEventListener; |
|
skym
2016/08/19 17:17:43
Shouldn't need this forward declaration to friend
maxbogue
2016/08/19 19:12:01
You're right, I deleted it because it wasn't used.
|
| namespace syncable { |
| class Directory; |
| @@ -38,22 +39,19 @@ class Directory; |
| // Default number of items a client can commit in a single message. |
| static const int kDefaultMaxCommitBatchSize = 25; |
| -namespace sessions { |
| -class TestScopedSessionEventListener; |
| - |
| -class SyncSessionContext { |
| +class SyncCycleContext { |
| public: |
| - SyncSessionContext(ServerConnectionManager* connection_manager, |
| - syncable::Directory* directory, |
| - ExtensionsActivity* extensions_activity, |
| - const std::vector<SyncEngineEventListener*>& listeners, |
| - DebugInfoGetter* debug_info_getter, |
| - ModelTypeRegistry* model_type_registry, |
| - bool keystore_encryption_enabled, |
| - bool client_enabled_pre_commit_update_avoidance, |
| - const std::string& invalidator_client_id); |
| - |
| - ~SyncSessionContext(); |
| + SyncCycleContext(ServerConnectionManager* connection_manager, |
| + syncable::Directory* directory, |
| + ExtensionsActivity* extensions_activity, |
| + const std::vector<SyncEngineEventListener*>& listeners, |
| + DebugInfoGetter* debug_info_getter, |
| + ModelTypeRegistry* model_type_registry, |
| + bool keystore_encryption_enabled, |
| + bool client_enabled_pre_commit_update_avoidance, |
| + const std::string& invalidator_client_id); |
| + |
| + ~SyncCycleContext(); |
| ServerConnectionManager* connection_manager() { return connection_manager_; } |
| syncable::Directory* directory() { return directory_; } |
| @@ -184,10 +182,9 @@ class SyncSessionContext { |
| // If there's a cookie jar mismatch, whether the cookie jar was empty or not. |
| bool cookie_jar_empty_; |
| - DISALLOW_COPY_AND_ASSIGN(SyncSessionContext); |
| + DISALLOW_COPY_AND_ASSIGN(SyncCycleContext); |
| }; |
| -} // namespace sessions |
| } // namespace syncer |
| -#endif // COMPONENTS_SYNC_SESSIONS_IMPL_SYNC_SESSION_CONTEXT_H_ |
| +#endif // COMPONENTS_SYNC_ENGINE_IMPL_CYCLE_SYNC_CYCLE_CONTEXT_H_ |