summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill/autofill_dialog.h
diff options
context:
space:
mode:
authordhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-05 02:47:37 +0000
committerdhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-05 02:47:37 +0000
commitf749da537323d5dd900e636edeb111d8f52e7e9d (patch)
tree2d1da8ab40e8dc3aec06d53f29d2423702021d02 /chrome/browser/autofill/autofill_dialog.h
parentcd69619bc053d527b7c82aac81c605157b28d01f (diff)
downloadchromium_src-f749da537323d5dd900e636edeb111d8f52e7e9d.zip
chromium_src-f749da537323d5dd900e636edeb111d8f52e7e9d.tar.gz
chromium_src-f749da537323d5dd900e636edeb111d8f52e7e9d.tar.bz2
AutoFill profile shouldn't be saved when cancelled during initial setup.
Relanding after revert of: 46424 http://codereview.chromium.org/1902003 Fixing compile error on Windows. For first encounter with fillable form, the AutoFillManager::OnInfoBarAccepted() call now passes the new profile and credit card information to the dialog directly instead of saving it to the database and then invoking the dialog. This facilitates "Cancel" in the dialog where the new information is not persisted. This was a good opportunity to refactor the deferred PersonalDataManager::Observer() logic out of the preferences dialog and into the AutoFillDialogController itself. This also consolidates the Windows, Mac, and Linux interfaces for the ShowAutoFillDialog() call. More work is required on Linux and Windows to properly conform to this interface and fix bug 41010. The Linux and Windows implementations will need to respect the new input parameters |imported_profile| and |imported_credit_card|. BUG=41010 TEST=AutoFillDialogControllerTest.WaitForDataToLoad, AutoFillDialogControllerTest.ImportedParameters Review URL: http://codereview.chromium.org/1952002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46430 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill/autofill_dialog.h')
-rw-r--r--chrome/browser/autofill/autofill_dialog.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/chrome/browser/autofill/autofill_dialog.h b/chrome/browser/autofill/autofill_dialog.h
index 2dd3855..2f02443 100644
--- a/chrome/browser/autofill/autofill_dialog.h
+++ b/chrome/browser/autofill/autofill_dialog.h
@@ -33,19 +33,21 @@ class AutoFillDialogObserver {
// The dialog fills out the profile fields using this data. |observer| will be
// notified by OnAutoFillDialogAccept when the user has applied changes.
//
+// The |parent| parameter (currently only used on Windows) specifies the parent
+// view in the view hierarchy. May be NULL on Mac and gtk.
+//
+// Optional parameters |imported_profile| and |imported_credit_card| may be
+// supplied. If they are supplied (non-NULL) they will be used instead of
+// the profile and credit card data retrieved from the PersonalDataManager
+// associated with the |profile|.
+//
// The PersonalDataManager owns the contents of these vectors. The lifetime of
// the contents is until the PersonalDataManager replaces them with new data
// whenever the web database is updated.
-#if defined(OS_MACOSX)
-// TODO(dhollowa): update .mm files and remove this.
-void ShowAutoFillDialog(AutoFillDialogObserver* observer,
- const std::vector<AutoFillProfile*>& profiles,
- const std::vector<CreditCard*>& credit_cards,
- Profile* profile);
-#else
-void ShowAutoFillDialog(gfx::NativeWindow parent,
+void ShowAutoFillDialog(gfx::NativeView parent,
AutoFillDialogObserver* observer,
- Profile* profile);
-#endif
+ Profile* profile,
+ AutoFillProfile* imported_profile,
+ CreditCard* imported_credit_card);
#endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_DIALOG_H_