diff options
author | dbeam@chromium.org <dbeam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-06 19:20:18 +0000 |
---|---|---|
committer | dbeam@chromium.org <dbeam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-06 19:20:18 +0000 |
commit | dcf49966adbd4027ca58e89032f1aa4afaa1dfa3 (patch) | |
tree | 07ddfb3252628e18a2d2b593a57e5bf1d73e5725 | |
parent | b6d7f2f4697e7e614559141aebbb3a68d0e45c8a (diff) | |
download | chromium_src-dcf49966adbd4027ca58e89032f1aa4afaa1dfa3.zip chromium_src-dcf49966adbd4027ca58e89032f1aa4afaa1dfa3.tar.gz chromium_src-dcf49966adbd4027ca58e89032f1aa4afaa1dfa3.tar.bz2 |
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
4 files changed, 5 insertions, 11 deletions
diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc index fcfe3c4..d29a0dc 100644 --- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc +++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc @@ -615,8 +615,7 @@ void AutofillDialogControllerImpl::Show() { // Test whether we need to show the shipping section. If filling that section // would be a no-op, don't show it. const DetailInputs& inputs = RequestedFieldsForSection(SECTION_SHIPPING); - EmptyDataModelWrapper empty_wrapper; - cares_about_shipping_ = empty_wrapper.FillFormStructure( + cares_about_shipping_ = EmptyDataModelWrapper().FillFormStructure( inputs, base::Bind(common::DetailInputMatchesField, SECTION_SHIPPING), &form_structure_); @@ -2759,7 +2758,6 @@ void AutofillDialogControllerImpl::SuggestionsUpdated() { std::vector<base::string16> labels; AutofillProfile::CreateDifferentiatingLabels(profiles, &labels); DCHECK_EQ(labels.size(), profiles.size()); - const std::string app_locale = g_browser_process->GetApplicationLocale(); for (size_t i = 0; i < profiles.size(); ++i) { const AutofillProfile& profile = *profiles[i]; if (!HasCompleteAndVerifiedData(profile, requested_shipping_fields_) || @@ -2845,11 +2843,10 @@ void AutofillDialogControllerImpl::SuggestionsUpdated() { void AutofillDialogControllerImpl::FillOutputForSectionWithComparator( DialogSection section, const InputFieldComparator& compare) { - const DetailInputs& inputs = RequestedFieldsForSection(section); - if (!SectionIsActive(section)) return; + const DetailInputs& inputs = RequestedFieldsForSection(section); scoped_ptr<DataModelWrapper> wrapper = CreateWrapper(section); if (wrapper) { // Only fill in data that is associated with this section. diff --git a/chrome/browser/ui/autofill/autofill_dialog_types.cc b/chrome/browser/ui/autofill/autofill_dialog_types.cc index f6d6b07..723a1b9 100644 --- a/chrome/browser/ui/autofill/autofill_dialog_types.cc +++ b/chrome/browser/ui/autofill/autofill_dialog_types.cc @@ -8,7 +8,6 @@ #include "base/strings/string_split.h" #include "base/strings/string_util.h" #include "grit/generated_resources.h" -#include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" namespace { diff --git a/chrome/browser/ui/autofill/autofill_dialog_view_delegate.h b/chrome/browser/ui/autofill/autofill_dialog_view_delegate.h index 24a31e6..d102dfb 100644 --- a/chrome/browser/ui/autofill/autofill_dialog_view_delegate.h +++ b/chrome/browser/ui/autofill/autofill_dialog_view_delegate.h @@ -149,7 +149,6 @@ class AutofillDialogViewDelegate { ServerFieldType type, const base::string16& value) = 0; - // Decides whether the combination of all |inputs| is valid, returns a // map of field types to validity messages. virtual ValidityMessages InputsAreValid(DialogSection section, diff --git a/chrome/browser/ui/views/autofill/autofill_dialog_views.cc b/chrome/browser/ui/views/autofill/autofill_dialog_views.cc index eebd2e1..e774e72 100644 --- a/chrome/browser/ui/views/autofill/autofill_dialog_views.cc +++ b/chrome/browser/ui/views/autofill/autofill_dialog_views.cc @@ -1924,10 +1924,9 @@ void AutofillDialogViews::CreateDetailsSection(DialogSection section) { DetailsGroup* group = GroupForSection(section); // Container (holds label + inputs). - group->container = new SectionContainer( - delegate_->LabelForSection(section), - inputs_container, - group->suggested_button); + group->container = new SectionContainer(delegate_->LabelForSection(section), + inputs_container, + group->suggested_button); DCHECK(group->suggested_button->parent()); UpdateDetailsGroupState(*group); } |