| Index: components/sync/core_impl/debug_info_event_listener.cc
|
| diff --git a/sync/internal_api/debug_info_event_listener.cc b/components/sync/core_impl/debug_info_event_listener.cc
|
| similarity index 88%
|
| rename from sync/internal_api/debug_info_event_listener.cc
|
| rename to components/sync/core_impl/debug_info_event_listener.cc
|
| index 8c73f21a809868c056037d4acbc0f74e754d36a1..42b935856de8e0619aab20ad39b5f12eedeb2c63 100644
|
| --- a/sync/internal_api/debug_info_event_listener.cc
|
| +++ b/components/sync/core_impl/debug_info_event_listener.cc
|
| @@ -2,11 +2,11 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "sync/internal_api/debug_info_event_listener.h"
|
| +#include "components/sync/core_impl/debug_info_event_listener.h"
|
|
|
| #include <stddef.h>
|
|
|
| -#include "sync/util/cryptographer.h"
|
| +#include "components/sync/base/cryptographer.h"
|
|
|
| namespace syncer {
|
|
|
| @@ -16,11 +16,9 @@ DebugInfoEventListener::DebugInfoEventListener()
|
| : events_dropped_(false),
|
| cryptographer_has_pending_keys_(false),
|
| cryptographer_ready_(false),
|
| - weak_ptr_factory_(this) {
|
| -}
|
| + weak_ptr_factory_(this) {}
|
|
|
| -DebugInfoEventListener::~DebugInfoEventListener() {
|
| -}
|
| +DebugInfoEventListener::~DebugInfoEventListener() {}
|
|
|
| void DebugInfoEventListener::OnSyncCycleCompleted(
|
| const SyncSessionSnapshot& snapshot) {
|
| @@ -51,13 +49,13 @@ void DebugInfoEventListener::OnSyncCycleCompleted(
|
| void DebugInfoEventListener::OnInitializationComplete(
|
| const WeakHandle<JsBackend>& js_backend,
|
| const WeakHandle<DataTypeDebugInfoListener>& debug_listener,
|
| - bool success, ModelTypeSet restored_types) {
|
| + bool success,
|
| + ModelTypeSet restored_types) {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| CreateAndAddEvent(sync_pb::SyncEnums::INITIALIZATION_COMPLETE);
|
| }
|
|
|
| -void DebugInfoEventListener::OnConnectionStatusChange(
|
| - ConnectionStatus status) {
|
| +void DebugInfoEventListener::OnConnectionStatusChange(ConnectionStatus status) {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| CreateAndAddEvent(sync_pb::SyncEnums::CONNECTION_STATUS_CHANGE);
|
| }
|
| @@ -75,7 +73,8 @@ void DebugInfoEventListener::OnPassphraseAccepted() {
|
| }
|
|
|
| void DebugInfoEventListener::OnBootstrapTokenUpdated(
|
| - const std::string& bootstrap_token, BootstrapTokenType type) {
|
| + const std::string& bootstrap_token,
|
| + BootstrapTokenType type) {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| if (type == PASSPHRASE_BOOTSTRAP_TOKEN) {
|
| CreateAndAddEvent(sync_pb::SyncEnums::BOOTSTRAP_TOKEN_UPDATED);
|
| @@ -112,8 +111,7 @@ void DebugInfoEventListener::OnPassphraseTypeChanged(
|
| }
|
|
|
| void DebugInfoEventListener::OnLocalSetPassphraseEncryption(
|
| - const SyncEncryptionHandler::NigoriState& nigori_state) {
|
| -}
|
| + const SyncEncryptionHandler::NigoriState& nigori_state) {}
|
|
|
| void DebugInfoEventListener::OnActionableError(
|
| const SyncProtocolError& sync_error) {
|
| @@ -138,8 +136,7 @@ void DebugInfoEventListener::GetDebugInfo(sync_pb::DebugInfo* debug_info) {
|
| DCHECK_LE(events_.size(), kMaxEntries);
|
|
|
| for (DebugEventInfoQueue::const_iterator iter = events_.begin();
|
| - iter != events_.end();
|
| - ++iter) {
|
| + iter != events_.end(); ++iter) {
|
| sync_pb::DebugEventInfo* event_info = debug_info->add_events();
|
| event_info->CopyFrom(*iter);
|
| }
|
| @@ -175,9 +172,8 @@ void DebugInfoEventListener::OnDataTypeConfigureComplete(
|
| sync_pb::DebugEventInfo association_event;
|
| sync_pb::DatatypeAssociationStats* datatype_stats =
|
| association_event.mutable_datatype_association_stats();
|
| - datatype_stats->set_data_type_id(
|
| - GetSpecificsFieldNumberFromModelType(
|
| - configuration_stats[i].model_type));
|
| + datatype_stats->set_data_type_id(GetSpecificsFieldNumberFromModelType(
|
| + configuration_stats[i].model_type));
|
| datatype_stats->set_num_local_items_before_association(
|
| association_stats.num_local_items_before_association);
|
| datatype_stats->set_num_sync_items_before_association(
|
| @@ -204,7 +200,7 @@ void DebugInfoEventListener::OnDataTypeConfigureComplete(
|
| association_stats.sync_version_pre_association);
|
| datatype_stats->set_had_error(association_stats.had_error);
|
| datatype_stats->set_association_wait_time_for_same_priority_us(
|
| - association_stats.association_wait_time.InMicroseconds());
|
| + association_stats.association_wait_time.InMicroseconds());
|
| datatype_stats->set_association_time_us(
|
| association_stats.association_time.InMicroseconds());
|
| datatype_stats->set_download_wait_time_us(
|
| @@ -212,21 +208,21 @@ void DebugInfoEventListener::OnDataTypeConfigureComplete(
|
| datatype_stats->set_download_time_us(
|
| configuration_stats[i].download_time.InMicroseconds());
|
| datatype_stats->set_association_wait_time_for_high_priority_us(
|
| - configuration_stats[i].association_wait_time_for_high_priority
|
| - .InMicroseconds());
|
| + configuration_stats[i]
|
| + .association_wait_time_for_high_priority.InMicroseconds());
|
|
|
| for (ModelTypeSet::Iterator it =
|
| - configuration_stats[i].high_priority_types_configured_before
|
| - .First();
|
| + configuration_stats[i]
|
| + .high_priority_types_configured_before.First();
|
| it.Good(); it.Inc()) {
|
| datatype_stats->add_high_priority_type_configured_before(
|
| GetSpecificsFieldNumberFromModelType(it.Get()));
|
| }
|
|
|
| for (ModelTypeSet::Iterator it =
|
| - configuration_stats[i].same_priority_types_configured_before
|
| - .First();
|
| - it.Good(); it.Inc()) {
|
| + configuration_stats[i]
|
| + .same_priority_types_configured_before.First();
|
| + it.Good(); it.Inc()) {
|
| datatype_stats->add_same_priority_type_configured_before(
|
| GetSpecificsFieldNumberFromModelType(it.Get()));
|
| }
|
| @@ -244,7 +240,7 @@ void DebugInfoEventListener::CreateAndAddEvent(
|
| }
|
|
|
| void DebugInfoEventListener::AddEventToQueue(
|
| - const sync_pb::DebugEventInfo& event_info) {
|
| + const sync_pb::DebugEventInfo& event_info) {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| if (events_.size() >= kMaxEntries) {
|
| DVLOG(1) << "DebugInfoEventListener::AddEventToQueue Dropping an old event "
|
|
|