Commit e0c0b534 authored by siyua's avatar siyua Committed by Commit Bot

[Upstream Feedback] BugFix: Fix the issue that address cannot be saved.

This CL fixes the problem that Chrome settings page won't refresh
itself after exiting from a Incognito window and saving a new address.

The root reason requires more investigation but this CL will fix the
RB bug. SaveCardBubbleControllerImpl does not need to be created again
(even though creating a new controller should not hurt)
since if there is no controller then the promo is not visible.

Bug: 1016669, 932818, 1024041
Change-Id: I7a8c3dc144ddb1b6b11672efe8e1dfd6b9a15b32
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1898717Reviewed-by: default avatarPeter Boström <pbos@chromium.org>
Reviewed-by: default avatarEvan Stade <estade@chromium.org>
Commit-Queue: Siyu An <siyua@chromium.org>
Cr-Commit-Position: refs/heads/master@{#715047}
parent a8cd3c5e
...@@ -959,11 +959,11 @@ void MaybeShowSaveLocalCardSignInPromo(Browser* browser) { ...@@ -959,11 +959,11 @@ void MaybeShowSaveLocalCardSignInPromo(Browser* browser) {
void CloseSaveLocalCardSignInPromo(Browser* browser) { void CloseSaveLocalCardSignInPromo(Browser* browser) {
WebContents* web_contents = WebContents* web_contents =
browser->tab_strip_model()->GetActiveWebContents(); browser->tab_strip_model()->GetActiveWebContents();
autofill::SaveCardBubbleControllerImpl::CreateForWebContents(web_contents);
autofill::SaveCardBubbleControllerImpl* controller = autofill::SaveCardBubbleControllerImpl* controller =
autofill::SaveCardBubbleControllerImpl::FromWebContents(web_contents); autofill::SaveCardBubbleControllerImpl::FromWebContents(web_contents);
controller->HideBubbleForSignInPromo(); if (controller)
controller->HideBubbleForSignInPromo();
} }
void Translate(Browser* browser) { void Translate(Browser* browser) {
......
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