Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2313)

Unified Diff: chrome/browser/sync/engine/syncer_end_command.cc

Issue 386030: Relieve SyncerSession,SyncCycleState, SyncProcessState, SyncerSession, Syncer... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sync/engine/syncer_end_command.h ('k') | chrome/browser/sync/engine/syncer_proto_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/engine/syncer_end_command.cc
===================================================================
--- chrome/browser/sync/engine/syncer_end_command.cc (revision 32731)
+++ chrome/browser/sync/engine/syncer_end_command.cc (working copy)
@@ -4,10 +4,8 @@
#include "chrome/browser/sync/engine/syncer_end_command.h"
-#include "chrome/browser/sync/engine/conflict_resolution_view.h"
-#include "chrome/browser/sync/engine/syncer_session.h"
-#include "chrome/browser/sync/engine/syncer_status.h"
#include "chrome/browser/sync/engine/syncer_types.h"
+#include "chrome/browser/sync/sessions/sync_session.h"
#include "chrome/browser/sync/syncable/directory_manager.h"
#include "chrome/browser/sync/util/event_sys-inl.h"
@@ -16,15 +14,16 @@
SyncerEndCommand::SyncerEndCommand() {}
SyncerEndCommand::~SyncerEndCommand() {}
-void SyncerEndCommand::ExecuteImpl(SyncerSession* session) {
- SyncerStatus status(session);
- status.set_syncing(false);
+void SyncerEndCommand::ExecuteImpl(sessions::SyncSession* session) {
+ sessions::StatusController* status(session->status_controller());
+ status->set_syncing(false);
if (!session->HasMoreToSync()) {
// This might be the first time we've fully completed a sync cycle.
- DCHECK(session->got_zero_updates());
+ DCHECK(status->got_zero_updates());
- syncable::ScopedDirLookup dir(session->dirman(), session->account_name());
+ syncable::ScopedDirLookup dir(session->context()->directory_manager(),
+ session->context()->account_name());
if (!dir.good()) {
LOG(ERROR) << "Scoped dir lookup failed!";
return;
@@ -34,9 +33,10 @@
dir->set_initial_sync_ended(true);
}
- SyncerEvent event = { SyncerEvent::SYNC_CYCLE_ENDED };
- event.last_session = session;
- session->syncer_event_channel()->NotifyListeners(event);
+ SyncerEvent event(SyncerEvent::SYNC_CYCLE_ENDED);
+ sessions::SyncSessionSnapshot snapshot(session->TakeSnapshot());
+ event.snapshot = &snapshot;
+ session->context()->syncer_event_channel()->NotifyListeners(event);
}
} // namespace browser_sync
« no previous file with comments | « chrome/browser/sync/engine/syncer_end_command.h ('k') | chrome/browser/sync/engine/syncer_proto_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698