| Index: components/sync/engine_impl/cycle/data_type_debug_info_emitter.cc
|
| diff --git a/components/sync/engine_impl/cycle/data_type_debug_info_emitter.cc b/components/sync/engine_impl/cycle/data_type_debug_info_emitter.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d5643ba076885bcf009376ee48f498b0b8100ea5
|
| --- /dev/null
|
| +++ b/components/sync/engine_impl/cycle/data_type_debug_info_emitter.cc
|
| @@ -0,0 +1,46 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "components/sync/engine_impl/cycle/data_type_debug_info_emitter.h"
|
| +
|
| +#include "components/sync/engine/cycle/type_debug_info_observer.h"
|
| +
|
| +namespace syncer {
|
| +
|
| +DataTypeDebugInfoEmitter::DataTypeDebugInfoEmitter(
|
| + ModelType type,
|
| + base::ObserverList<TypeDebugInfoObserver>* observers)
|
| + : type_(type), type_debug_info_observers_(observers) {}
|
| +
|
| +DataTypeDebugInfoEmitter::~DataTypeDebugInfoEmitter() {}
|
| +
|
| +const CommitCounters& DataTypeDebugInfoEmitter::GetCommitCounters() const {
|
| + return commit_counters_;
|
| +}
|
| +
|
| +CommitCounters* DataTypeDebugInfoEmitter::GetMutableCommitCounters() {
|
| + return &commit_counters_;
|
| +}
|
| +
|
| +void DataTypeDebugInfoEmitter::EmitCommitCountersUpdate() {
|
| + for (TypeDebugInfoObserver& obsever : *type_debug_info_observers_) {
|
| + obsever.OnCommitCountersUpdated(type_, commit_counters_);
|
| + }
|
| +}
|
| +
|
| +const UpdateCounters& DataTypeDebugInfoEmitter::GetUpdateCounters() const {
|
| + return update_counters_;
|
| +}
|
| +
|
| +UpdateCounters* DataTypeDebugInfoEmitter::GetMutableUpdateCounters() {
|
| + return &update_counters_;
|
| +}
|
| +
|
| +void DataTypeDebugInfoEmitter::EmitUpdateCountersUpdate() {
|
| + for (TypeDebugInfoObserver& obsever : *type_debug_info_observers_) {
|
| + obsever.OnUpdateCountersUpdated(type_, update_counters_);
|
| + }
|
| +}
|
| +
|
| +} // namespace syncer
|
|
|