| 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 // A handy class that takes care of setting up and destroying a | 5 // A handy class that takes care of setting up and destroying a |
| 6 // UserShare instance for unit tests that require one. | 6 // UserShare instance for unit tests that require one. |
| 7 // | 7 // |
| 8 // The expected usage is to make this a component of your test fixture: | 8 // The expected usage is to make this a component of your test fixture: |
| 9 // | 9 // |
| 10 // class AwesomenessTest : public testing::Test { | 10 // class AwesomenessTest : public testing::Test { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 // ReadTransaction trans(test_user_share_.user_share()); | 25 // ReadTransaction trans(test_user_share_.user_share()); |
| 26 // ... | 26 // ... |
| 27 // } | 27 // } |
| 28 // | 28 // |
| 29 | 29 |
| 30 #ifndef COMPONENTS_SYNC_CORE_TEST_TEST_USER_SHARE_H_ | 30 #ifndef COMPONENTS_SYNC_CORE_TEST_TEST_USER_SHARE_H_ |
| 31 #define COMPONENTS_SYNC_CORE_TEST_TEST_USER_SHARE_H_ | 31 #define COMPONENTS_SYNC_CORE_TEST_TEST_USER_SHARE_H_ |
| 32 | 32 |
| 33 #include <stddef.h> | 33 #include <stddef.h> |
| 34 | 34 |
| 35 #include <memory> |
| 36 |
| 35 #include "base/macros.h" | 37 #include "base/macros.h" |
| 36 #include "components/sync/base/model_type.h" | 38 #include "components/sync/base/model_type.h" |
| 37 #include "components/sync/core/user_share.h" | 39 #include "components/sync/core/user_share.h" |
| 38 | 40 |
| 39 namespace syncer { | 41 namespace syncer { |
| 40 | 42 |
| 41 class SyncEncryptionHandler; | 43 class SyncEncryptionHandler; |
| 42 class TestDirectorySetterUpper; | 44 class TestDirectorySetterUpper; |
| 43 | 45 |
| 44 namespace syncable { | 46 namespace syncable { |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 private: | 84 private: |
| 83 std::unique_ptr<TestDirectorySetterUpper> dir_maker_; | 85 std::unique_ptr<TestDirectorySetterUpper> dir_maker_; |
| 84 std::unique_ptr<UserShare> user_share_; | 86 std::unique_ptr<UserShare> user_share_; |
| 85 | 87 |
| 86 DISALLOW_COPY_AND_ASSIGN(TestUserShare); | 88 DISALLOW_COPY_AND_ASSIGN(TestUserShare); |
| 87 }; | 89 }; |
| 88 | 90 |
| 89 } // namespace syncer | 91 } // namespace syncer |
| 90 | 92 |
| 91 #endif // COMPONENTS_SYNC_CORE_TEST_TEST_USER_SHARE_H_ | 93 #endif // COMPONENTS_SYNC_CORE_TEST_TEST_USER_SHARE_H_ |
| OLD | NEW |