Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(463)

Side by Side Diff: chrome/browser/autofill/autofill_manager.cc

Issue 5851001: Try to always show a label with autofill suggestions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <string> 8 #include <string>
9 9
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 form_fields.reserve(form->field_count()); 598 form_fields.reserve(form->field_count());
599 for (std::vector<AutoFillField*>::const_iterator iter = form->begin(); 599 for (std::vector<AutoFillField*>::const_iterator iter = form->begin();
600 iter != form->end(); ++iter) { 600 iter != form->end(); ++iter) {
601 // The field list is terminated with a NULL AutoFillField, so don't try to 601 // The field list is terminated with a NULL AutoFillField, so don't try to
602 // dereference it. 602 // dereference it.
603 if (!*iter) 603 if (!*iter)
604 break; 604 break;
605 form_fields.push_back((*iter)->type()); 605 form_fields.push_back((*iter)->type());
606 } 606 }
607 607
608 AutoFillProfile::CreateInferredLabels(&matched_profiles, labels, 0, 608 AutoFillProfile::CreateInferredLabels(&matched_profiles, labels, 1,
609 type.field_type(), &form_fields); 609 type.field_type(), &form_fields);
610 610
611 // No icons for profile suggestions. 611 // No icons for profile suggestions.
612 icons->resize(values->size()); 612 icons->resize(values->size());
613 } 613 }
614 614
615 void AutoFillManager::GetCreditCardSuggestions(FormStructure* form, 615 void AutoFillManager::GetCreditCardSuggestions(FormStructure* form,
616 const FormField& field, 616 const FormField& field,
617 AutoFillType type, 617 AutoFillType type,
618 std::vector<string16>* values, 618 std::vector<string16>* values,
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 return std::string(); 768 return std::string();
769 769
770 std::map<int, std::string>::const_iterator iter = id_guid_map_.find(id); 770 std::map<int, std::string>::const_iterator iter = id_guid_map_.find(id);
771 if (iter == id_guid_map_.end()) { 771 if (iter == id_guid_map_.end()) {
772 NOTREACHED(); 772 NOTREACHED();
773 return std::string(); 773 return std::string();
774 } 774 }
775 775
776 return iter->second; 776 return iter->second;
777 } 777 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698