Chromium Code Reviews| Index: components/sync/engine_impl/cycle/directory_type_debug_info_emitter.cc |
| diff --git a/components/sync/engine_impl/cycle/directory_type_debug_info_emitter.cc b/components/sync/engine_impl/cycle/directory_type_debug_info_emitter.cc |
| index d7b9b1a3064c609aed44e7181497de268c06dd3b..7b0cb5dc008fdaa6645af24e688aecb369771143 100644 |
| --- a/components/sync/engine_impl/cycle/directory_type_debug_info_emitter.cc |
| +++ b/components/sync/engine_impl/cycle/directory_type_debug_info_emitter.cc |
| @@ -8,6 +8,7 @@ |
| #include <vector> |
| +#include "base/memory/ptr_util.h" |
| #include "components/sync/engine/cycle/status_counters.h" |
| #include "components/sync/engine/cycle/type_debug_info_observer.h" |
| #include "components/sync/syncable/entry.h" |
| @@ -72,19 +73,19 @@ void DirectoryTypeDebugInfoEmitter::EmitStatusCountersUpdate() { |
| std::vector<int64_t> result; |
| directory_->GetMetaHandlesOfType(&trans, type_, &result); |
| - StatusCounters counters; |
| - counters.num_entries_and_tombstones = result.size(); |
| + std::unique_ptr<StatusCounters> counters = base::MakeUnique<StatusCounters>(); |
| + counters->num_entries_and_tombstones = result.size(); |
| for (std::vector<int64_t>::const_iterator it = result.begin(); |
| it != result.end(); ++it) { |
| syncable::Entry e(&trans, syncable::GET_BY_HANDLE, *it); |
| if (!e.GetIsDel()) { |
| - counters.num_entries++; |
| + counters->num_entries++; |
| } |
| } |
| FOR_EACH_OBSERVER(TypeDebugInfoObserver, (*type_debug_info_observers_), |
| - OnStatusCountersUpdated(type_, counters)); |
| + OnStatusCountersUpdated(type_, std::move(counters))); |
|
pavely
2016/09/30 00:01:51
Same argument as in ProfileSyncService. Who will g
Gang Wu
2016/10/01 07:14:09
Done.
|
| } |
| } // namespace syncer |