Commit 95eab18a authored by Nohemi Fernandez's avatar Nohemi Fernandez Committed by Commit Bot

[iOS] Remove unused global variable 'ShouldUseGaiaAuthFetcherIOS'.

The global variable 'ShouldUseGaiaAuthFetcherIOS' is no longer used
following the launch of NSURLSessionBridge.

Bug: 1101748
Change-Id: I8c20303ec98811afd6f8b83dc19f8caa6ec27805
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2425823Reviewed-by: default avatarSylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Nohemi Fernandez <fernandex@chromium.org>
Cr-Commit-Position: refs/heads/master@{#809734}
parent f9c57e44
......@@ -34,17 +34,6 @@ class GaiaAuthFetcherIOS
: public GaiaAuthFetcher,
public GaiaAuthFetcherIOSBridge::GaiaAuthFetcherIOSBridgeDelegate {
public:
// Sets whether the iOS specialization of the GaiaAuthFetcher should be used.
// Mainly used for testing.
// Note that if |should_use| is true, it might still not be used if it is
// unnecessary or WKWebView isn't enabled.
static void SetShouldUseGaiaAuthFetcherIOSForTesting(
bool use_gaia_fetcher_ios);
// Returns whether the iOS specialization of the GaiaAuthFetcher should be
// used.
static bool ShouldUseGaiaAuthFetcherIOS();
GaiaAuthFetcherIOS(
GaiaAuthConsumer* consumer,
gaia::GaiaSource source,
......
......@@ -16,13 +16,6 @@
#error "This file requires ARC support."
#endif
namespace {
// Whether the iOS specialization of the GaiaAuthFetcher should be used.
bool g_should_use_gaia_auth_fetcher_ios = true;
} // namespace
GaiaAuthFetcherIOS::GaiaAuthFetcherIOS(
GaiaAuthConsumer* consumer,
gaia::GaiaSource source,
......@@ -45,7 +38,7 @@ void GaiaAuthFetcherIOS::CreateAndStartGaiaFetcher(
bool cookies_required =
credentials_mode != network::mojom::CredentialsMode::kOmit;
if (!ShouldUseGaiaAuthFetcherIOS() || !cookies_required) {
if (!cookies_required) {
GaiaAuthFetcher::CreateAndStartGaiaFetcher(body, body_content_type, headers,
gaia_gurl, credentials_mode,
traffic_annotation);
......@@ -81,12 +74,3 @@ void GaiaAuthFetcherIOS::OnFetchComplete(const GURL& url,
SetPendingFetch(false);
DispatchFetchedRequest(url, data, net_error, response_code);
}
void GaiaAuthFetcherIOS::SetShouldUseGaiaAuthFetcherIOSForTesting(
bool use_gaia_fetcher_ios) {
g_should_use_gaia_auth_fetcher_ios = use_gaia_fetcher_ios;
}
bool GaiaAuthFetcherIOS::ShouldUseGaiaAuthFetcherIOS() {
return g_should_use_gaia_auth_fetcher_ios;
}
......@@ -14,13 +14,6 @@ void SetUpMockAuthentication();
// Tears down the fake ChromeIdentityService and restores the real one.
void TearDownMockAuthentication();
// Sets up a mock AccountReconcilor that will always succeed and won't use the
// network.
void SetUpMockAccountReconcilor();
// Tears down the mock AccountReconcilor if it was previously set up.
void TearDownMockAccountReconcilor();
// Signs the user out and starts clearing all identities from the
// ChromeIdentityService.
void SignOutAndClearIdentities();
......
......@@ -67,14 +67,6 @@ void TearDownMockAuthentication() {
->ResetChromeIdentityServiceObserverForTesting();
}
void SetUpMockAccountReconcilor() {
GaiaAuthFetcherIOS::SetShouldUseGaiaAuthFetcherIOSForTesting(false);
}
void TearDownMockAccountReconcilor() {
GaiaAuthFetcherIOS::SetShouldUseGaiaAuthFetcherIOSForTesting(true);
}
void SignOutAndClearIdentities() {
// EarlGrey monitors network requests by swizzling internal iOS network
// objects and expects them to be dealloced before the tear down. It is
......
......@@ -15,11 +15,9 @@
+ (void)setUpMockAuthentication {
chrome_test_util::SetUpMockAuthentication();
chrome_test_util::SetUpMockAccountReconcilor();
}
+ (void)tearDownMockAuthentication {
chrome_test_util::TearDownMockAccountReconcilor();
chrome_test_util::TearDownMockAuthentication();
}
......
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