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

Side by Side Diff: components/sync/syncable/test_user_share.h

Issue 2533083002: [Sync] SyncEngine refactor part 1: interfaces. (Closed)
Patch Set: Rebase. Created 4 years 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
« no previous file with comments | « components/sync/engine/sync_engine_host.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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
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_
OLDNEW
« no previous file with comments | « components/sync/engine/sync_engine_host.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698