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

Side by Side Diff: sync/sessions/ordered_commit_set.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/sessions/debug_info_getter.h ('k') | sync/sessions/status_controller.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_SESSIONS_ORDERED_COMMIT_SET_H_ 5 #ifndef SYNC_SESSIONS_ORDERED_COMMIT_SET_H_
6 #define SYNC_SESSIONS_ORDERED_COMMIT_SET_H_ 6 #define SYNC_SESSIONS_ORDERED_COMMIT_SET_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
11 11
12 #include "sync/base/sync_export.h"
12 #include "sync/internal_api/public/base/model_type.h" 13 #include "sync/internal_api/public/base/model_type.h"
13 #include "sync/internal_api/public/engine/model_safe_worker.h" 14 #include "sync/internal_api/public/engine/model_safe_worker.h"
14 #include "sync/syncable/syncable_id.h" 15 #include "sync/syncable/syncable_id.h"
15 16
16 namespace syncer { 17 namespace syncer {
17 namespace sessions { 18 namespace sessions {
18 19
19 // TODO(ncarter): This code is more generic than just Commit and can 20 // TODO(ncarter): This code is more generic than just Commit and can
20 // be reused elsewhere (e.g. ChangeReorderBuffer do similar things). Merge 21 // be reused elsewhere (e.g. ChangeReorderBuffer do similar things). Merge
21 // all these implementations. 22 // all these implementations.
22 class OrderedCommitSet { 23 class SYNC_EXPORT_PRIVATE OrderedCommitSet {
23 public: 24 public:
24 // A list of indices into the full list of commit ids such that: 25 // A list of indices into the full list of commit ids such that:
25 // 1 - each element is an index belonging to a particular ModelSafeGroup. 26 // 1 - each element is an index belonging to a particular ModelSafeGroup.
26 // 2 - the vector is in sorted (smallest to largest) order. 27 // 2 - the vector is in sorted (smallest to largest) order.
27 // 3 - each element is a valid index for GetCommitItemAt. 28 // 3 - each element is a valid index for GetCommitItemAt.
28 // See GetCommitIdProjection for usage. 29 // See GetCommitIdProjection for usage.
29 typedef std::vector<size_t> Projection; 30 typedef std::vector<size_t> Projection;
30 31
31 // TODO(chron): Reserve space according to batch size? 32 // TODO(chron): Reserve space according to batch size?
32 explicit OrderedCommitSet(const ModelSafeRoutingInfo& routes); 33 explicit OrderedCommitSet(const ModelSafeRoutingInfo& routes);
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 std::vector<ModelType> types_; 116 std::vector<ModelType> types_;
116 117
117 ModelSafeRoutingInfo routes_; 118 ModelSafeRoutingInfo routes_;
118 }; 119 };
119 120
120 } // namespace sessions 121 } // namespace sessions
121 } // namespace syncer 122 } // namespace syncer
122 123
123 #endif // SYNC_SESSIONS_ORDERED_COMMIT_SET_H_ 124 #endif // SYNC_SESSIONS_ORDERED_COMMIT_SET_H_
124 125
OLDNEW
« no previous file with comments | « sync/sessions/debug_info_getter.h ('k') | sync/sessions/status_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698