| Index: chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
|
| diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
|
| index 32d1383c2779b1a94df1cd7db5ac565f85d1f0ec..daf2b4f50684480fd64607d1e9eed5cb8d730cfc 100644
|
| --- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
|
| +++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
|
| @@ -3447,8 +3447,31 @@ void AutofillDialogControllerImpl::MaybeShowCreditCardBubble() {
|
| return;
|
|
|
| if (newly_saved_card_) {
|
| + scoped_ptr<AutofillProfile> billing_profile;
|
| +
|
| + SuggestionsMenuModel* billing_model =
|
| + SuggestionsMenuModelForSection(SECTION_BILLING);
|
| + std::string item_key = billing_model->GetItemKeyForCheckedItem();
|
| + if (IsASuggestionItemKey(item_key) &&
|
| + !IsManuallyEditingSection(SECTION_BILLING)) {
|
| + // Just snag the currently suggested profile.
|
| + AutofillProfile* profile = GetManager()->GetProfileByGUID(item_key);
|
| + billing_profile.reset(new AutofillProfile(*profile));
|
| + } else {
|
| + // Scrape the view as the user's entering or updating information.
|
| + DetailOutputMap outputs;
|
| + view_->GetUserInput(SECTION_BILLING, &outputs);
|
| + billing_profile.reset(new AutofillProfile);
|
| + FillFormGroupFromOutputs(outputs, billing_profile.get());
|
| + }
|
| +
|
| + // The bubble also needs the associated email address.
|
| + billing_profile->SetRawInfo(
|
| + EMAIL_ADDRESS,
|
| + GetValueFromSection(SECTION_EMAIL, EMAIL_ADDRESS));
|
| +
|
| AutofillCreditCardBubbleController::ShowNewCardSavedBubble(
|
| - web_contents(), newly_saved_card_->TypeAndLastFourDigits());
|
| + web_contents(), newly_saved_card_.Pass(), billing_profile.Pass());
|
| return;
|
| }
|
|
|
| @@ -3471,7 +3494,7 @@ void AutofillDialogControllerImpl::MaybeShowCreditCardBubble() {
|
| GetBillingInfoFromOutputs(output, &card, NULL, NULL);
|
| backing_last_four = card.TypeAndLastFourDigits();
|
| }
|
| - AutofillCreditCardBubbleController::ShowGeneratedCardUI(
|
| + AutofillCreditCardBubbleController::ShowGeneratedCardBubble(
|
| web_contents(), backing_last_four, full_wallet_->TypeAndLastFourDigits());
|
| }
|
|
|
|
|