| 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 188f72c2ed56d1f8e52fccd8a70cb138e15ff676..15af86c1c629620feadbe3a8db1b8d8ec8fd3ee8 100644
|
| --- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
|
| +++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
|
| @@ -596,7 +596,7 @@ base::WeakPtr<AutofillDialogControllerImpl>
|
| content::WebContents* contents,
|
| const FormData& form_structure,
|
| const GURL& source_url,
|
| - const base::Callback<void(const FormStructure*)>& callback) {
|
| + const AutofillManagerDelegate::ResultCallback& callback) {
|
| // AutofillDialogControllerImpl owns itself.
|
| AutofillDialogControllerImpl* autofill_dialog_controller =
|
| new AutofillDialogControllerImpl(contents,
|
| @@ -636,7 +636,7 @@ base::WeakPtr<AutofillDialogController> AutofillDialogController::Create(
|
| content::WebContents* contents,
|
| const FormData& form_structure,
|
| const GURL& source_url,
|
| - const base::Callback<void(const FormStructure*)>& callback) {
|
| + const AutofillManagerDelegate::ResultCallback& callback) {
|
| return AutofillDialogControllerImpl::Create(contents,
|
| form_structure,
|
| source_url,
|
| @@ -654,7 +654,7 @@ void AutofillDialogControllerImpl::Show() {
|
|
|
| // Fail if the author didn't specify autocomplete types.
|
| if (!has_types) {
|
| - callback_.Run(NULL);
|
| + callback_.Run(blink::WebFormElement::AutocompleteResultErrorInvalid, NULL);
|
| delete this;
|
| return;
|
| }
|
| @@ -2179,7 +2179,7 @@ bool AutofillDialogControllerImpl::OnCancel() {
|
| HidePopup();
|
| if (!is_submitting_)
|
| LogOnCancelMetrics();
|
| - callback_.Run(NULL);
|
| + callback_.Run(blink::WebFormElement::AutocompleteResultErrorCancel, NULL);
|
| return true;
|
| }
|
|
|
| @@ -2675,7 +2675,7 @@ AutofillDialogControllerImpl::AutofillDialogControllerImpl(
|
| content::WebContents* contents,
|
| const FormData& form_structure,
|
| const GURL& source_url,
|
| - const base::Callback<void(const FormStructure*)>& callback)
|
| + const AutofillManagerDelegate::ResultCallback& callback)
|
| : WebContentsObserver(contents),
|
| profile_(Profile::FromBrowserContext(contents->GetBrowserContext())),
|
| initial_user_state_(AutofillMetrics::DIALOG_USER_STATE_UNKNOWN),
|
| @@ -3750,7 +3750,8 @@ void AutofillDialogControllerImpl::DoFinishSubmit() {
|
| LogOnFinishSubmitMetrics();
|
|
|
| // Callback should be called as late as possible.
|
| - callback_.Run(&form_structure_);
|
| + callback_.Run(blink::WebFormElement::AutocompleteResultSuccess,
|
| + &form_structure_);
|
| data_was_passed_back_ = true;
|
|
|
| // This might delete us.
|
|
|