Commit c8409826 authored by Manas Verma's avatar Manas Verma Committed by Commit Bot

[Autofill] Updating save card promo title.

Before, the promo title would be different depending on whether or not
the user is signed in — "...sign in and turn on sync." vs "...turn on
sync."

Now with the new DICe UI, promo titles will not include "sign in and ".
So regardless of whether the user is signed-in, the promo title will now
be "To use your cards on all devices, turn on sync."

Bug: 872825
Change-Id: I5de9061ac8ad5771f803ba4f66969338746256a1
Reviewed-on: https://chromium-review.googlesource.com/1246363Reviewed-by: default avatarSebastien Seguin-Gagnon <sebsg@chromium.org>
Reviewed-by: default avatarFabio Tirelo <ftirelo@chromium.org>
Commit-Queue: Fabio Tirelo <ftirelo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594493}
parent 4e7d5958
...@@ -194,9 +194,7 @@ base::string16 SaveCardBubbleControllerImpl::GetWindowTitle() const { ...@@ -194,9 +194,7 @@ base::string16 SaveCardBubbleControllerImpl::GetWindowTitle() const {
#if BUILDFLAG(ENABLE_DICE_SUPPORT) #if BUILDFLAG(ENABLE_DICE_SUPPORT)
if (AccountConsistencyModeManager::IsDiceEnabledForProfile( if (AccountConsistencyModeManager::IsDiceEnabledForProfile(
GetProfile())) { GetProfile())) {
return l10n_util::GetStringUTF16(dice_accounts_.empty() return l10n_util::GetStringUTF16(IDS_AUTOFILL_SYNC_PROMO_MESSAGE);
? IDS_AUTOFILL_SIGNIN_PROMO_MESSAGE
: IDS_AUTOFILL_SYNC_PROMO_MESSAGE);
} }
#endif #endif
return l10n_util::GetStringUTF16(IDS_AUTOFILL_CARD_SAVED); return l10n_util::GetStringUTF16(IDS_AUTOFILL_CARD_SAVED);
...@@ -503,11 +501,6 @@ void SaveCardBubbleControllerImpl::FetchAccountInfo() { ...@@ -503,11 +501,6 @@ void SaveCardBubbleControllerImpl::FetchAccountInfo() {
return; return;
account_info_ = account_tracker->GetAccountInfo( account_info_ = account_tracker->GetAccountInfo(
signin_manager->GetAuthenticatedAccountId()); signin_manager->GetAuthenticatedAccountId());
#if BUILDFLAG(ENABLE_DICE_SUPPORT)
if (AccountConsistencyModeManager::IsDiceEnabledForProfile(profile))
dice_accounts_ = signin_ui_util::GetAccountsForDicePromos(profile);
#endif
} }
void SaveCardBubbleControllerImpl::ShowBubble() { void SaveCardBubbleControllerImpl::ShowBubble() {
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#define CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_IMPL_H_ #define CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_IMPL_H_
#include <memory> #include <memory>
#include <vector>
#include "base/macros.h" #include "base/macros.h"
#include "base/timer/elapsed_timer.h" #include "base/timer/elapsed_timer.h"
...@@ -172,10 +171,6 @@ class SaveCardBubbleControllerImpl ...@@ -172,10 +171,6 @@ class SaveCardBubbleControllerImpl
// The account info of the signed-in user. // The account info of the signed-in user.
AccountInfo account_info_; AccountInfo account_info_;
// The list of accounts that are signed-in but not syncing. Used for checking
// which promo message to show.
std::vector<AccountInfo> dice_accounts_;
// Contains the details of the card that will be saved if the user accepts. // Contains the details of the card that will be saved if the user accepts.
CreditCard card_; CreditCard card_;
......
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