Commit a9570617 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

Remove obsolete overload of GoogleSignedOut

SigninManager::Observer::GoogleSignedOut had two overload one
taking a AccountInfo, and one taking two std::string. The latter
is deprecated in favor of the former.

As all overrides of the latter version are in components/signin
or services/identity, convert them in one CL and remove the old
method (that is now unused).

Bug: none
Change-Id: I1e65e9d182f7e48e75ed86f43647a57f65bf3d0e
Reviewed-on: https://chromium-review.googlesource.com/c/1344094
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: default avatarDavid Roger <droger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610384}
parent 45ef66be
......@@ -164,7 +164,7 @@ void FakeSigninManager::OnSignoutDecisionReached(
client_->GetPrefs()->ClearPref(prefs::kGoogleServicesUserAccountId);
client_->GetPrefs()->ClearPref(prefs::kSignedInTime);
FireGoogleSignedOut(account_id, account_info);
FireGoogleSignedOut(account_info);
}
#endif // !defined (OS_CHROMEOS)
......@@ -259,7 +259,7 @@ void SigninManager::OnSignoutDecisionReached(
break;
}
FireGoogleSignedOut(account_id, account_info);
FireGoogleSignedOut(account_info);
}
void SigninManager::Initialize(PrefService* local_state) {
......@@ -443,10 +443,8 @@ void SigninManager::FireGoogleSigninSucceeded() {
}
}
void SigninManager::FireGoogleSignedOut(const std::string& account_id,
const AccountInfo& account_info) {
void SigninManager::FireGoogleSignedOut(const AccountInfo& account_info) {
for (auto& observer : observer_list_) {
observer.GoogleSignedOut(account_id, account_info.email);
observer.GoogleSignedOut(account_info);
}
}
......
......@@ -224,8 +224,7 @@ class SigninManager : public SigninManagerBase,
void FireGoogleSigninSucceeded();
// Send all observers |GoogleSignedOut| notifications.
void FireGoogleSignedOut(const std::string& account_id,
const AccountInfo& account_info);
void FireGoogleSignedOut(const AccountInfo& account_info);
// Waits for the AccountTrackerService, then sends GoogleSigninSucceeded to
// the client and clears the local password.
......
......@@ -74,10 +74,6 @@ class SigninManagerBase : public KeyedService {
// Called when the currently signed-in user for a user has been signed out.
virtual void GoogleSignedOut(const AccountInfo& account_info) {}
// DEPRECATED: Use the above method instead.
virtual void GoogleSignedOut(const std::string& account_id,
const std::string& username) {}
protected:
virtual ~Observer() {}
......
......@@ -65,8 +65,7 @@ class TestSigninManagerObserver : public SigninManagerBase::Observer {
num_successful_signins_with_password_++;
}
void GoogleSignedOut(const std::string& account_id,
const std::string& username) override {
void GoogleSignedOut(const AccountInfo& account_info) override {
num_signouts_++;
}
};
......
......@@ -87,8 +87,8 @@ void SigninStatusMetricsProvider::GoogleSigninSucceeded(
}
}
void SigninStatusMetricsProvider::GoogleSignedOut(const std::string& account_id,
const std::string& username) {
void SigninStatusMetricsProvider::GoogleSignedOut(
const AccountInfo& account_info) {
SigninStatus recorded_signin_status = signin_status();
if (recorded_signin_status == ALL_PROFILES_SIGNED_IN) {
UpdateSigninStatus(MIXED_SIGNIN_STATUS);
......
......@@ -70,8 +70,7 @@ class SigninStatusMetricsProvider : public SigninStatusMetricsProviderBase,
// SigninManagerBase::Observer:
void GoogleSigninSucceeded(const AccountInfo& account_info) override;
void GoogleSignedOut(const std::string& account_id,
const std::string& username) override;
void GoogleSignedOut(const AccountInfo& account_info) override;
// Obtain sign-in status and add observers.
void Initialize();
......
......@@ -43,13 +43,13 @@ TEST(SigninStatusMetricsProviderTest, GoogleSignedOut) {
// Initial status is all signed in and then one of the profiles is signed out.
metrics_provider.UpdateInitialSigninStatus(2, 2);
metrics_provider.GoogleSignedOut(std::string(), std::string());
metrics_provider.GoogleSignedOut(AccountInfo());
EXPECT_EQ(SigninStatusMetricsProviderBase::MIXED_SIGNIN_STATUS,
metrics_provider.GetSigninStatusForTesting());
// Initial status is mixed and then one of the profiles is signed out.
metrics_provider.UpdateInitialSigninStatus(2, 1);
metrics_provider.GoogleSignedOut(std::string(), std::string());
metrics_provider.GoogleSignedOut(AccountInfo());
EXPECT_EQ(SigninStatusMetricsProviderBase::MIXED_SIGNIN_STATUS,
metrics_provider.GetSigninStatusForTesting());
}
......@@ -157,8 +157,7 @@ class AccountConsistencyService : public KeyedService,
// SigninManagerBase::Observer implementation.
void GoogleSigninSucceeded(const AccountInfo& account_info) override;
void GoogleSignedOut(const std::string& account_id,
const std::string& username) override;
void GoogleSignedOut(const AccountInfo& account_info) override;
// ActiveStateManager::Observer implementation.
void OnActive() override;
......
......@@ -495,8 +495,8 @@ void AccountConsistencyService::GoogleSigninSucceeded(
AddChromeConnectedCookies();
}
void AccountConsistencyService::GoogleSignedOut(const std::string& account_id,
const std::string& username) {
void AccountConsistencyService::GoogleSignedOut(
const AccountInfo& account_info) {
// There is not need to remove CHROME_CONNECTED cookies on |GoogleSignedOut|
// events as these cookies will be removed by the GaiaCookieManagerServer
// right before fetching the Gaia logout request.
......
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