| 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/views/autofill/autofill_dialog_views.h" |     5 #include "chrome/browser/ui/views/autofill/autofill_dialog_views.h" | 
|     6  |     6  | 
|     7 #include <utility> |     7 #include <utility> | 
|     8  |     8  | 
|     9 #include "base/bind.h" |     9 #include "base/bind.h" | 
|    10 #include "base/strings/utf_string_conversions.h" |    10 #include "base/strings/utf_string_conversions.h" | 
| (...skipping 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1254   // Make sure to overwrite the originating input. |  1254   // Make sure to overwrite the originating input. | 
|  1255   TextfieldMap::iterator text_mapping = |  1255   TextfieldMap::iterator text_mapping = | 
|  1256       group->textfields.find(&originating_input); |  1256       group->textfields.find(&originating_input); | 
|  1257   if (text_mapping != group->textfields.end()) |  1257   if (text_mapping != group->textfields.end()) | 
|  1258     text_mapping->second->SetText(base::string16()); |  1258     text_mapping->second->SetText(base::string16()); | 
|  1259  |  1259  | 
|  1260   // If the Autofill data comes from a credit card, make sure to overwrite the |  1260   // If the Autofill data comes from a credit card, make sure to overwrite the | 
|  1261   // CC comboboxes (even if they already have something in them). If the |  1261   // CC comboboxes (even if they already have something in them). If the | 
|  1262   // Autofill data comes from an AutofillProfile, leave the comboboxes alone. |  1262   // Autofill data comes from an AutofillProfile, leave the comboboxes alone. | 
|  1263   if ((section == SECTION_CC || section == SECTION_CC_BILLING) && |  1263   if ((section == SECTION_CC || section == SECTION_CC_BILLING) && | 
|  1264       AutofillType(originating_input.type).group() == |  1264       AutofillType(originating_input.type).group() == CREDIT_CARD) { | 
|  1265               AutofillType::CREDIT_CARD) { |  | 
|  1266     for (ComboboxMap::const_iterator it = group->comboboxes.begin(); |  1265     for (ComboboxMap::const_iterator it = group->comboboxes.begin(); | 
|  1267          it != group->comboboxes.end(); ++it) { |  1266          it != group->comboboxes.end(); ++it) { | 
|  1268       if (AutofillType(it->first->type).group() == AutofillType::CREDIT_CARD) |  1267       if (AutofillType(it->first->type).group() == CREDIT_CARD) | 
|  1269         it->second->SetSelectedIndex(it->second->model()->GetDefaultIndex()); |  1268         it->second->SetSelectedIndex(it->second->model()->GetDefaultIndex()); | 
|  1270     } |  1269     } | 
|  1271   } |  1270   } | 
|  1272  |  1271  | 
|  1273   UpdateSectionImpl(section, false); |  1272   UpdateSectionImpl(section, false); | 
|  1274 } |  1273 } | 
|  1275  |  1274  | 
|  1276 void AutofillDialogViews::GetUserInput(DialogSection section, |  1275 void AutofillDialogViews::GetUserInput(DialogSection section, | 
|  1277                                        DetailOutputMap* output) { |  1276                                        DetailOutputMap* output) { | 
|  1278   DetailsGroup* group = GroupForSection(section); |  1277   DetailsGroup* group = GroupForSection(section); | 
| (...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2267 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) |  2266 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) | 
|  2268     : section(section), |  2267     : section(section), | 
|  2269       container(NULL), |  2268       container(NULL), | 
|  2270       manual_input(NULL), |  2269       manual_input(NULL), | 
|  2271       suggested_info(NULL), |  2270       suggested_info(NULL), | 
|  2272       suggested_button(NULL) {} |  2271       suggested_button(NULL) {} | 
|  2273  |  2272  | 
|  2274 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} |  2273 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} | 
|  2275  |  2274  | 
|  2276 }  // namespace autofill |  2275 }  // namespace autofill | 
| OLD | NEW |