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

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

Issue 302283007: sync: Populate entity counts in about:sync tab (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | « no previous file | sync/engine/directory_update_handler.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 #include "sync/engine/directory_commit_contribution.h" 5 #include "sync/engine/directory_commit_contribution.h"
6 6
7 #include "sync/engine/commit_util.h" 7 #include "sync/engine/commit_util.h"
8 #include "sync/engine/get_commit_ids.h" 8 #include "sync/engine/get_commit_ids.h"
9 #include "sync/engine/syncer_util.h" 9 #include "sync/engine/syncer_util.h"
10 #include "sync/internal_api/public/sessions/commit_counters.h" 10 #include "sync/internal_api/public/sessions/commit_counters.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 } else { 151 } else {
152 LOG(FATAL) << "Inconsistent counts when processing commit response"; 152 LOG(FATAL) << "Inconsistent counts when processing commit response";
153 return SYNCER_OK; 153 return SYNCER_OK;
154 } 154 }
155 } 155 }
156 156
157 void DirectoryCommitContribution::CleanUp() { 157 void DirectoryCommitContribution::CleanUp() {
158 DCHECK(syncing_bits_set_); 158 DCHECK(syncing_bits_set_);
159 UnsetSyncingBits(); 159 UnsetSyncingBits();
160 debug_info_emitter_->EmitCommitCountersUpdate(); 160 debug_info_emitter_->EmitCommitCountersUpdate();
161 debug_info_emitter_->EmitStatusCountersUpdate();
161 } 162 }
162 163
163 size_t DirectoryCommitContribution::GetNumEntries() const { 164 size_t DirectoryCommitContribution::GetNumEntries() const {
164 return metahandles_.size(); 165 return metahandles_.size();
165 } 166 }
166 167
167 DirectoryCommitContribution::DirectoryCommitContribution( 168 DirectoryCommitContribution::DirectoryCommitContribution(
168 const std::vector<int64>& metahandles, 169 const std::vector<int64>& metahandles,
169 const google::protobuf::RepeatedPtrField<sync_pb::SyncEntity>& entities, 170 const google::protobuf::RepeatedPtrField<sync_pb::SyncEntity>& entities,
170 const sync_pb::DataTypeContext& context, 171 const sync_pb::DataTypeContext& context,
(...skipping 11 matching lines...) Expand all
182 syncable::ModelNeutralWriteTransaction trans(FROM_HERE, SYNCER, dir_); 183 syncable::ModelNeutralWriteTransaction trans(FROM_HERE, SYNCER, dir_);
183 for (std::vector<int64>::const_iterator it = metahandles_.begin(); 184 for (std::vector<int64>::const_iterator it = metahandles_.begin();
184 it != metahandles_.end(); ++it) { 185 it != metahandles_.end(); ++it) {
185 syncable::ModelNeutralMutableEntry entry(&trans, GET_BY_HANDLE, *it); 186 syncable::ModelNeutralMutableEntry entry(&trans, GET_BY_HANDLE, *it);
186 entry.PutSyncing(false); 187 entry.PutSyncing(false);
187 } 188 }
188 syncing_bits_set_ = false; 189 syncing_bits_set_ = false;
189 } 190 }
190 191
191 } // namespace syncer 192 } // namespace syncer
OLDNEW
« no previous file with comments | « no previous file | sync/engine/directory_update_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698