- add sources.
[platform/framework/web/crosswalk.git] / src / sync / internal_api / public / data_type_association_stats.h
1 // Copyright 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.
4
5 #ifndef SYNC_INTERNAL_API_PUBLIC_DATA_TYPE_ASSOCIATION_STATS_H_
6 #define SYNC_INTERNAL_API_PUBLIC_DATA_TYPE_ASSOCIATION_STATS_H_
7
8 #include "base/time/time.h"
9 #include "sync/base/sync_export.h"
10
11 namespace syncer {
12
13 // Container for datatype association results.
14 struct SYNC_EXPORT DataTypeAssociationStats {
15   DataTypeAssociationStats();
16   ~DataTypeAssociationStats();
17
18   // The state of the world before association.
19   int num_local_items_before_association;
20   int num_sync_items_before_association;
21
22   // The state of the world after association.
23   int num_local_items_after_association;
24   int num_sync_items_after_association;
25
26   // The changes that took place during association. In a correctly working
27   // system these should be the deltas between before and after.
28   int num_local_items_added;
29   int num_local_items_deleted;
30   int num_local_items_modified;
31   int num_sync_items_added;
32   int num_sync_items_deleted;
33   int num_sync_items_modified;
34
35   // Model versions before association.
36   int64 local_version_pre_association;
37   int64 sync_version_pre_association;
38
39   // Whether a datatype unrecoverable error was encountered during association.
40   bool had_error;
41
42   // Waiting time within association manager for loading local models and
43   // associating other types.
44   base::TimeDelta association_wait_time;
45
46   // Time spent on association.
47   base::TimeDelta association_time;
48 };
49
50 }  // namespace syncer
51
52 #endif  // SYNC_INTERNAL_API_PUBLIC_DATA_TYPE_ASSOCIATION_STATS_H_