Commit cb2a31ff authored by Antonio Gomes's avatar Antonio Gomes Committed by Commit Bot

[s13n] Convert save_card_bubble_controller_impl.cc to IdentityManager

BUG=907533

Change-Id: Ib8714aa26040bbfb9338454c5c327f9194a20d32
Reviewed-on: https://chromium-review.googlesource.com/c/1347149Reviewed-by: default avatarFabio Tirelo <ftirelo@chromium.org>
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Cr-Commit-Position: refs/heads/master@{#610248}
parent 50a63e04
...@@ -11,8 +11,7 @@ ...@@ -11,8 +11,7 @@
#include "chrome/browser/autofill/legacy_strike_database_factory.h" #include "chrome/browser/autofill/legacy_strike_database_factory.h"
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/account_consistency_mode_manager.h" #include "chrome/browser/signin/account_consistency_mode_manager.h"
#include "chrome/browser/signin/account_tracker_service_factory.h" #include "chrome/browser/signin/identity_manager_factory.h"
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/signin/signin_ui_util.h" #include "chrome/browser/signin/signin_ui_util.h"
#include "chrome/browser/ssl/security_state_tab_helper.h" #include "chrome/browser/ssl/security_state_tab_helper.h"
#include "chrome/browser/sync/profile_sync_service_factory.h" #include "chrome/browser/sync/profile_sync_service_factory.h"
...@@ -35,12 +34,11 @@ ...@@ -35,12 +34,11 @@
#include "components/autofill/core/common/autofill_prefs.h" #include "components/autofill/core/common/autofill_prefs.h"
#include "components/browser_sync/profile_sync_service.h" #include "components/browser_sync/profile_sync_service.h"
#include "components/prefs/pref_service.h" #include "components/prefs/pref_service.h"
#include "components/signin/core/browser/account_tracker_service.h"
#include "components/signin/core/browser/signin_buildflags.h" #include "components/signin/core/browser/signin_buildflags.h"
#include "components/signin/core/browser/signin_manager_base.h"
#include "components/strings/grit/components_strings.h" #include "components/strings/grit/components_strings.h"
#include "components/user_prefs/user_prefs.h" #include "components/user_prefs/user_prefs.h"
#include "content/public/browser/navigation_handle.h" #include "content/public/browser/navigation_handle.h"
#include "services/identity/public/cpp/identity_manager.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
namespace autofill { namespace autofill {
...@@ -549,14 +547,10 @@ void SaveCardBubbleControllerImpl::FetchAccountInfo() { ...@@ -549,14 +547,10 @@ void SaveCardBubbleControllerImpl::FetchAccountInfo() {
Profile* profile = GetProfile(); Profile* profile = GetProfile();
if (!profile) if (!profile)
return; return;
SigninManagerBase* signin_manager = auto* identity_manager = IdentityManagerFactory::GetForProfile(profile);
SigninManagerFactory::GetForProfile(profile); if (!identity_manager)
AccountTrackerService* account_tracker =
AccountTrackerServiceFactory::GetForProfile(profile);
if (!signin_manager || !account_tracker)
return; return;
account_info_ = account_tracker->GetAccountInfo( account_info_ = identity_manager->GetPrimaryAccountInfo();
signin_manager->GetAuthenticatedAccountId());
} }
LegacyStrikeDatabase* SaveCardBubbleControllerImpl::GetLegacyStrikeDatabase() { LegacyStrikeDatabase* SaveCardBubbleControllerImpl::GetLegacyStrikeDatabase() {
......
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