| Index: components/sync/engine_impl/cycle/sync_cycle.cc
|
| diff --git a/components/sync/sessions_impl/sync_session.cc b/components/sync/engine_impl/cycle/sync_cycle.cc
|
| similarity index 78%
|
| rename from components/sync/sessions_impl/sync_session.cc
|
| rename to components/sync/engine_impl/cycle/sync_cycle.cc
|
| index bb6e492df98de50f89de994bba4ca29e2f5f3fd1..0b4f337fe42094d7fa8674e2b0f1342cdf2aef9c 100644
|
| --- a/components/sync/sessions_impl/sync_session.cc
|
| +++ b/components/sync/engine_impl/cycle/sync_cycle.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "components/sync/sessions_impl/sync_session.h"
|
| +#include "components/sync/engine_impl/cycle/sync_cycle.h"
|
|
|
| #include <algorithm>
|
| #include <iterator>
|
| @@ -13,26 +13,24 @@
|
| #include "components/sync/syncable/directory.h"
|
|
|
| namespace syncer {
|
| -namespace sessions {
|
|
|
| // static
|
| -SyncSession* SyncSession::Build(SyncSessionContext* context,
|
| - Delegate* delegate) {
|
| - return new SyncSession(context, delegate);
|
| +SyncCycle* SyncCycle::Build(SyncCycleContext* context, Delegate* delegate) {
|
| + return new SyncCycle(context, delegate);
|
| }
|
|
|
| -SyncSession::SyncSession(SyncSessionContext* context, Delegate* delegate)
|
| +SyncCycle::SyncCycle(SyncCycleContext* context, Delegate* delegate)
|
| : context_(context), delegate_(delegate) {
|
| status_controller_.reset(new StatusController());
|
| }
|
|
|
| -SyncSession::~SyncSession() {}
|
| +SyncCycle::~SyncCycle() {}
|
|
|
| -SyncSessionSnapshot SyncSession::TakeSnapshot() const {
|
| +SyncCycleSnapshot SyncCycle::TakeSnapshot() const {
|
| return TakeSnapshotWithSource(sync_pb::GetUpdatesCallerInfo::UNKNOWN);
|
| }
|
|
|
| -SyncSessionSnapshot SyncSession::TakeSnapshotWithSource(
|
| +SyncCycleSnapshot SyncCycle::TakeSnapshotWithSource(
|
| sync_pb::GetUpdatesCallerInfo::GetUpdatesSource legacy_updates_source)
|
| const {
|
| syncable::Directory* dir = context_->directory();
|
| @@ -48,7 +46,7 @@ SyncSessionSnapshot SyncSession::TakeSnapshotWithSource(
|
| dir->CollectMetaHandleCounts(&num_entries_by_type,
|
| &num_to_delete_entries_by_type);
|
|
|
| - SyncSessionSnapshot snapshot(
|
| + SyncCycleSnapshot snapshot(
|
| status_controller_->model_neutral_state(), download_progress_markers,
|
| delegate_->IsCurrentlyThrottled(),
|
| status_controller_->num_encryption_conflicts(),
|
| @@ -62,7 +60,7 @@ SyncSessionSnapshot SyncSession::TakeSnapshotWithSource(
|
| return snapshot;
|
| }
|
|
|
| -void SyncSession::SendSyncCycleEndEventNotification(
|
| +void SyncCycle::SendSyncCycleEndEventNotification(
|
| sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source) {
|
| SyncCycleEvent event(SyncCycleEvent::SYNC_CYCLE_ENDED);
|
| event.snapshot = TakeSnapshotWithSource(source);
|
| @@ -73,7 +71,7 @@ void SyncSession::SendSyncCycleEndEventNotification(
|
| OnSyncCycleEvent(event));
|
| }
|
|
|
| -void SyncSession::SendEventNotification(SyncCycleEvent::EventCause cause) {
|
| +void SyncCycle::SendEventNotification(SyncCycleEvent::EventCause cause) {
|
| SyncCycleEvent event(cause);
|
| event.snapshot = TakeSnapshot();
|
|
|
| @@ -82,10 +80,9 @@ void SyncSession::SendEventNotification(SyncCycleEvent::EventCause cause) {
|
| OnSyncCycleEvent(event));
|
| }
|
|
|
| -void SyncSession::SendProtocolEvent(const ProtocolEvent& event) {
|
| +void SyncCycle::SendProtocolEvent(const ProtocolEvent& event) {
|
| FOR_EACH_OBSERVER(SyncEngineEventListener, *(context_->listeners()),
|
| OnProtocolEvent(event));
|
| }
|
|
|
| -} // namespace sessions
|
| } // namespace syncer
|
|
|