| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_TEST_USER_SHARE_H_ | 5 #ifndef COMPONENTS_SYNC_SYNCABLE_TEST_USER_SHARE_H_ |
| 6 #define COMPONENTS_SYNC_SYNCABLE_TEST_USER_SHARE_H_ | 6 #define COMPONENTS_SYNC_SYNCABLE_TEST_USER_SHARE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 // on the user share's directory. | 61 // on the user share's directory. |
| 62 void TearDown(); | 62 void TearDown(); |
| 63 | 63 |
| 64 // Save and reload Directory to clear out temporary data in memory. | 64 // Save and reload Directory to clear out temporary data in memory. |
| 65 bool Reload(); | 65 bool Reload(); |
| 66 | 66 |
| 67 // Non-null iff called between a call to SetUp() and TearDown(). | 67 // Non-null iff called between a call to SetUp() and TearDown(). |
| 68 UserShare* user_share(); | 68 UserShare* user_share(); |
| 69 | 69 |
| 70 // Sync's encryption handler. Used by tests to invoke the sync encryption | 70 // Sync's encryption handler. Used by tests to invoke the sync encryption |
| 71 // methods normally handled via the SyncBackendHost | 71 // methods normally handled via the SyncEngine. |
| 72 SyncEncryptionHandler* encryption_handler(); | 72 SyncEncryptionHandler* encryption_handler(); |
| 73 | 73 |
| 74 // Returns the directory's transaction observer. This transaction observer | 74 // Returns the directory's transaction observer. This transaction observer |
| 75 // has methods which can be helpful when writing test assertions. | 75 // has methods which can be helpful when writing test assertions. |
| 76 syncable::TestTransactionObserver* transaction_observer(); | 76 syncable::TestTransactionObserver* transaction_observer(); |
| 77 | 77 |
| 78 // A helper function to pretend to download this type's root node. | 78 // A helper function to pretend to download this type's root node. |
| 79 static bool CreateRoot(ModelType model_type, UserShare* service); | 79 static bool CreateRoot(ModelType model_type, UserShare* service); |
| 80 | 80 |
| 81 size_t GetDeleteJournalSize() const; | 81 size_t GetDeleteJournalSize() const; |
| 82 | 82 |
| 83 private: | 83 private: |
| 84 std::unique_ptr<TestDirectorySetterUpper> dir_maker_; | 84 std::unique_ptr<TestDirectorySetterUpper> dir_maker_; |
| 85 std::unique_ptr<UserShare> user_share_; | 85 std::unique_ptr<UserShare> user_share_; |
| 86 | 86 |
| 87 DISALLOW_COPY_AND_ASSIGN(TestUserShare); | 87 DISALLOW_COPY_AND_ASSIGN(TestUserShare); |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 } // namespace syncer | 90 } // namespace syncer |
| 91 | 91 |
| 92 #endif // COMPONENTS_SYNC_SYNCABLE_TEST_USER_SHARE_H_ | 92 #endif // COMPONENTS_SYNC_SYNCABLE_TEST_USER_SHARE_H_ |
| OLD | NEW |