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

Unified Diff: chrome/browser/autofill_manager.cc

Issue 279001: Move autofill related WebView{Delegate} methods into the WebKit API.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « chrome/browser/autofill_manager.h ('k') | chrome/browser/renderer_host/render_view_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill_manager.cc
===================================================================
--- chrome/browser/autofill_manager.cc (revision 29209)
+++ chrome/browser/autofill_manager.cc (working copy)
@@ -23,7 +23,7 @@
AutofillManager::AutofillManager(TabContents* tab_contents)
: tab_contents_(tab_contents),
pending_query_handle_(0),
- request_id_(0) {
+ query_id_(0) {
form_autofill_enabled_.Init(prefs::kFormAutofillEnabled,
profile()->GetPrefs(), NULL);
}
@@ -55,9 +55,9 @@
StoreFormEntriesInWebDatabase(form);
}
-bool AutofillManager::GetAutofillSuggestions(int request_id,
- const std::wstring& name,
- const std::wstring& prefix) {
+bool AutofillManager::GetAutofillSuggestions(int query_id,
+ const string16& name,
+ const string16& prefix) {
if (!*form_autofill_enabled_)
return false;
@@ -70,15 +70,15 @@
CancelPendingQuery();
- request_id_ = request_id;
+ query_id_ = query_id;
pending_query_handle_ = web_data_service->GetFormValuesForElementName(
name, prefix, kMaxAutofillMenuItems, this);
return true;
}
-void AutofillManager::RemoveAutofillEntry(const std::wstring& name,
- const std::wstring& value) {
+void AutofillManager::RemoveAutofillEntry(const string16& name,
+ const string16& value) {
WebDataService* web_data_service =
profile()->GetWebDataService(Profile::EXPLICIT_ACCESS);
if (!web_data_service) {
@@ -120,12 +120,12 @@
return;
if (result) {
DCHECK(result->GetType() == AUTOFILL_VALUE_RESULT);
- const WDResult<std::vector<std::wstring> >* autofill_result =
- static_cast<const WDResult<std::vector<std::wstring> >*>(result);
+ const WDResult<std::vector<string16> >* autofill_result =
+ static_cast<const WDResult<std::vector<string16> >*>(result);
host->AutofillSuggestionsReturned(
- request_id_, autofill_result->GetValue(), -1);
+ query_id_, autofill_result->GetValue(), -1);
} else {
host->AutofillSuggestionsReturned(
- request_id_, std::vector<std::wstring>(), -1);
+ query_id_, std::vector<string16>(), -1);
}
}
« no previous file with comments | « chrome/browser/autofill_manager.h ('k') | chrome/browser/renderer_host/render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698