| 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 COMPONENTS_SYNC_SYNCABLE_DIRECTORY_H_ | 5 #ifndef COMPONENTS_SYNC_SYNCABLE_DIRECTORY_H_ |
| 6 #define COMPONENTS_SYNC_SYNCABLE_DIRECTORY_H_ | 6 #define COMPONENTS_SYNC_SYNCABLE_DIRECTORY_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 void SetDownloadProgress(ModelType type, | 285 void SetDownloadProgress(ModelType type, |
| 286 const sync_pb::DataTypeProgressMarker& value); | 286 const sync_pb::DataTypeProgressMarker& value); |
| 287 bool HasEmptyDownloadProgress(ModelType type) const; | 287 bool HasEmptyDownloadProgress(ModelType type) const; |
| 288 | 288 |
| 289 // Gets the total number of entries in the directory. | 289 // Gets the total number of entries in the directory. |
| 290 size_t GetEntriesCount() const; | 290 size_t GetEntriesCount() const; |
| 291 | 291 |
| 292 // Adds memory statistics to |pmd| for chrome://tracing. | 292 // Adds memory statistics to |pmd| for chrome://tracing. |
| 293 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd); | 293 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd); |
| 294 | 294 |
| 295 // Estimates memory usage of entries and corresponding indices of type |
| 296 // |model_type|. |
| 297 size_t EstimateMemoryUsageByType(ModelType model_type); |
| 298 |
| 295 // Gets/Increments transaction version of a model type. Must be called when | 299 // Gets/Increments transaction version of a model type. Must be called when |
| 296 // holding kernel mutex. | 300 // holding kernel mutex. |
| 297 int64_t GetTransactionVersion(ModelType type) const; | 301 int64_t GetTransactionVersion(ModelType type) const; |
| 298 void IncrementTransactionVersion(ModelType type); | 302 void IncrementTransactionVersion(ModelType type); |
| 299 | 303 |
| 300 // Getter/setters for the per datatype context. | 304 // Getter/setters for the per datatype context. |
| 301 void GetDataTypeContext(BaseTransaction* trans, | 305 void GetDataTypeContext(BaseTransaction* trans, |
| 302 ModelType type, | 306 ModelType type, |
| 303 sync_pb::DataTypeContext* context) const; | 307 sync_pb::DataTypeContext* context) const; |
| 304 void SetDataTypeContext(BaseWriteTransaction* trans, | 308 void SetDataTypeContext(BaseWriteTransaction* trans, |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 | 672 |
| 669 base::WeakPtrFactory<Directory> weak_ptr_factory_; | 673 base::WeakPtrFactory<Directory> weak_ptr_factory_; |
| 670 | 674 |
| 671 DISALLOW_COPY_AND_ASSIGN(Directory); | 675 DISALLOW_COPY_AND_ASSIGN(Directory); |
| 672 }; | 676 }; |
| 673 | 677 |
| 674 } // namespace syncable | 678 } // namespace syncable |
| 675 } // namespace syncer | 679 } // namespace syncer |
| 676 | 680 |
| 677 #endif // COMPONENTS_SYNC_SYNCABLE_DIRECTORY_H_ | 681 #endif // COMPONENTS_SYNC_SYNCABLE_DIRECTORY_H_ |
| OLD | NEW |