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

Side by Side Diff: components/sync/engine_impl/directory_commit_contribution.h

Issue 2240613002: [Sync] Convert sync to a static library. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Try getting rid of sync_core source set. Created 4 years, 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_SYNC_ENGINE_IMPL_DIRECTORY_COMMIT_CONTRIBUTION_H_ 5 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_DIRECTORY_COMMIT_CONTRIBUTION_H_
6 #define COMPONENTS_SYNC_ENGINE_IMPL_DIRECTORY_COMMIT_CONTRIBUTION_H_ 6 #define COMPONENTS_SYNC_ENGINE_IMPL_DIRECTORY_COMMIT_CONTRIBUTION_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <memory> 11 #include <memory>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/gtest_prod_util.h" 14 #include "base/gtest_prod_util.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "components/sync/base/model_type.h" 16 #include "components/sync/base/model_type.h"
17 #include "components/sync/base/sync_export.h"
18 #include "components/sync/base/syncer_error.h" 17 #include "components/sync/base/syncer_error.h"
19 #include "components/sync/engine_impl/commit_contribution.h" 18 #include "components/sync/engine_impl/commit_contribution.h"
20 #include "components/sync/protocol/sync.pb.h" 19 #include "components/sync/protocol/sync.pb.h"
21 #include "components/sync/sessions_impl/directory_type_debug_info_emitter.h" 20 #include "components/sync/sessions_impl/directory_type_debug_info_emitter.h"
22 #include "components/sync/sessions_impl/status_controller.h" 21 #include "components/sync/sessions_impl/status_controller.h"
23 22
24 namespace syncer { 23 namespace syncer {
25 24
26 namespace sessions { 25 namespace sessions {
27 class StatusController; 26 class StatusController;
28 } // namespace sessions 27 } // namespace sessions
29 28
30 namespace syncable { 29 namespace syncable {
31 class Directory; 30 class Directory;
32 } // namespace syncable 31 } // namespace syncable
33 32
34 // This class represents a set of items belonging to a particular data type that 33 // This class represents a set of items belonging to a particular data type that
35 // have been selected from the syncable Directory and prepared for commit. 34 // have been selected from the syncable Directory and prepared for commit.
36 // 35 //
37 // This class handles the bookkeeping related to the commit of these items, 36 // This class handles the bookkeeping related to the commit of these items,
38 // including processing the commit response message and setting and unsetting 37 // including processing the commit response message and setting and unsetting
39 // the SYNCING bits. 38 // the SYNCING bits.
40 class SYNC_EXPORT DirectoryCommitContribution : public CommitContribution { 39 class DirectoryCommitContribution : public CommitContribution {
41 public: 40 public:
42 // This destructor will DCHECK if UnsetSyncingBits() has not been called yet. 41 // This destructor will DCHECK if UnsetSyncingBits() has not been called yet.
43 ~DirectoryCommitContribution() override; 42 ~DirectoryCommitContribution() override;
44 43
45 // Build a CommitContribution from the IS_UNSYNCED items in |dir| with the 44 // Build a CommitContribution from the IS_UNSYNCED items in |dir| with the
46 // given |type|. The contribution will include at most |max_items| entries. 45 // given |type|. The contribution will include at most |max_items| entries.
47 // 46 //
48 // This function may return NULL if this type has no items ready for and 47 // This function may return NULL if this type has no items ready for and
49 // requiring commit. This function may make model neutral changes to the 48 // requiring commit. This function may make model neutral changes to the
50 // directory. 49 // directory.
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 105
107 // A pointer to the commit counters of our parent CommitContributor. 106 // A pointer to the commit counters of our parent CommitContributor.
108 DirectoryTypeDebugInfoEmitter* debug_info_emitter_; 107 DirectoryTypeDebugInfoEmitter* debug_info_emitter_;
109 108
110 DISALLOW_COPY_AND_ASSIGN(DirectoryCommitContribution); 109 DISALLOW_COPY_AND_ASSIGN(DirectoryCommitContribution);
111 }; 110 };
112 111
113 } // namespace syncer 112 } // namespace syncer
114 113
115 #endif // COMPONENTS_SYNC_ENGINE_IMPL_DIRECTORY_COMMIT_CONTRIBUTION_H_ 114 #endif // COMPONENTS_SYNC_ENGINE_IMPL_DIRECTORY_COMMIT_CONTRIBUTION_H_
OLDNEW
« no previous file with comments | « components/sync/engine_impl/commit_util.h ('k') | components/sync/engine_impl/directory_update_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698