| 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 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 | 520 |
| 521 bool ReindexParentId(BaseWriteTransaction* trans, | 521 bool ReindexParentId(BaseWriteTransaction* trans, |
| 522 EntryKernel* const entry, | 522 EntryKernel* const entry, |
| 523 const Id& new_parent_id); | 523 const Id& new_parent_id); |
| 524 | 524 |
| 525 // Accessors for the underlying Kernel. Although these are public methods, the | 525 // Accessors for the underlying Kernel. Although these are public methods, the |
| 526 // number of classes that call these should be limited. | 526 // number of classes that call these should be limited. |
| 527 Kernel* kernel(); | 527 Kernel* kernel(); |
| 528 const Kernel* kernel() const; | 528 const Kernel* kernel() const; |
| 529 | 529 |
| 530 // Delete the directory database files from the sync data folder to cleanup |
| 531 // backend data. This should happen the first time sync is enabled for a user, |
| 532 // to prevent accidentally reusing old sync data, as well as shutdown when the |
| 533 // user is no longer syncing. |
| 534 static void DeleteDirectoryFiles(const base::FilePath& directory_path); |
| 535 |
| 530 private: | 536 private: |
| 531 friend class SyncableDirectoryTest; | 537 friend class SyncableDirectoryTest; |
| 532 friend class syncer::TestUserShare; | 538 friend class syncer::TestUserShare; |
| 533 FRIEND_TEST_ALL_PREFIXES(SyncableDirectoryTest, ManageDeleteJournals); | 539 FRIEND_TEST_ALL_PREFIXES(SyncableDirectoryTest, ManageDeleteJournals); |
| 534 FRIEND_TEST_ALL_PREFIXES(SyncableDirectoryTest, | 540 FRIEND_TEST_ALL_PREFIXES(SyncableDirectoryTest, |
| 535 TakeSnapshotGetsAllDirtyHandlesTest); | 541 TakeSnapshotGetsAllDirtyHandlesTest); |
| 536 FRIEND_TEST_ALL_PREFIXES(SyncableDirectoryTest, | 542 FRIEND_TEST_ALL_PREFIXES(SyncableDirectoryTest, |
| 537 TakeSnapshotGetsOnlyDirtyHandlesTest); | 543 TakeSnapshotGetsOnlyDirtyHandlesTest); |
| 538 FRIEND_TEST_ALL_PREFIXES(SyncableDirectoryTest, | 544 FRIEND_TEST_ALL_PREFIXES(SyncableDirectoryTest, |
| 539 TakeSnapshotGetsMetahandlesToPurge); | 545 TakeSnapshotGetsMetahandlesToPurge); |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 | 667 |
| 662 base::WeakPtrFactory<Directory> weak_ptr_factory_; | 668 base::WeakPtrFactory<Directory> weak_ptr_factory_; |
| 663 | 669 |
| 664 DISALLOW_COPY_AND_ASSIGN(Directory); | 670 DISALLOW_COPY_AND_ASSIGN(Directory); |
| 665 }; | 671 }; |
| 666 | 672 |
| 667 } // namespace syncable | 673 } // namespace syncable |
| 668 } // namespace syncer | 674 } // namespace syncer |
| 669 | 675 |
| 670 #endif // COMPONENTS_SYNC_SYNCABLE_DIRECTORY_H_ | 676 #endif // COMPONENTS_SYNC_SYNCABLE_DIRECTORY_H_ |
| OLD | NEW |