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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "sync/api/attachments/attachment_id.h" | 23 #include "sync/api/attachments/attachment_id.h" |
24 #include "sync/base/sync_export.h" | 24 #include "sync/base/sync_export.h" |
25 #include "sync/internal_api/public/util/weak_handle.h" | 25 #include "sync/internal_api/public/util/weak_handle.h" |
26 #include "sync/syncable/dir_open_result.h" | 26 #include "sync/syncable/dir_open_result.h" |
27 #include "sync/syncable/entry.h" | 27 #include "sync/syncable/entry.h" |
28 #include "sync/syncable/entry_kernel.h" | 28 #include "sync/syncable/entry_kernel.h" |
29 #include "sync/syncable/metahandle_set.h" | 29 #include "sync/syncable/metahandle_set.h" |
30 #include "sync/syncable/parent_child_index.h" | 30 #include "sync/syncable/parent_child_index.h" |
31 #include "sync/syncable/syncable_delete_journal.h" | 31 #include "sync/syncable/syncable_delete_journal.h" |
32 | 32 |
| 33 namespace base { |
| 34 namespace trace_event { |
| 35 class ProcessMemoryDump; |
| 36 } |
| 37 } |
| 38 |
33 namespace syncer { | 39 namespace syncer { |
34 | 40 |
35 class Cryptographer; | 41 class Cryptographer; |
36 class TestUserShare; | 42 class TestUserShare; |
37 class UnrecoverableErrorHandler; | 43 class UnrecoverableErrorHandler; |
38 | 44 |
39 namespace syncable { | 45 namespace syncable { |
40 | 46 |
41 class BaseTransaction; | 47 class BaseTransaction; |
42 class BaseWriteTransaction; | 48 class BaseWriteTransaction; |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 ModelType type, | 282 ModelType type, |
277 std::string* value_out) const; | 283 std::string* value_out) const; |
278 void SetDownloadProgress( | 284 void SetDownloadProgress( |
279 ModelType type, | 285 ModelType type, |
280 const sync_pb::DataTypeProgressMarker& value); | 286 const sync_pb::DataTypeProgressMarker& value); |
281 bool HasEmptyDownloadProgress(ModelType type) const; | 287 bool HasEmptyDownloadProgress(ModelType type) const; |
282 | 288 |
283 // Gets the total number of entries in the directory. | 289 // Gets the total number of entries in the directory. |
284 size_t GetEntriesCount() const; | 290 size_t GetEntriesCount() const; |
285 | 291 |
| 292 // Adds memory statistics to |pmd| for chrome://tracing. |
| 293 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd); |
| 294 |
286 // Gets/Increments transaction version of a model type. Must be called when | 295 // Gets/Increments transaction version of a model type. Must be called when |
287 // holding kernel mutex. | 296 // holding kernel mutex. |
288 int64_t GetTransactionVersion(ModelType type) const; | 297 int64_t GetTransactionVersion(ModelType type) const; |
289 void IncrementTransactionVersion(ModelType type); | 298 void IncrementTransactionVersion(ModelType type); |
290 | 299 |
291 // Getter/setters for the per datatype context. | 300 // Getter/setters for the per datatype context. |
292 void GetDataTypeContext(BaseTransaction* trans, | 301 void GetDataTypeContext(BaseTransaction* trans, |
293 ModelType type, | 302 ModelType type, |
294 sync_pb::DataTypeContext* context) const; | 303 sync_pb::DataTypeContext* context) const; |
295 void SetDataTypeContext(BaseWriteTransaction* trans, | 304 void SetDataTypeContext(BaseWriteTransaction* trans, |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
653 | 662 |
654 base::WeakPtrFactory<Directory> weak_ptr_factory_; | 663 base::WeakPtrFactory<Directory> weak_ptr_factory_; |
655 | 664 |
656 DISALLOW_COPY_AND_ASSIGN(Directory); | 665 DISALLOW_COPY_AND_ASSIGN(Directory); |
657 }; | 666 }; |
658 | 667 |
659 } // namespace syncable | 668 } // namespace syncable |
660 } // namespace syncer | 669 } // namespace syncer |
661 | 670 |
662 #endif // SYNC_SYNCABLE_DIRECTORY_H_ | 671 #endif // SYNC_SYNCABLE_DIRECTORY_H_ |
OLD | NEW |