| 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 79%
|
| rename from components/sync/sessions_impl/sync_session_context.h
|
| rename to components/sync/engine_impl/cycle/sync_cycle_context.h
|
| index 11f6183fe61b9635164541065432bddc5c382d5f..cedd99e14e4e600206399e413e026d822c7c3b3c 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,9 +21,9 @@
|
| #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 {
|
|
|
| @@ -38,22 +38,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_; }
|
| @@ -123,11 +120,6 @@ class SyncSessionContext {
|
| void set_cookie_jar_empty(bool empty_jar) { cookie_jar_empty_ = empty_jar; }
|
|
|
| private:
|
| - // Rather than force clients to set and null-out various context members, we
|
| - // extend our encapsulation boundary to scoped helpers that take care of this
|
| - // once they are allocated. See definitions of these below.
|
| - friend class TestScopedSessionEventListener;
|
| -
|
| base::ObserverList<SyncEngineEventListener> listeners_;
|
|
|
| ServerConnectionManager* const connection_manager_;
|
| @@ -184,10 +176,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_
|
|
|