Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: components/sync/test/engine/test_directory_setter_upper.h

Issue 2388673002: Revert of [Sync] Move //components/sync to the syncer namespace. (patchset #5 id:40001 of https://co (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 // syncable::Directory instance for unit tests that require one. 6 // syncable::Directory 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 class TestDirectorySetterUpper { 50 class TestDirectorySetterUpper {
51 public: 51 public:
52 TestDirectorySetterUpper(); 52 TestDirectorySetterUpper();
53 virtual ~TestDirectorySetterUpper(); 53 virtual ~TestDirectorySetterUpper();
54 54
55 // Create a Directory instance open it. 55 // Create a Directory instance open it.
56 virtual void SetUp(); 56 virtual void SetUp();
57 57
58 // Create a Directory instance using |directory_store| as backend storage. 58 // Create a Directory instance using |directory_store| as backend storage.
59 // Takes ownership of |directory_store|. 59 // Takes ownership of |directory_store|.
60 virtual void SetUpWith(syncable::DirectoryBackingStore* directory_store); 60 virtual void SetUpWith(
61 syncer::syncable::DirectoryBackingStore* directory_store);
61 62
62 // Undo everything done by SetUp(): close the directory and delete the 63 // Undo everything done by SetUp(): close the directory and delete the
63 // backing files. Before closing the directory, this will run the directory 64 // backing files. Before closing the directory, this will run the directory
64 // invariant checks and perform the SaveChanges action on the directory. 65 // invariant checks and perform the SaveChanges action on the directory.
65 virtual void TearDown(); 66 virtual void TearDown();
66 67
67 syncable::Directory* directory() { return directory_.get(); } 68 syncable::Directory* directory() { return directory_.get(); }
68 69
69 SyncEncryptionHandler* encryption_handler() { return &encryption_handler_; } 70 SyncEncryptionHandler* encryption_handler() { return &encryption_handler_; }
70 71
(...skipping 11 matching lines...) Expand all
82 FakeSyncEncryptionHandler encryption_handler_; 83 FakeSyncEncryptionHandler encryption_handler_;
83 std::unique_ptr<syncable::Directory> directory_; 84 std::unique_ptr<syncable::Directory> directory_;
84 std::string name_; 85 std::string name_;
85 86
86 DISALLOW_COPY_AND_ASSIGN(TestDirectorySetterUpper); 87 DISALLOW_COPY_AND_ASSIGN(TestDirectorySetterUpper);
87 }; 88 };
88 89
89 } // namespace syncer 90 } // namespace syncer
90 91
91 #endif // COMPONENTS_SYNC_TEST_ENGINE_TEST_DIRECTORY_SETTER_UPPER_H_ 92 #endif // COMPONENTS_SYNC_TEST_ENGINE_TEST_DIRECTORY_SETTER_UPPER_H_
OLDNEW
« no previous file with comments | « components/sync/test/engine/single_type_mock_server.cc ('k') | components/sync/test/engine/test_directory_setter_upper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698