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

Unified Diff: chrome/browser/autocomplete_history_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/autocomplete_history_manager.cc
diff --git a/chrome/browser/autocomplete_history_manager.cc b/chrome/browser/autocomplete_history_manager.cc
index 7ba40f0fda9e4c58cba314a32dad77dbc58cb412..ea4e3998508430f7b54a7cb95ef8d17d876db979 100644
--- a/chrome/browser/autocomplete_history_manager.cc
+++ b/chrome/browser/autocomplete_history_manager.cc
@@ -9,6 +9,7 @@
#include "base/string16.h"
#include "base/string_number_conversions.h"
#include "base/utf_string_conversions.h"
+#include "chrome/browser/autofill/autofill_external_delegate.h"
#include "chrome/browser/autofill/credit_card.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
@@ -102,7 +103,8 @@ AutocompleteHistoryManager::AutocompleteHistoryManager(
TabContents* tab_contents)
: TabContentsObserver(tab_contents),
pending_query_handle_(0),
- query_id_(0) {
+ query_id_(0),
+ external_delegate_(NULL) {
profile_ = Profile::FromBrowserContext(tab_contents->browser_context());
// May be NULL in unit tests.
web_data_service_ = profile_->GetWebDataService(Profile::EXPLICIT_ACCESS);
@@ -262,6 +264,15 @@ void AutocompleteHistoryManager::SendSuggestions(
}
}
+ if (external_delegate_) {
+ external_delegate_->OnSuggestionsReturned(
+ query_id_,
+ autofill_values_,
+ autofill_labels_,
+ autofill_icons_,
+ autofill_unique_ids_);
+ }
+
Send(new AutofillMsg_SuggestionsReturned(routing_id(),
query_id_,
autofill_values_,

Powered by Google App Engine
This is Rietveld 408576698