[sync] Remove unused client factory override for tests
It's dead code without plans to be adopted in the future.
Change-Id: I82d727c166601d10498935d89bd31d664b47a9b0
Bug: None
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2959876
Commit-Queue: Mikel Astiz <mastiz@chromium.org>
Commit-Queue: Victor Vianna <victorvianna@google.com>
Auto-Submit: Mikel Astiz <mastiz@chromium.org>
Reviewed-by: Victor Vianna <victorvianna@google.com>
Cr-Commit-Position: refs/heads/master@{#892531}
diff --git a/chrome/browser/sync/sync_service_factory.cc b/chrome/browser/sync/sync_service_factory.cc
index 546b699..aa731d5 100644
--- a/chrome/browser/sync/sync_service_factory.cc
+++ b/chrome/browser/sync/sync_service_factory.cc
@@ -190,12 +190,8 @@
Profile* profile = Profile::FromBrowserContext(context);
- std::unique_ptr<browser_sync::ChromeSyncClient> sync_client =
- client_factory_
- ? client_factory_->Run(profile)
- : std::make_unique<browser_sync::ChromeSyncClient>(profile);
-
- init_params.sync_client = std::move(sync_client);
+ init_params.sync_client =
+ std::make_unique<browser_sync::ChromeSyncClient>(profile);
init_params.network_time_update_callback =
base::BindRepeating(&UpdateNetworkTime);
init_params.url_loader_factory = profile->GetDefaultStoragePartition()
@@ -323,13 +319,3 @@
}
return sync_services;
}
-
-// static
-void SyncServiceFactory::SetSyncClientFactoryForTest(
- SyncClientFactory* client_factory) {
- client_factory_ = client_factory;
-}
-
-// static
-SyncServiceFactory::SyncClientFactory* SyncServiceFactory::client_factory_ =
- nullptr;
diff --git a/chrome/browser/sync/sync_service_factory.h b/chrome/browser/sync/sync_service_factory.h
index 16b668c..5a873fb 100644
--- a/chrome/browser/sync/sync_service_factory.h
+++ b/chrome/browser/sync/sync_service_factory.h
@@ -18,10 +18,6 @@
struct DefaultSingletonTraits;
} // namespace base
-namespace browser_sync {
-class ChromeSyncClient;
-} // namespace browser_sync
-
namespace syncer {
class SyncServiceImpl;
class SyncService;
@@ -29,10 +25,6 @@
class SyncServiceFactory : public BrowserContextKeyedServiceFactory {
public:
- using SyncClientFactory =
- base::RepeatingCallback<std::unique_ptr<browser_sync::ChromeSyncClient>(
- Profile*)>;
-
// Returns the SyncService for the given profile.
static syncer::SyncService* GetForProfile(Profile* profile);
// Returns the SyncServiceImpl for the given profile. DO NOT USE unless
@@ -51,9 +43,6 @@
static SyncServiceFactory* GetInstance();
- // Overrides how the SyncClient is created for testing purposes.
- static void SetSyncClientFactoryForTest(SyncClientFactory* client_factory);
-
// Iterates over all profiles that have been loaded so far and extract their
// SyncService if present. Returned pointers are guaranteed to be not null.
static std::vector<const syncer::SyncService*> GetAllSyncServices();
@@ -70,10 +59,6 @@
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
- // A factory function for overriding the way the SyncClient is created.
- // This is a raw pointer so it can be statically initialized.
- static SyncClientFactory* client_factory_;
-
DISALLOW_COPY_AND_ASSIGN(SyncServiceFactory);
};