OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef SYNC_SYNCABLE_DIRECTORY_H_ | 5 #ifndef SYNC_SYNCABLE_DIRECTORY_H_ |
6 #define SYNC_SYNCABLE_DIRECTORY_H_ | 6 #define SYNC_SYNCABLE_DIRECTORY_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 // for) needs saved across runs of the application. | 102 // for) needs saved across runs of the application. |
103 struct SYNC_EXPORT_PRIVATE PersistedKernelInfo { | 103 struct SYNC_EXPORT_PRIVATE PersistedKernelInfo { |
104 PersistedKernelInfo(); | 104 PersistedKernelInfo(); |
105 ~PersistedKernelInfo(); | 105 ~PersistedKernelInfo(); |
106 | 106 |
107 // Set the |download_progress| entry for the given model to a | 107 // Set the |download_progress| entry for the given model to a |
108 // "first sync" start point. When such a value is sent to the server, | 108 // "first sync" start point. When such a value is sent to the server, |
109 // a full download of all objects of the model will be initiated. | 109 // a full download of all objects of the model will be initiated. |
110 void ResetDownloadProgress(ModelType model_type); | 110 void ResetDownloadProgress(ModelType model_type); |
111 | 111 |
| 112 // Whether a valid progress marker exists for |model_type|. |
| 113 bool HasEmptyDownloadProgress(ModelType model_type); |
| 114 |
112 // Last sync timestamp fetched from the server. | 115 // Last sync timestamp fetched from the server. |
113 sync_pb::DataTypeProgressMarker download_progress[MODEL_TYPE_COUNT]; | 116 sync_pb::DataTypeProgressMarker download_progress[MODEL_TYPE_COUNT]; |
114 // Sync-side transaction version per data type. Monotonically incremented | 117 // Sync-side transaction version per data type. Monotonically incremented |
115 // when updating native model. A copy is also saved in native model. | 118 // when updating native model. A copy is also saved in native model. |
116 // Later out-of-sync models can be detected and fixed by comparing | 119 // Later out-of-sync models can be detected and fixed by comparing |
117 // transaction versions of sync model and native model. | 120 // transaction versions of sync model and native model. |
118 // TODO(hatiaol): implement detection and fixing of out-of-sync models. | 121 // TODO(hatiaol): implement detection and fixing of out-of-sync models. |
119 // Bug 154858. | 122 // Bug 154858. |
120 int64 transaction_version[MODEL_TYPE_COUNT]; | 123 int64 transaction_version[MODEL_TYPE_COUNT]; |
121 // The store birthday we were given by the server. Contents are opaque to | 124 // The store birthday we were given by the server. Contents are opaque to |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
618 // are deleted in native models as well. | 621 // are deleted in native models as well. |
619 scoped_ptr<DeleteJournal> delete_journal_; | 622 scoped_ptr<DeleteJournal> delete_journal_; |
620 | 623 |
621 DISALLOW_COPY_AND_ASSIGN(Directory); | 624 DISALLOW_COPY_AND_ASSIGN(Directory); |
622 }; | 625 }; |
623 | 626 |
624 } // namespace syncable | 627 } // namespace syncable |
625 } // namespace syncer | 628 } // namespace syncer |
626 | 629 |
627 #endif // SYNC_SYNCABLE_DIRECTORY_H_ | 630 #endif // SYNC_SYNCABLE_DIRECTORY_H_ |
OLD | NEW |