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

Unified Diff: components/autofill/core/browser/autofill_manager.cc

Issue 512993002: Remove dead code in Autofill. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: also switch non-const point to const ref Created 6 years, 4 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 | « components/autofill/core/browser/autofill_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/browser/autofill_manager.cc
diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc
index 68d2a361e98cdff996d11e5d7def52bbd4fa7053..7a96bb9a3e16eee1afbd265c4319cf7a00045826 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -461,7 +461,7 @@ void AutofillManager::OnQueryFormFieldAutofill(int query_id,
field, type, &values, &labels, &icons, &unique_ids);
} else {
GetProfileSuggestions(
- form_structure, field, type, &values, &labels, &icons, &unique_ids);
+ *form_structure, field, type, &values, &labels, &icons, &unique_ids);
}
DCHECK_EQ(values.size(), labels.size());
@@ -473,9 +473,7 @@ void AutofillManager::OnQueryFormFieldAutofill(int query_id,
// provide credit card suggestions for non-HTTPS pages. However, provide a
// warning to the user in these cases.
int warning = 0;
- if (!form_structure->IsAutofillable())
- warning = IDS_AUTOFILL_WARNING_FORM_DISABLED;
- else if (is_filling_credit_card && !FormIsHTTPS(*form_structure))
+ if (is_filling_credit_card && !FormIsHTTPS(*form_structure))
warning = IDS_AUTOFILL_WARNING_INSECURE_CONNECTION;
if (warning) {
values.assign(1, l10n_util::GetStringUTF16(warning));
@@ -1070,16 +1068,16 @@ bool AutofillManager::UpdateCachedForm(const FormData& live_form,
}
void AutofillManager::GetProfileSuggestions(
- FormStructure* form,
+ const FormStructure& form,
const FormFieldData& field,
const AutofillType& type,
std::vector<base::string16>* values,
std::vector<base::string16>* labels,
std::vector<base::string16>* icons,
std::vector<int>* unique_ids) const {
- std::vector<ServerFieldType> field_types(form->field_count());
- for (size_t i = 0; i < form->field_count(); ++i) {
- field_types.push_back(form->field(i)->Type().GetStorableType());
+ std::vector<ServerFieldType> field_types(form.field_count());
+ for (size_t i = 0; i < form.field_count(); ++i) {
+ field_types.push_back(form.field(i)->Type().GetStorableType());
}
std::vector<GUIDPair> guid_pairs;
« no previous file with comments | « components/autofill/core/browser/autofill_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698