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

Unified Diff: components/browser_sync/browser/profile_sync_test_util.h

Issue 1684643002: Avoid BrowserThread in profile_sync_service_autofill_unittest.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Just rebased Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: components/browser_sync/browser/profile_sync_test_util.h
diff --git a/components/browser_sync/browser/profile_sync_test_util.h b/components/browser_sync/browser/profile_sync_test_util.h
index 485e7ddd3c98dd9d521010fe1cf21dbad101218b..4a55cafe7ee037726fbd5708b04f57e89b479121 100644
--- a/components/browser_sync/browser/profile_sync_test_util.h
+++ b/components/browser_sync/browser/profile_sync_test_util.h
@@ -63,15 +63,8 @@ class ProfileSyncServiceBundle {
typedef FakeSigninManager FakeSigninManagerType;
#endif
- // Use this if you don't care about threads.
ProfileSyncServiceBundle();
- // Use this to inject threads directly.
- ProfileSyncServiceBundle(
- const scoped_refptr<base::SingleThreadTaskRunner>& db_thread,
- const scoped_refptr<base::SingleThreadTaskRunner>& file_thread,
- base::SequencedWorkerPool* worker_pool);
-
~ProfileSyncServiceBundle();
// Builders
@@ -165,23 +158,14 @@ class ProfileSyncServiceBundle {
base::SingleThreadTaskRunner* db_thread() { return db_thread_.get(); }
- base::SingleThreadTaskRunner* file_thread() { return file_thread_.get(); }
+ void set_db_thread(
+ const scoped_refptr<base::SingleThreadTaskRunner>& db_thread) {
+ db_thread_ = db_thread;
+ }
private:
- struct ThreadProvider; // Helper to create threads and worker pool.
-
- // Either |thread_provider| must be null and or the other arguments non-null,
- // or vice versa.
- ProfileSyncServiceBundle(
- scoped_ptr<ThreadProvider> thread_provider,
- scoped_refptr<base::SingleThreadTaskRunner> db_thread,
- scoped_refptr<base::SingleThreadTaskRunner> file_thread,
- base::SequencedWorkerPool* worker_pool);
-
- scoped_ptr<ThreadProvider> thread_provider_;
- const scoped_refptr<base::SingleThreadTaskRunner> db_thread_;
- const scoped_refptr<base::SingleThreadTaskRunner> file_thread_;
- base::SequencedWorkerPool* const worker_pool_;
+ scoped_refptr<base::SingleThreadTaskRunner> db_thread_;
+ base::SequencedWorkerPoolOwner worker_pool_owner_;
syncable_prefs::TestingPrefServiceSyncable pref_service_;
TestSigninClient signin_client_;
AccountTrackerService account_tracker_;
« no previous file with comments | « chrome/browser/sync/test_profile_sync_service.h ('k') | components/browser_sync/browser/profile_sync_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698