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

Side by Side Diff: components/autofill/core/browser/form_group.cc

Issue 22040002: [Autofill] Add a separate enumeration for HTML field type hints. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix browser test Created 7 years, 4 months 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/autofill/core/browser/form_group.h" 5 #include "components/autofill/core/browser/form_group.h"
6 6
7 #include "components/autofill/core/browser/autofill_type.h" 7 #include "components/autofill/core/browser/autofill_type.h"
8 8
9 namespace autofill { 9 namespace autofill {
10 10
(...skipping 20 matching lines...) Expand all
31 GetSupportedTypes(&types); 31 GetSupportedTypes(&types);
32 for (ServerFieldTypeSet::const_iterator type = types.begin(); 32 for (ServerFieldTypeSet::const_iterator type = types.begin();
33 type != types.end(); ++type) { 33 type != types.end(); ++type) {
34 if (!GetInfo(AutofillType(*type), app_locale).empty()) 34 if (!GetInfo(AutofillType(*type), app_locale).empty())
35 non_empty_types->insert(*type); 35 non_empty_types->insert(*type);
36 } 36 }
37 } 37 }
38 38
39 base::string16 FormGroup::GetInfo(const AutofillType& type, 39 base::string16 FormGroup::GetInfo(const AutofillType& type,
40 const std::string& app_locale) const { 40 const std::string& app_locale) const {
41 return GetRawInfo(type.server_type()); 41 return GetRawInfo(type.GetStorableType());
42 } 42 }
43 43
44 bool FormGroup::SetInfo(const AutofillType& type, 44 bool FormGroup::SetInfo(const AutofillType& type,
45 const base::string16& value, 45 const base::string16& value,
46 const std::string& app_locale) { 46 const std::string& app_locale) {
47 SetRawInfo(type.server_type(), value); 47 SetRawInfo(type.GetStorableType(), value);
48 return true; 48 return true;
49 } 49 }
50 50
51 } // namespace autofill 51 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/browser/field_types.h ('k') | components/autofill/core/browser/form_structure.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698