| 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 bool good() const { return NULL != kernel_; } | 192 bool good() const { return NULL != kernel_; } |
| 193 | 193 |
| 194 // The download progress is an opaque token provided by the sync server | 194 // The download progress is an opaque token provided by the sync server |
| 195 // to indicate the continuation state of the next GetUpdates operation. | 195 // to indicate the continuation state of the next GetUpdates operation. |
| 196 void GetDownloadProgress( | 196 void GetDownloadProgress( |
| 197 ModelType type, | 197 ModelType type, |
| 198 sync_pb::DataTypeProgressMarker* value_out) const; | 198 sync_pb::DataTypeProgressMarker* value_out) const; |
| 199 void GetDownloadProgressAsString( | 199 void GetDownloadProgressAsString( |
| 200 ModelType type, | 200 ModelType type, |
| 201 std::string* value_out) const; | 201 std::string* value_out) const; |
| 202 size_t GetEntriesCount() const; | |
| 203 void SetDownloadProgress( | 202 void SetDownloadProgress( |
| 204 ModelType type, | 203 ModelType type, |
| 205 const sync_pb::DataTypeProgressMarker& value); | 204 const sync_pb::DataTypeProgressMarker& value); |
| 205 bool HasEmptyDownloadProgress(ModelType type) const; |
| 206 |
| 207 size_t GetEntriesCount() const; |
| 206 | 208 |
| 207 // Gets/Increments transaction version of a model type. Must be called when | 209 // Gets/Increments transaction version of a model type. Must be called when |
| 208 // holding kernel mutex. | 210 // holding kernel mutex. |
| 209 int64 GetTransactionVersion(ModelType type) const; | 211 int64 GetTransactionVersion(ModelType type) const; |
| 210 void IncrementTransactionVersion(ModelType type); | 212 void IncrementTransactionVersion(ModelType type); |
| 211 | 213 |
| 212 // Getter/setters for the per datatype context. | 214 // Getter/setters for the per datatype context. |
| 213 void GetDataTypeContext(BaseTransaction* trans, | 215 void GetDataTypeContext(BaseTransaction* trans, |
| 214 ModelType type, | 216 ModelType type, |
| 215 sync_pb::DataTypeContext* context) const; | 217 sync_pb::DataTypeContext* context) const; |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 644 // are deleted in native models as well. | 646 // are deleted in native models as well. |
| 645 scoped_ptr<DeleteJournal> delete_journal_; | 647 scoped_ptr<DeleteJournal> delete_journal_; |
| 646 | 648 |
| 647 DISALLOW_COPY_AND_ASSIGN(Directory); | 649 DISALLOW_COPY_AND_ASSIGN(Directory); |
| 648 }; | 650 }; |
| 649 | 651 |
| 650 } // namespace syncable | 652 } // namespace syncable |
| 651 } // namespace syncer | 653 } // namespace syncer |
| 652 | 654 |
| 653 #endif // SYNC_SYNCABLE_DIRECTORY_H_ | 655 #endif // SYNC_SYNCABLE_DIRECTORY_H_ |
| OLD | NEW |