1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef SYNC_INTERNAL_API_PUBLIC_DATA_TYPE_DEBUG_INFO_LISTENER_H_
6 #define SYNC_INTERNAL_API_PUBLIC_DATA_TYPE_DEBUG_INFO_LISTENER_H_
10 #include "sync/internal_api/public/base/model_type.h"
11 #include "sync/internal_api/public/data_type_association_stats.h"
15 struct SYNC_EXPORT DataTypeConfigurationStats {
16 DataTypeConfigurationStats();
17 ~DataTypeConfigurationStats();
19 // The datatype that was configured.
22 // Waiting time before downloading starts.
23 base::TimeDelta download_wait_time;
25 // Time spent on downloading data for first-sync data types.
26 base::TimeDelta download_time;
28 // Waiting time for association of higher priority types to finish before
29 // asking association manager to associate.
30 base::TimeDelta association_wait_time_for_high_priority;
32 // Types configured before this type.
33 ModelTypeSet high_priority_types_configured_before;
34 ModelTypeSet same_priority_types_configured_before;
37 DataTypeAssociationStats association_stats;
40 // Interface for the sync internals to listen to external sync events.
41 class DataTypeDebugInfoListener {
43 // Notify the listener that configuration of data types has completed.
44 virtual void OnDataTypeConfigureComplete(
45 const std::vector<DataTypeConfigurationStats>& configuration_stats) = 0;
50 #endif // SYNC_INTERNAL_API_PUBLIC_DATA_TYPE_DEBUG_INFO_LISTENER_H_