Index: chrome/browser/ui/autofill/save_card_bubble_controller_impl.cc |
diff --git a/chrome/browser/ui/autofill/save_card_bubble_controller_impl.cc b/chrome/browser/ui/autofill/save_card_bubble_controller_impl.cc |
index 186d083f1ef04e85451a597b5c20d4264b4957a3..b963de56055ea56191965c39a351f6e6672782af 100644 |
--- a/chrome/browser/ui/autofill/save_card_bubble_controller_impl.cc |
+++ b/chrome/browser/ui/autofill/save_card_bubble_controller_impl.cc |
@@ -50,6 +50,10 @@ SaveCardBubbleControllerImpl::~SaveCardBubbleControllerImpl() { |
void SaveCardBubbleControllerImpl::ShowBubbleForLocalSave( |
const CreditCard& card, |
const base::Closure& save_card_callback) { |
+ // Don't show the bubble if it's already visible. |
+ if (save_card_bubble_view_) |
+ return; |
+ |
is_uploading_ = false; |
is_reshow_ = false; |
should_cvc_be_requested_ = false; |
@@ -71,6 +75,10 @@ void SaveCardBubbleControllerImpl::ShowBubbleForUpload( |
std::unique_ptr<base::DictionaryValue> legal_message, |
bool should_cvc_be_requested, |
const base::Closure& save_card_callback) { |
+ // Don't show the bubble if it's already visible. |
+ if (save_card_bubble_view_) |
+ return; |
+ |
is_uploading_ = true; |
is_reshow_ = false; |
should_cvc_be_requested_ = should_cvc_be_requested; |
@@ -102,6 +110,10 @@ void SaveCardBubbleControllerImpl::HideBubble() { |
} |
void SaveCardBubbleControllerImpl::ReshowBubble() { |
+ // Don't show the bubble if it's already visible. |
+ if (save_card_bubble_view_) |
+ return; |
+ |
is_reshow_ = true; |
AutofillMetrics::LogSaveCardPromptMetric( |
AutofillMetrics::SAVE_CARD_PROMPT_SHOW_REQUESTED, is_uploading_, |