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

Side by Side Diff: sync/engine/syncer.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/sync_session_job.h ('k') | sync/engine/syncer_command.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 (c) 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_SYNCER_H_ 5 #ifndef SYNC_ENGINE_SYNCER_H_
6 #define SYNC_ENGINE_SYNCER_H_ 6 #define SYNC_ENGINE_SYNCER_H_
7 7
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/gtest_prod_util.h" 12 #include "base/gtest_prod_util.h"
13 #include "base/synchronization/lock.h" 13 #include "base/synchronization/lock.h"
14 #include "sync/base/sync_export.h"
14 #include "sync/engine/conflict_resolver.h" 15 #include "sync/engine/conflict_resolver.h"
15 #include "sync/engine/syncer_types.h" 16 #include "sync/engine/syncer_types.h"
16 #include "sync/internal_api/public/base/model_type.h" 17 #include "sync/internal_api/public/base/model_type.h"
17 #include "sync/sessions/sync_session.h" 18 #include "sync/sessions/sync_session.h"
18 #include "sync/util/extensions_activity_monitor.h" 19 #include "sync/util/extensions_activity_monitor.h"
19 20
20 namespace syncer { 21 namespace syncer {
21 22
22 namespace syncable { 23 namespace syncable {
23 class Entry; 24 class Entry;
(...skipping 13 matching lines...) Expand all
37 // A Syncer provides a control interface for driving the individual steps 38 // A Syncer provides a control interface for driving the individual steps
38 // of the sync cycle. Each cycle (hopefully) moves the client into closer 39 // of the sync cycle. Each cycle (hopefully) moves the client into closer
39 // synchronization with the server. The individual steps are modeled 40 // synchronization with the server. The individual steps are modeled
40 // as SyncerCommands, and the ordering of the steps is expressed using 41 // as SyncerCommands, and the ordering of the steps is expressed using
41 // the SyncerStep enum. 42 // the SyncerStep enum.
42 // 43 //
43 // A Syncer instance expects to run on a dedicated thread. Calls 44 // A Syncer instance expects to run on a dedicated thread. Calls
44 // to SyncShare() may take an unbounded amount of time, as SyncerCommands 45 // to SyncShare() may take an unbounded amount of time, as SyncerCommands
45 // may block on network i/o, on lock contention, or on tasks posted to 46 // may block on network i/o, on lock contention, or on tasks posted to
46 // other threads. 47 // other threads.
47 class Syncer { 48 class SYNC_EXPORT_PRIVATE Syncer {
48 public: 49 public:
49 typedef std::vector<int64> UnsyncedMetaHandles; 50 typedef std::vector<int64> UnsyncedMetaHandles;
50 51
51 Syncer(); 52 Syncer();
52 virtual ~Syncer(); 53 virtual ~Syncer();
53 54
54 // Called by other threads to tell the syncer to stop what it's doing 55 // Called by other threads to tell the syncer to stop what it's doing
55 // and return early from SyncShare, if possible. 56 // and return early from SyncShare, if possible.
56 bool ExitRequested(); 57 bool ExitRequested();
57 void RequestEarlyExit(); 58 void RequestEarlyExit();
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 }; 94 };
94 95
95 // Utility function declarations. 96 // Utility function declarations.
96 void CopyServerFields(syncable::Entry* src, syncable::MutableEntry* dest); 97 void CopyServerFields(syncable::Entry* src, syncable::MutableEntry* dest);
97 void ClearServerData(syncable::MutableEntry* entry); 98 void ClearServerData(syncable::MutableEntry* entry);
98 const char* SyncerStepToString(const SyncerStep); 99 const char* SyncerStepToString(const SyncerStep);
99 100
100 } // namespace syncer 101 } // namespace syncer
101 102
102 #endif // SYNC_ENGINE_SYNCER_H_ 103 #endif // SYNC_ENGINE_SYNCER_H_
OLDNEW
« no previous file with comments | « sync/engine/sync_session_job.h ('k') | sync/engine/syncer_command.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698