Commit 05caea21 authored by Lowell Manners's avatar Lowell Manners Committed by Commit Bot

Delete (now) useless FakeGaiaCookieManagerService factory method.

The deleted factory was created a FakeGaiaCookieManagerService
which was just a passthrough wrapper around GaiaCookieManagerService.

Since FakeGaiaCookieManagerService was only acting as a pass-through the
net effect of creating it was zero.

Bug: 907782
Change-Id: I45453afbdd21584c96e328cdd24136072bce83ff
Reviewed-on: https://chromium-review.googlesource.com/c/1421999Reviewed-by: default avatarColin Blundell <blundell@chromium.org>
Reviewed-by: default avatarDavid Roger <droger@chromium.org>
Commit-Queue: Lowell Manners <lowell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#626044}
parent 0b31440d
...@@ -12,14 +12,6 @@ ...@@ -12,14 +12,6 @@
#include "components/signin/core/browser/profile_oauth2_token_service.h" #include "components/signin/core/browser/profile_oauth2_token_service.h"
#include "services/network/test/test_url_loader_factory.h" #include "services/network/test/test_url_loader_factory.h"
std::unique_ptr<KeyedService> BuildFakeGaiaCookieManagerService(
content::BrowserContext* context) {
Profile* profile = Profile::FromBrowserContext(context);
return std::make_unique<FakeGaiaCookieManagerService>(
ProfileOAuth2TokenServiceFactory::GetForProfile(profile),
ChromeSigninClientFactory::GetForProfile(profile));
}
std::unique_ptr<KeyedService> BuildFakeGaiaCookieManagerServiceWithURLLoader( std::unique_ptr<KeyedService> BuildFakeGaiaCookieManagerServiceWithURLLoader(
network::TestURLLoaderFactory* test_url_loader_factory, network::TestURLLoaderFactory* test_url_loader_factory,
content::BrowserContext* context) { content::BrowserContext* context) {
......
...@@ -18,10 +18,6 @@ namespace network { ...@@ -18,10 +18,6 @@ namespace network {
class TestURLLoaderFactory; class TestURLLoaderFactory;
} }
// Helper functions to be used with KeyedService::SetTestingFactory().
std::unique_ptr<KeyedService> BuildFakeGaiaCookieManagerService(
content::BrowserContext* context);
// Builds a FakeGaiaCookieManagerService which uses the provided // Builds a FakeGaiaCookieManagerService which uses the provided
// |test_url_loader_factory| for cookie-related requests. // |test_url_loader_factory| for cookie-related requests.
std::unique_ptr<KeyedService> BuildFakeGaiaCookieManagerServiceWithURLLoader( std::unique_ptr<KeyedService> BuildFakeGaiaCookieManagerServiceWithURLLoader(
......
...@@ -68,9 +68,7 @@ void IdentityTestEnvironmentProfileAdaptor:: ...@@ -68,9 +68,7 @@ void IdentityTestEnvironmentProfileAdaptor::
// static // static
TestingProfile::TestingFactories TestingProfile::TestingFactories
IdentityTestEnvironmentProfileAdaptor::GetIdentityTestEnvironmentFactories() { IdentityTestEnvironmentProfileAdaptor::GetIdentityTestEnvironmentFactories() {
return {{GaiaCookieManagerServiceFactory::GetInstance(), return {{ProfileOAuth2TokenServiceFactory::GetInstance(),
base::BindRepeating(&BuildFakeGaiaCookieManagerService)},
{ProfileOAuth2TokenServiceFactory::GetInstance(),
base::BindRepeating(&BuildFakeProfileOAuth2TokenService)}, base::BindRepeating(&BuildFakeProfileOAuth2TokenService)},
{SigninManagerFactory::GetInstance(), {SigninManagerFactory::GetInstance(),
base::BindRepeating(&BuildFakeSigninManagerForTesting)}}; base::BindRepeating(&BuildFakeSigninManagerForTesting)}};
......
...@@ -135,9 +135,7 @@ class DiceSigninUiUtilTest : public BrowserWithTestWindowTest { ...@@ -135,9 +135,7 @@ class DiceSigninUiUtilTest : public BrowserWithTestWindowTest {
return {{SigninManagerFactory::GetInstance(), return {{SigninManagerFactory::GetInstance(),
base::BindRepeating(&BuildFakeSigninManagerForTesting)}, base::BindRepeating(&BuildFakeSigninManagerForTesting)},
{ProfileOAuth2TokenServiceFactory::GetInstance(), {ProfileOAuth2TokenServiceFactory::GetInstance(),
base::BindRepeating(&BuildFakeProfileOAuth2TokenService)}, base::BindRepeating(&BuildFakeProfileOAuth2TokenService)}};
{GaiaCookieManagerServiceFactory::GetInstance(),
base::BindRepeating(&BuildFakeGaiaCookieManagerService)}};
} }
// BrowserWithTestWindowTest: // BrowserWithTestWindowTest:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment