Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/autofill/autofill_manager.h" | 5 #include "chrome/browser/autofill/autofill_manager.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 477 | 477 |
| 478 return prefs->GetBoolean(prefs::kAutoFillEnabled); | 478 return prefs->GetBoolean(prefs::kAutoFillEnabled); |
| 479 } | 479 } |
| 480 | 480 |
| 481 void AutoFillManager::DeterminePossibleFieldTypesForUpload( | 481 void AutoFillManager::DeterminePossibleFieldTypesForUpload( |
| 482 FormStructure* submitted_form) { | 482 FormStructure* submitted_form) { |
| 483 for (size_t i = 0; i < submitted_form->field_count(); i++) { | 483 for (size_t i = 0; i < submitted_form->field_count(); i++) { |
| 484 const AutoFillField* field = submitted_form->field(i); | 484 const AutoFillField* field = submitted_form->field(i); |
| 485 FieldTypeSet field_types; | 485 FieldTypeSet field_types; |
| 486 personal_data_->GetPossibleFieldTypes(field->value(), &field_types); | 486 personal_data_->GetPossibleFieldTypes(field->value(), &field_types); |
| 487 | |
| 487 DCHECK(!field_types.empty()); | 488 DCHECK(!field_types.empty()); |
|
Ilya Sherman
2011/01/21 00:25:58
What happened to this bit of code?
if (field_type
GeorgeY
2011/01/21 00:39:02
Do not want to bloat this cl too much, going to to
Ilya Sherman
2011/01/21 00:46:51
If we want to make the changes separately, we shou
dhollowa
2011/01/21 02:14:57
Ilya is correct. I wrote a "Washington Irving" un
GeorgeY
2011/01/21 03:41:32
Done.
| |
| 488 submitted_form->set_possible_types(i, field_types); | 489 submitted_form->set_possible_types(i, field_types); |
| 489 } | 490 } |
| 490 } | 491 } |
| 491 | 492 |
| 492 void AutoFillManager::LogMetricsAboutSubmittedForm( | 493 void AutoFillManager::LogMetricsAboutSubmittedForm( |
| 493 const FormData& form, | 494 const FormData& form, |
| 494 const FormStructure* submitted_form) { | 495 const FormStructure* submitted_form) { |
| 495 FormStructure* cached_submitted_form = NULL; | 496 FormStructure* cached_submitted_form = NULL; |
| 496 AutoFillField* ignored; | 497 AutoFillField* ignored; |
| 497 if (!FindCachedFormAndField(form, form.fields.front(), | 498 if (!FindCachedFormAndField(form, form.fields.front(), |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 886 return std::string(); | 887 return std::string(); |
| 887 | 888 |
| 888 std::map<int, std::string>::const_iterator iter = id_guid_map_.find(id); | 889 std::map<int, std::string>::const_iterator iter = id_guid_map_.find(id); |
| 889 if (iter == id_guid_map_.end()) { | 890 if (iter == id_guid_map_.end()) { |
| 890 NOTREACHED(); | 891 NOTREACHED(); |
| 891 return std::string(); | 892 return std::string(); |
| 892 } | 893 } |
| 893 | 894 |
| 894 return iter->second; | 895 return iter->second; |
| 895 } | 896 } |
| OLD | NEW |