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

Side by Side Diff: sync/engine/sync_engine_event.h

Issue 11624037: [sync] Componentize sync: Part 6: Add more SYNC_EXPORTs to files in src/sync/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase (no code changes) Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sync/engine/process_updates_command.h ('k') | sync/engine/sync_scheduler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SYNC_ENGINE_SYNC_ENGINE_EVENT_H_ 5 #ifndef SYNC_ENGINE_SYNC_ENGINE_EVENT_H_
6 #define SYNC_ENGINE_SYNC_ENGINE_EVENT_H_ 6 #define SYNC_ENGINE_SYNC_ENGINE_EVENT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
11 #include "sync/base/sync_export.h"
11 #include "sync/internal_api/public/sessions/sync_session_snapshot.h" 12 #include "sync/internal_api/public/sessions/sync_session_snapshot.h"
12 13
13 namespace syncable { 14 namespace syncable {
14 class Id; 15 class Id;
15 } 16 }
16 17
17 namespace syncer { 18 namespace syncer {
18 19
19 struct SyncEngineEvent { 20 struct SYNC_EXPORT_PRIVATE SyncEngineEvent {
20 enum EventCause { 21 enum EventCause {
21 //////////////////////////////////////////////////////////////// 22 ////////////////////////////////////////////////////////////////
22 // Sent on entry of Syncer state machine 23 // Sent on entry of Syncer state machine
23 SYNC_CYCLE_BEGIN, 24 SYNC_CYCLE_BEGIN,
24 25
25 // SyncerCommand generated events. 26 // SyncerCommand generated events.
26 STATUS_CHANGED, 27 STATUS_CHANGED,
27 28
28 // We have reached the SYNCER_END state in the main sync loop. 29 // We have reached the SYNCER_END state in the main sync loop.
29 SYNC_CYCLE_ENDED, 30 SYNC_CYCLE_ENDED,
(...skipping 20 matching lines...) Expand all
50 51
51 EventCause what_happened; 52 EventCause what_happened;
52 53
53 // The last session used for syncing. 54 // The last session used for syncing.
54 sessions::SyncSessionSnapshot snapshot; 55 sessions::SyncSessionSnapshot snapshot;
55 56
56 // Update-Client-Auth returns a new token for sync use. 57 // Update-Client-Auth returns a new token for sync use.
57 std::string updated_token; 58 std::string updated_token;
58 }; 59 };
59 60
60 class SyncEngineEventListener { 61 class SYNC_EXPORT_PRIVATE SyncEngineEventListener {
61 public: 62 public:
62 // TODO(tim): Consider splitting this up to multiple callbacks, rather than 63 // TODO(tim): Consider splitting this up to multiple callbacks, rather than
63 // have to do Event e(type); OnSyncEngineEvent(e); at all callsites, 64 // have to do Event e(type); OnSyncEngineEvent(e); at all callsites,
64 virtual void OnSyncEngineEvent(const SyncEngineEvent& event) = 0; 65 virtual void OnSyncEngineEvent(const SyncEngineEvent& event) = 0;
65 protected: 66 protected:
66 virtual ~SyncEngineEventListener() {} 67 virtual ~SyncEngineEventListener() {}
67 }; 68 };
68 69
69 } // namespace syncer 70 } // namespace syncer
70 71
71 #endif // SYNC_ENGINE_SYNC_ENGINE_EVENT_H_ 72 #endif // SYNC_ENGINE_SYNC_ENGINE_EVENT_H_
OLDNEW
« no previous file with comments | « sync/engine/process_updates_command.h ('k') | sync/engine/sync_scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698