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

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

Issue 1706453002: No protected data members in ProfileSyncService tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@581640_move_files
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
« no previous file with comments | « no previous file | components/browser_sync/browser/abstract_profile_sync_service_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/browser_sync/browser/abstract_profile_sync_service_test.h
diff --git a/components/browser_sync/browser/abstract_profile_sync_service_test.h b/components/browser_sync/browser/abstract_profile_sync_service_test.h
index 5963db73bc156b73e6e36f75288293220dcedb3a..a6ad4638a90f076648bf5602c9d114e6e5913dd6 100644
--- a/components/browser_sync/browser/abstract_profile_sync_service_test.h
+++ b/components/browser_sync/browser/abstract_profile_sync_service_test.h
@@ -52,11 +52,25 @@ class AbstractProfileSyncServiceTest : public testing::Test {
// |profile_sync_service_bundle_|, with start behavior
// browser_sync::AUTO_START. Passes |callback| down to
// SyncManagerForProfileSyncTest to be used by NotifyInitializationSuccess.
- // |sync_client| is passed to the service.
- scoped_ptr<TestProfileSyncService> CreateSyncService(
- scoped_ptr<sync_driver::SyncClient> sync_client,
- const base::Closure& initialization_success_callback);
+ // |sync_client| is passed to the service. The created service is stored in
+ // |sync_service_|.
+ void CreateSyncService(scoped_ptr<sync_driver::SyncClient> sync_client,
+ const base::Closure& initialization_success_callback);
+ base::Thread* data_type_thread() { return &data_type_thread_; }
+
+ TestProfileSyncService* sync_service() { return sync_service_.get(); }
+
+ // Returns the callback for the FakeSyncClient builder. It is not possible to
+ // just Bind() sync_service(), because of Callback not understanding the
+ // inheritance of its template arguments.
+ base::Callback<sync_driver::SyncService*(void)> GetSyncServiceCallback();
+
+ browser_sync::ProfileSyncServiceBundle* profile_sync_service_bundle() {
+ return &profile_sync_service_bundle_;
+ }
+
+ private:
// Use |data_type_thread_| for code disallowed on the UI thread.
base::Thread data_type_thread_;
@@ -64,7 +78,6 @@ class AbstractProfileSyncServiceTest : public testing::Test {
browser_sync::ProfileSyncServiceBundle profile_sync_service_bundle_;
scoped_ptr<TestProfileSyncService> sync_service_;
- private:
base::ScopedTempDir temp_dir_; // To pass to the backend host.
DISALLOW_COPY_AND_ASSIGN(AbstractProfileSyncServiceTest);
« no previous file with comments | « no previous file | components/browser_sync/browser/abstract_profile_sync_service_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698