summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/autofill')
-rw-r--r--chrome/browser/autofill/autofill_manager.cc12
-rw-r--r--chrome/browser/autofill/autofill_manager.h3
-rw-r--r--chrome/browser/autofill/form_structure.cc5
-rw-r--r--chrome/browser/autofill/form_structure.h7
4 files changed, 15 insertions, 12 deletions
diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc
index d49dd4c..ee44c75 100644
--- a/chrome/browser/autofill/autofill_manager.cc
+++ b/chrome/browser/autofill/autofill_manager.cc
@@ -154,7 +154,7 @@ bool AutoFillManager::GetAutoFillSuggestions(
}
bool AutoFillManager::FillAutoFillFormData(int query_id,
- const FormData& form,
+ const webkit_glue::FormData& form,
const string16& name,
const string16& label) {
if (!IsAutoFillEnabled())
@@ -185,7 +185,7 @@ bool AutoFillManager::FillAutoFillFormData(int query_id,
if (!profile)
return false;
- FormData result = form;
+ webkit_glue::FormData result = form;
for (std::vector<FormStructure*>::const_iterator iter =
form_structures_.begin();
iter != form_structures_.end(); ++iter) {
@@ -196,10 +196,10 @@ bool AutoFillManager::FillAutoFillFormData(int query_id,
for (size_t i = 0; i < form_structure->field_count(); ++i) {
const AutoFillField* field = form_structure->field(i);
- for (size_t j = 0; j < result.values.size(); ++j) {
- if (field->name() == result.elements[j]) {
- result.values[j] =
- profile->GetFieldText(AutoFillType(field->heuristic_type()));
+ for (size_t j = 0; j < result.fields.size(); ++j) {
+ if (field->name() == result.fields[j].name()) {
+ result.fields[j].set_value(
+ profile->GetFieldText(AutoFillType(field->heuristic_type())));
break;
}
}
diff --git a/chrome/browser/autofill/autofill_manager.h b/chrome/browser/autofill/autofill_manager.h
index ecc72d9..fa4593e 100644
--- a/chrome/browser/autofill/autofill_manager.h
+++ b/chrome/browser/autofill/autofill_manager.h
@@ -14,6 +14,7 @@
#include "chrome/browser/renderer_host/render_view_host_delegate.h"
namespace webkit_glue {
+struct FormData;
class FormField;
class FormFieldValues;
}
@@ -48,7 +49,7 @@ class AutoFillManager : public RenderViewHostDelegate::AutoFill,
virtual bool GetAutoFillSuggestions(int query_id,
const webkit_glue::FormField& field);
virtual bool FillAutoFillFormData(int query_id,
- const FormData& form,
+ const webkit_glue::FormData& form,
const string16& name,
const string16& label);
diff --git a/chrome/browser/autofill/form_structure.cc b/chrome/browser/autofill/form_structure.cc
index a93910c..4841da8 100644
--- a/chrome/browser/autofill/form_structure.cc
+++ b/chrome/browser/autofill/form_structure.cc
@@ -16,6 +16,9 @@
#include "webkit/glue/form_field.h"
#include "webkit/glue/form_field_values.h"
+using webkit_glue::FormData;
+using webkit_glue::FormFieldValues;
+
namespace {
const char* kFormMethodPost = "post";
@@ -55,7 +58,7 @@ static std::string Hash64Bit(const std::string& str) {
} // namespace
-FormStructure::FormStructure(const webkit_glue::FormFieldValues& values)
+FormStructure::FormStructure(const FormFieldValues& values)
: form_name_(UTF16ToUTF8(values.form_name)),
source_url_(values.source_url),
target_url_(values.target_url) {
diff --git a/chrome/browser/autofill/form_structure.h b/chrome/browser/autofill/form_structure.h
index d91882b..6c41203 100644
--- a/chrome/browser/autofill/form_structure.h
+++ b/chrome/browser/autofill/form_structure.h
@@ -14,9 +14,8 @@
#include "chrome/browser/autofill/field_types.h"
#include "googleurl/src/gurl.h"
-struct FormData;
-
namespace webkit_glue {
+struct FormData;
class FormFieldValues;
}
@@ -60,8 +59,8 @@ class FormStructure {
return fields_.end();
}
- bool operator==(const FormData& form) const;
- bool operator!=(const FormData& form) const;
+ bool operator==(const webkit_glue::FormData& form) const;
+ bool operator!=(const webkit_glue::FormData& form) const;
private:
// Associates the field with the heuristic type for each of the field views.