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

Unified Diff: sync/engine/syncer_types.h

Issue 10197004: [Sync] Convert SyncSessionSnapshot to a copy-able class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 8 years, 8 months 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 | « sync/engine/syncer_command.cc ('k') | sync/engine/syncer_types.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/syncer_types.h
diff --git a/sync/engine/syncer_types.h b/sync/engine/syncer_types.h
index c34621e710a2c75a1b00ccded0833d2a78a5623e..5639d98f7183e2e5b3a23f24068d82a6fe22be81 100644
--- a/sync/engine/syncer_types.h
+++ b/sync/engine/syncer_types.h
@@ -6,26 +6,10 @@
#define SYNC_ENGINE_SYNCER_TYPES_H_
#pragma once
-#include <map>
-#include <string>
-#include <vector>
-
-#include "base/observer_list.h"
-#include "sync/syncable/model_type.h"
-
-namespace syncable {
-class Id;
-}
-
// The intent of this is to keep all shared data types and enums for the syncer
// in a single place without having dependencies between other files.
namespace browser_sync {
-namespace sessions {
-struct SyncSessionSnapshot;
-}
-class Syncer;
-
enum UpdateAttemptResponse {
// Update was applied or safely ignored.
SUCCESS,
@@ -98,61 +82,6 @@ enum VerifyCommitResult {
VERIFY_OK,
};
-struct SyncEngineEvent {
- enum EventCause {
- ////////////////////////////////////////////////////////////////
- // Sent on entry of Syncer state machine
- SYNC_CYCLE_BEGIN,
-
- // SyncerCommand generated events.
- STATUS_CHANGED,
-
- // We have reached the SYNCER_END state in the main sync loop.
- SYNC_CYCLE_ENDED,
-
- ////////////////////////////////////////////////////////////////
- // Generated in response to specific protocol actions or events.
-
- // New token in updated_token.
- UPDATED_TOKEN,
-
- // This is sent after the Syncer (and SyncerThread) have initiated self
- // halt due to no longer being permitted to communicate with the server.
- // The listener should sever the sync / browser connections and delete sync
- // data (i.e. as if the user clicked 'Stop Syncing' in the browser.
- STOP_SYNCING_PERMANENTLY,
-
- // These events are sent to indicate when we know the clearing of
- // server data have failed or succeeded.
- CLEAR_SERVER_DATA_SUCCEEDED,
- CLEAR_SERVER_DATA_FAILED,
-
- // This event is sent when we receive an actionable error. It is upto
- // the listeners to figure out the action to take using the snapshot sent.
- ACTIONABLE_ERROR,
- };
-
- explicit SyncEngineEvent(EventCause cause);
- ~SyncEngineEvent();
-
- EventCause what_happened;
-
- // The last session used for syncing.
- const sessions::SyncSessionSnapshot* snapshot;
-
- // Update-Client-Auth returns a new token for sync use.
- std::string updated_token;
-};
-
-class SyncEngineEventListener {
- public:
- // TODO(tim): Consider splitting this up to multiple callbacks, rather than
- // have to do Event e(type); OnSyncEngineEvent(e); at all callsites,
- virtual void OnSyncEngineEvent(const SyncEngineEvent& event) = 0;
- protected:
- virtual ~SyncEngineEventListener() {}
-};
-
} // namespace browser_sync
#endif // SYNC_ENGINE_SYNCER_TYPES_H_
« no previous file with comments | « sync/engine/syncer_command.cc ('k') | sync/engine/syncer_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698