OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h" | 5 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/autofill/autofill_manager.h" | 9 #include "chrome/browser/autofill/autofill_manager.h" |
10 #include "chrome/browser/autofill/personal_data_manager.h" | 10 #include "chrome/browser/autofill/personal_data_manager.h" |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 FillOutputForSection(SECTION_EMAIL); | 222 FillOutputForSection(SECTION_EMAIL); |
223 FillOutputForSection(SECTION_CC); | 223 FillOutputForSection(SECTION_CC); |
224 FillOutputForSection(SECTION_BILLING); | 224 FillOutputForSection(SECTION_BILLING); |
225 if (view_->UseBillingForShipping()) { | 225 if (view_->UseBillingForShipping()) { |
226 FillOutputForSectionWithComparator( | 226 FillOutputForSectionWithComparator( |
227 SECTION_BILLING, | 227 SECTION_BILLING, |
228 base::Bind(DetailInputMatchesFieldWithSection, "shipping")); | 228 base::Bind(DetailInputMatchesFieldWithSection, "shipping")); |
229 } else { | 229 } else { |
230 FillOutputForSection(SECTION_SHIPPING); | 230 FillOutputForSection(SECTION_SHIPPING); |
231 } | 231 } |
232 // TODO(estade): pass the result along to the page. | |
233 } | 232 } |
234 | 233 |
235 callback_.Run(&form_structure_); | 234 callback_.Run(&form_structure_); |
236 delete this; | 235 delete this; |
237 } | 236 } |
238 | 237 |
239 void AutofillDialogController::GenerateComboboxModels() { | 238 void AutofillDialogController::GenerateComboboxModels() { |
240 PersonalDataManager* manager = | 239 PersonalDataManager* manager = |
241 PersonalDataManagerFactory::GetForProfile(profile_); | 240 PersonalDataManagerFactory::GetForProfile(profile_); |
242 const std::vector<CreditCard*>& cards = manager->credit_cards(); | 241 const std::vector<CreditCard*>& cards = manager->credit_cards(); |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 return items_.size(); | 344 return items_.size(); |
346 } | 345 } |
347 | 346 |
348 string16 AutofillDialogController::SuggestionsComboboxModel::GetItemAt( | 347 string16 AutofillDialogController::SuggestionsComboboxModel::GetItemAt( |
349 int index) { | 348 int index) { |
350 return items_[index].second; | 349 return items_[index].second; |
351 } | 350 } |
352 | 351 |
353 } // namespace autofill | 352 } // namespace autofill |
354 | 353 |
OLD | NEW |