Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3621)

Unified Diff: chrome/browser/autofill/autofill_manager.cc

Issue 8353025: External autofill delegates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: feedback Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autofill/autofill_manager.cc
diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc
index 21c2597965fc6cd49510bb665841ace46d546917..dc6d4386bde2c2b3af4c7ffd181404fd0dc32bd5 100644
--- a/chrome/browser/autofill/autofill_manager.cc
+++ b/chrome/browser/autofill/autofill_manager.cc
@@ -19,6 +19,7 @@
#include "chrome/browser/autocomplete_history_manager.h"
#include "chrome/browser/autofill/autofill_cc_infobar_delegate.h"
#include "chrome/browser/autofill/autofill_feedback_infobar_delegate.h"
+#include "chrome/browser/autofill/autofill_external_delegate.h"
#include "chrome/browser/autofill/autofill_field.h"
#include "chrome/browser/autofill/autofill_metrics.h"
#include "chrome/browser/autofill/autofill_profile.h"
@@ -216,7 +217,8 @@ AutofillManager::AutofillManager(TabContentsWrapper* tab_contents)
did_show_suggestions_(false),
user_did_type_(false),
user_did_autofill_(false),
- user_did_edit_autofilled_field_(false) {
+ user_did_edit_autofilled_field_(false),
+ external_delegate_(NULL) {
DCHECK(tab_contents);
// |personal_data_| is NULL when using TestTabContents.
@@ -382,6 +384,9 @@ void AutofillManager::OnQueryFormFieldAutofill(int query_id,
std::vector<string16> icons;
std::vector<int> unique_ids;
+ if (external_delegate_)
+ external_delegate_->OnQuery(query_id, form, field);
+
RenderViewHost* host = NULL;
FormStructure* form_structure = NULL;
AutofillField* autofill_field = NULL;
@@ -744,7 +749,8 @@ AutofillManager::AutofillManager(TabContentsWrapper* tab_contents,
did_show_suggestions_(false),
user_did_type_(false),
user_did_autofill_(false),
- user_did_edit_autofilled_field_(false) {
+ user_did_edit_autofilled_field_(false),
+ external_delegate_(NULL) {
DCHECK(tab_contents);
}

Powered by Google App Engine
This is Rietveld 408576698