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 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
592 | 592 |
593 // Purges from memory any unused, safe to remove entries that were | 593 // Purges from memory any unused, safe to remove entries that were |
594 // successfully deleted on disk as a result of the SaveChanges that processed | 594 // successfully deleted on disk as a result of the SaveChanges that processed |
595 // |snapshot|. See SaveChanges() for more information. | 595 // |snapshot|. See SaveChanges() for more information. |
596 bool VacuumAfterSaveChanges(const SaveChangesSnapshot& snapshot); | 596 bool VacuumAfterSaveChanges(const SaveChangesSnapshot& snapshot); |
597 | 597 |
598 // Rolls back dirty bits in the event that the SaveChanges that | 598 // Rolls back dirty bits in the event that the SaveChanges that |
599 // processed |snapshot| failed, for example, due to no disk space. | 599 // processed |snapshot| failed, for example, due to no disk space. |
600 void HandleSaveChangesFailure(const SaveChangesSnapshot& snapshot); | 600 void HandleSaveChangesFailure(const SaveChangesSnapshot& snapshot); |
601 | 601 |
602 // Used by CheckTreeInvariants | 602 // Used by CheckTreeInvariants. |
603 void GetAllMetaHandles(BaseTransaction* trans, MetahandleSet* result); | 603 void GetAllMetaHandles(BaseTransaction* trans, MetahandleSet* result); |
604 // Used by VacuumAfterSaveChanges. | |
Nicolas Zea
2015/03/16 19:33:36
nit: may as well put a newline above (and below th
| |
604 bool SafeToPurgeFromMemory(WriteTransaction* trans, | 605 bool SafeToPurgeFromMemory(WriteTransaction* trans, |
605 const EntryKernel* const entry) const; | 606 const EntryKernel* const entry) const; |
606 | |
607 // A helper used by GetTotalNodeCount. | 607 // A helper used by GetTotalNodeCount. |
608 void GetChildSetForKernel( | 608 void GetChildSetForKernel( |
609 BaseTransaction*, | 609 BaseTransaction*, |
610 EntryKernel* kernel_, | 610 EntryKernel* kernel_, |
611 std::deque<const OrderedChildSet*>* child_sets) const; | 611 std::deque<const OrderedChildSet*>* child_sets) const; |
612 | 612 |
613 // Append the handles of the children of |parent_id| to |result|. | 613 // Append the handles of the children of |parent_id| to |result|. |
614 void AppendChildHandles(const ScopedKernelLock& lock, | 614 void AppendChildHandles(const ScopedKernelLock& lock, |
615 const Id& parent_id, | 615 const Id& parent_id, |
616 Directory::Metahandles* result); | 616 Directory::Metahandles* result); |
(...skipping 30 matching lines...) Expand all Loading... | |
647 // are deleted in native models as well. | 647 // are deleted in native models as well. |
648 scoped_ptr<DeleteJournal> delete_journal_; | 648 scoped_ptr<DeleteJournal> delete_journal_; |
649 | 649 |
650 DISALLOW_COPY_AND_ASSIGN(Directory); | 650 DISALLOW_COPY_AND_ASSIGN(Directory); |
651 }; | 651 }; |
652 | 652 |
653 } // namespace syncable | 653 } // namespace syncable |
654 } // namespace syncer | 654 } // namespace syncer |
655 | 655 |
656 #endif // SYNC_SYNCABLE_DIRECTORY_H_ | 656 #endif // SYNC_SYNCABLE_DIRECTORY_H_ |
OLD | NEW |