Commit dcf49966 authored by dbeam@chromium.org's avatar dbeam@chromium.org

Some nits I found while looking around rAc() code.

R=estade@chromium.org, groby@chromium.org
BUG=none
TEST=smaller diff in next CL

Review URL: https://codereview.chromium.org/98693017

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243137 0039d316-1c4b-4281-b951-d872f2087c98
parent b6d7f2f4
...@@ -615,8 +615,7 @@ void AutofillDialogControllerImpl::Show() { ...@@ -615,8 +615,7 @@ void AutofillDialogControllerImpl::Show() {
// Test whether we need to show the shipping section. If filling that section // Test whether we need to show the shipping section. If filling that section
// would be a no-op, don't show it. // would be a no-op, don't show it.
const DetailInputs& inputs = RequestedFieldsForSection(SECTION_SHIPPING); const DetailInputs& inputs = RequestedFieldsForSection(SECTION_SHIPPING);
EmptyDataModelWrapper empty_wrapper; cares_about_shipping_ = EmptyDataModelWrapper().FillFormStructure(
cares_about_shipping_ = empty_wrapper.FillFormStructure(
inputs, inputs,
base::Bind(common::DetailInputMatchesField, SECTION_SHIPPING), base::Bind(common::DetailInputMatchesField, SECTION_SHIPPING),
&form_structure_); &form_structure_);
...@@ -2759,7 +2758,6 @@ void AutofillDialogControllerImpl::SuggestionsUpdated() { ...@@ -2759,7 +2758,6 @@ void AutofillDialogControllerImpl::SuggestionsUpdated() {
std::vector<base::string16> labels; std::vector<base::string16> labels;
AutofillProfile::CreateDifferentiatingLabels(profiles, &labels); AutofillProfile::CreateDifferentiatingLabels(profiles, &labels);
DCHECK_EQ(labels.size(), profiles.size()); DCHECK_EQ(labels.size(), profiles.size());
const std::string app_locale = g_browser_process->GetApplicationLocale();
for (size_t i = 0; i < profiles.size(); ++i) { for (size_t i = 0; i < profiles.size(); ++i) {
const AutofillProfile& profile = *profiles[i]; const AutofillProfile& profile = *profiles[i];
if (!HasCompleteAndVerifiedData(profile, requested_shipping_fields_) || if (!HasCompleteAndVerifiedData(profile, requested_shipping_fields_) ||
...@@ -2845,11 +2843,10 @@ void AutofillDialogControllerImpl::SuggestionsUpdated() { ...@@ -2845,11 +2843,10 @@ void AutofillDialogControllerImpl::SuggestionsUpdated() {
void AutofillDialogControllerImpl::FillOutputForSectionWithComparator( void AutofillDialogControllerImpl::FillOutputForSectionWithComparator(
DialogSection section, DialogSection section,
const InputFieldComparator& compare) { const InputFieldComparator& compare) {
const DetailInputs& inputs = RequestedFieldsForSection(section);
if (!SectionIsActive(section)) if (!SectionIsActive(section))
return; return;
const DetailInputs& inputs = RequestedFieldsForSection(section);
scoped_ptr<DataModelWrapper> wrapper = CreateWrapper(section); scoped_ptr<DataModelWrapper> wrapper = CreateWrapper(section);
if (wrapper) { if (wrapper) {
// Only fill in data that is associated with this section. // Only fill in data that is associated with this section.
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include "base/strings/string_split.h" #include "base/strings/string_split.h"
#include "base/strings/string_util.h" #include "base/strings/string_util.h"
#include "grit/generated_resources.h" #include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h" #include "ui/base/resource/resource_bundle.h"
namespace { namespace {
......
...@@ -149,7 +149,6 @@ class AutofillDialogViewDelegate { ...@@ -149,7 +149,6 @@ class AutofillDialogViewDelegate {
ServerFieldType type, ServerFieldType type,
const base::string16& value) = 0; const base::string16& value) = 0;
// Decides whether the combination of all |inputs| is valid, returns a // Decides whether the combination of all |inputs| is valid, returns a
// map of field types to validity messages. // map of field types to validity messages.
virtual ValidityMessages InputsAreValid(DialogSection section, virtual ValidityMessages InputsAreValid(DialogSection section,
......
...@@ -1924,10 +1924,9 @@ void AutofillDialogViews::CreateDetailsSection(DialogSection section) { ...@@ -1924,10 +1924,9 @@ void AutofillDialogViews::CreateDetailsSection(DialogSection section) {
DetailsGroup* group = GroupForSection(section); DetailsGroup* group = GroupForSection(section);
// Container (holds label + inputs). // Container (holds label + inputs).
group->container = new SectionContainer( group->container = new SectionContainer(delegate_->LabelForSection(section),
delegate_->LabelForSection(section), inputs_container,
inputs_container, group->suggested_button);
group->suggested_button);
DCHECK(group->suggested_button->parent()); DCHECK(group->suggested_button->parent());
UpdateDetailsGroupState(*group); UpdateDetailsGroupState(*group);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment