OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file defines the "sync API", an interface to the syncer | 5 // This file defines the "sync API", an interface to the syncer |
6 // backend that exposes (1) the core functionality of maintaining a consistent | 6 // backend that exposes (1) the core functionality of maintaining a consistent |
7 // local snapshot of a hierarchical object set; (2) a means to transactionally | 7 // local snapshot of a hierarchical object set; (2) a means to transactionally |
8 // access and modify those objects; (3) a means to control client/server | 8 // access and modify those objects; (3) a means to control client/server |
9 // synchronization tasks, namely: pushing local object modifications to a | 9 // synchronization tasks, namely: pushing local object modifications to a |
10 // server, pulling nonlocal object modifications from a server to this client, | 10 // server, pulling nonlocal object modifications from a server to this client, |
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
729 // Total updates received by the syncer since browser start. | 729 // Total updates received by the syncer since browser start. |
730 int updates_received; | 730 int updates_received; |
731 | 731 |
732 // Of updates_received, how many were tombstones. | 732 // Of updates_received, how many were tombstones. |
733 int tombstone_updates_received; | 733 int tombstone_updates_received; |
734 bool disk_full; | 734 bool disk_full; |
735 | 735 |
736 // Total number of overwrites due to conflict resolver since browser start. | 736 // Total number of overwrites due to conflict resolver since browser start. |
737 int num_local_overwrites_total; | 737 int num_local_overwrites_total; |
738 int num_server_overwrites_total; | 738 int num_server_overwrites_total; |
739 | |
740 // Count of empty and non empty getupdates; | |
741 int useless_sync_cycles; | |
742 int useful_syn_cycles; | |
akalin
2011/05/17 02:03:01
syn -> sync
lipalani1
2011/05/18 00:28:07
oh boy. I did a compile before sending out.The onl
| |
739 }; | 743 }; |
740 | 744 |
741 // An interface the embedding application implements to receive notifications | 745 // An interface the embedding application implements to receive notifications |
742 // from the SyncManager. Register an observer via SyncManager::AddObserver. | 746 // from the SyncManager. Register an observer via SyncManager::AddObserver. |
743 // This observer is an event driven model as the events may be raised from | 747 // This observer is an event driven model as the events may be raised from |
744 // different internal threads, and simply providing an "OnStatusChanged" type | 748 // different internal threads, and simply providing an "OnStatusChanged" type |
745 // notification complicates things such as trying to determine "what changed", | 749 // notification complicates things such as trying to determine "what changed", |
746 // if different members of the Status object are modified from different | 750 // if different members of the Status object are modified from different |
747 // threads. This way, the event is explicit, and it is safe for the Observer | 751 // threads. This way, the event is explicit, and it is safe for the Observer |
748 // to dispatch to a native thread or synchronize accordingly. | 752 // to dispatch to a native thread or synchronize accordingly. |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1031 private: | 1035 private: |
1032 // An opaque pointer to the nested private class. | 1036 // An opaque pointer to the nested private class. |
1033 SyncInternal* data_; | 1037 SyncInternal* data_; |
1034 | 1038 |
1035 DISALLOW_COPY_AND_ASSIGN(SyncManager); | 1039 DISALLOW_COPY_AND_ASSIGN(SyncManager); |
1036 }; | 1040 }; |
1037 | 1041 |
1038 } // namespace sync_api | 1042 } // namespace sync_api |
1039 | 1043 |
1040 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCAPI_H_ | 1044 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCAPI_H_ |
OLD | NEW |