| 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 // Gets the total number of entries in the directory. |
| 208 size_t GetEntriesCount() const; |
| 206 | 209 |
| 207 // Gets/Increments transaction version of a model type. Must be called when | 210 // Gets/Increments transaction version of a model type. Must be called when |
| 208 // holding kernel mutex. | 211 // holding kernel mutex. |
| 209 int64 GetTransactionVersion(ModelType type) const; | 212 int64 GetTransactionVersion(ModelType type) const; |
| 210 void IncrementTransactionVersion(ModelType type); | 213 void IncrementTransactionVersion(ModelType type); |
| 211 | 214 |
| 212 // Getter/setters for the per datatype context. | 215 // Getter/setters for the per datatype context. |
| 213 void GetDataTypeContext(BaseTransaction* trans, | 216 void GetDataTypeContext(BaseTransaction* trans, |
| 214 ModelType type, | 217 ModelType type, |
| 215 sync_pb::DataTypeContext* context) const; | 218 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. | 647 // are deleted in native models as well. |
| 645 scoped_ptr<DeleteJournal> delete_journal_; | 648 scoped_ptr<DeleteJournal> delete_journal_; |
| 646 | 649 |
| 647 DISALLOW_COPY_AND_ASSIGN(Directory); | 650 DISALLOW_COPY_AND_ASSIGN(Directory); |
| 648 }; | 651 }; |
| 649 | 652 |
| 650 } // namespace syncable | 653 } // namespace syncable |
| 651 } // namespace syncer | 654 } // namespace syncer |
| 652 | 655 |
| 653 #endif // SYNC_SYNCABLE_DIRECTORY_H_ | 656 #endif // SYNC_SYNCABLE_DIRECTORY_H_ |
| OLD | NEW |