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 ...@@ -34,17 +34,6 @@ class GaiaAuthFetcherIOS
: public GaiaAuthFetcher, : public GaiaAuthFetcher,
public GaiaAuthFetcherIOSBridge::GaiaAuthFetcherIOSBridgeDelegate { public GaiaAuthFetcherIOSBridge::GaiaAuthFetcherIOSBridgeDelegate {
public: 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( GaiaAuthFetcherIOS(
GaiaAuthConsumer* consumer, GaiaAuthConsumer* consumer,
gaia::GaiaSource source, gaia::GaiaSource source,
......
...@@ -16,13 +16,6 @@ ...@@ -16,13 +16,6 @@
#error "This file requires ARC support." #error "This file requires ARC support."
#endif #endif
namespace {
// Whether the iOS specialization of the GaiaAuthFetcher should be used.
bool g_should_use_gaia_auth_fetcher_ios = true;
} // namespace
GaiaAuthFetcherIOS::GaiaAuthFetcherIOS( GaiaAuthFetcherIOS::GaiaAuthFetcherIOS(
GaiaAuthConsumer* consumer, GaiaAuthConsumer* consumer,
gaia::GaiaSource source, gaia::GaiaSource source,
...@@ -45,7 +38,7 @@ void GaiaAuthFetcherIOS::CreateAndStartGaiaFetcher( ...@@ -45,7 +38,7 @@ void GaiaAuthFetcherIOS::CreateAndStartGaiaFetcher(
bool cookies_required = bool cookies_required =
credentials_mode != network::mojom::CredentialsMode::kOmit; credentials_mode != network::mojom::CredentialsMode::kOmit;
if (!ShouldUseGaiaAuthFetcherIOS() || !cookies_required) { if (!cookies_required) {
GaiaAuthFetcher::CreateAndStartGaiaFetcher(body, body_content_type, headers, GaiaAuthFetcher::CreateAndStartGaiaFetcher(body, body_content_type, headers,
gaia_gurl, credentials_mode, gaia_gurl, credentials_mode,
traffic_annotation); traffic_annotation);
...@@ -81,12 +74,3 @@ void GaiaAuthFetcherIOS::OnFetchComplete(const GURL& url, ...@@ -81,12 +74,3 @@ void GaiaAuthFetcherIOS::OnFetchComplete(const GURL& url,
SetPendingFetch(false); SetPendingFetch(false);
DispatchFetchedRequest(url, data, net_error, response_code); 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(); ...@@ -14,13 +14,6 @@ void SetUpMockAuthentication();
// Tears down the fake ChromeIdentityService and restores the real one. // Tears down the fake ChromeIdentityService and restores the real one.
void TearDownMockAuthentication(); 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 // Signs the user out and starts clearing all identities from the
// ChromeIdentityService. // ChromeIdentityService.
void SignOutAndClearIdentities(); void SignOutAndClearIdentities();
......
...@@ -67,14 +67,6 @@ void TearDownMockAuthentication() { ...@@ -67,14 +67,6 @@ void TearDownMockAuthentication() {
->ResetChromeIdentityServiceObserverForTesting(); ->ResetChromeIdentityServiceObserverForTesting();
} }
void SetUpMockAccountReconcilor() {
GaiaAuthFetcherIOS::SetShouldUseGaiaAuthFetcherIOSForTesting(false);
}
void TearDownMockAccountReconcilor() {
GaiaAuthFetcherIOS::SetShouldUseGaiaAuthFetcherIOSForTesting(true);
}
void SignOutAndClearIdentities() { void SignOutAndClearIdentities() {
// EarlGrey monitors network requests by swizzling internal iOS network // EarlGrey monitors network requests by swizzling internal iOS network
// objects and expects them to be dealloced before the tear down. It is // objects and expects them to be dealloced before the tear down. It is
......
...@@ -15,11 +15,9 @@ ...@@ -15,11 +15,9 @@
+ (void)setUpMockAuthentication { + (void)setUpMockAuthentication {
chrome_test_util::SetUpMockAuthentication(); chrome_test_util::SetUpMockAuthentication();
chrome_test_util::SetUpMockAccountReconcilor();
} }
+ (void)tearDownMockAuthentication { + (void)tearDownMockAuthentication {
chrome_test_util::TearDownMockAccountReconcilor();
chrome_test_util::TearDownMockAuthentication(); 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