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

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

Issue 1545553003: Switch to standard integer types in sync/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
« no previous file with comments | « sync/engine/conflict_resolver.h ('k') | sync/engine/directory_commit_contribution.cc » ('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 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 SYNC_ENGINE_DIRECTORY_COMMIT_CONTRIBUTION_H_ 5 #ifndef SYNC_ENGINE_DIRECTORY_COMMIT_CONTRIBUTION_H_
6 #define SYNC_ENGINE_DIRECTORY_COMMIT_CONTRIBUTION_H_ 6 #define SYNC_ENGINE_DIRECTORY_COMMIT_CONTRIBUTION_H_
7 7
8 #include <stddef.h>
9 #include <stdint.h>
10
8 #include <vector> 11 #include <vector>
9 12
10 #include "base/gtest_prod_util.h" 13 #include "base/gtest_prod_util.h"
14 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
12 #include "sync/base/sync_export.h" 16 #include "sync/base/sync_export.h"
13 #include "sync/engine/commit_contribution.h" 17 #include "sync/engine/commit_contribution.h"
14 #include "sync/internal_api/public/base/model_type.h" 18 #include "sync/internal_api/public/base/model_type.h"
15 #include "sync/internal_api/public/util/syncer_error.h" 19 #include "sync/internal_api/public/util/syncer_error.h"
16 #include "sync/protocol/sync.pb.h" 20 #include "sync/protocol/sync.pb.h"
17 #include "sync/sessions/directory_type_debug_info_emitter.h" 21 #include "sync/sessions/directory_type_debug_info_emitter.h"
18 #include "sync/sessions/status_controller.h" 22 #include "sync/sessions/status_controller.h"
19 23
20 namespace syncer { 24 namespace syncer {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // Returns the number of entries included in this contribution. 78 // Returns the number of entries included in this contribution.
75 size_t GetNumEntries() const override; 79 size_t GetNumEntries() const override;
76 80
77 private: 81 private:
78 class DirectoryCommitContributionTest; 82 class DirectoryCommitContributionTest;
79 FRIEND_TEST_ALL_PREFIXES(DirectoryCommitContributionTest, GatherByTypes); 83 FRIEND_TEST_ALL_PREFIXES(DirectoryCommitContributionTest, GatherByTypes);
80 FRIEND_TEST_ALL_PREFIXES(DirectoryCommitContributionTest, 84 FRIEND_TEST_ALL_PREFIXES(DirectoryCommitContributionTest,
81 GatherAndTruncate); 85 GatherAndTruncate);
82 86
83 DirectoryCommitContribution( 87 DirectoryCommitContribution(
84 const std::vector<int64>& metahandles, 88 const std::vector<int64_t>& metahandles,
85 const google::protobuf::RepeatedPtrField<sync_pb::SyncEntity>& entities, 89 const google::protobuf::RepeatedPtrField<sync_pb::SyncEntity>& entities,
86 const sync_pb::DataTypeContext& context, 90 const sync_pb::DataTypeContext& context,
87 syncable::Directory* directory, 91 syncable::Directory* directory,
88 DirectoryTypeDebugInfoEmitter* debug_info_emitter); 92 DirectoryTypeDebugInfoEmitter* debug_info_emitter);
89 93
90 void UnsetSyncingBits(); 94 void UnsetSyncingBits();
91 95
92 syncable::Directory* dir_; 96 syncable::Directory* dir_;
93 const std::vector<int64> metahandles_; 97 const std::vector<int64_t> metahandles_;
94 const google::protobuf::RepeatedPtrField<sync_pb::SyncEntity> entities_; 98 const google::protobuf::RepeatedPtrField<sync_pb::SyncEntity> entities_;
95 sync_pb::DataTypeContext context_; 99 sync_pb::DataTypeContext context_;
96 size_t entries_start_index_; 100 size_t entries_start_index_;
97 101
98 // This flag is tracks whether or not the directory entries associated with 102 // This flag is tracks whether or not the directory entries associated with
99 // this commit still have their SYNCING bits set. These bits will be set when 103 // this commit still have their SYNCING bits set. These bits will be set when
100 // the CommitContribution is created with Build() and unset when CleanUp() is 104 // the CommitContribution is created with Build() and unset when CleanUp() is
101 // called. This flag must be unset by the time our destructor is called. 105 // called. This flag must be unset by the time our destructor is called.
102 bool syncing_bits_set_; 106 bool syncing_bits_set_;
103 107
104 // A pointer to the commit counters of our parent CommitContributor. 108 // A pointer to the commit counters of our parent CommitContributor.
105 DirectoryTypeDebugInfoEmitter* debug_info_emitter_; 109 DirectoryTypeDebugInfoEmitter* debug_info_emitter_;
106 110
107 DISALLOW_COPY_AND_ASSIGN(DirectoryCommitContribution); 111 DISALLOW_COPY_AND_ASSIGN(DirectoryCommitContribution);
108 }; 112 };
109 113
110 } // namespace syncer 114 } // namespace syncer
111 115
112 #endif // SYNC_ENGINE_DIRECTORY_COMMIT_CONTRIBUTION_H_ 116 #endif // SYNC_ENGINE_DIRECTORY_COMMIT_CONTRIBUTION_H_
OLDNEW
« no previous file with comments | « sync/engine/conflict_resolver.h ('k') | sync/engine/directory_commit_contribution.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698