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

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

Issue 1694443004: [Autofill] Add credit card first and last name heuristics predictions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 9 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
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/autofill_profile.h" 5 #include "components/autofill/core/browser/autofill_profile.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <map> 9 #include <map>
10 #include <ostream> 10 #include <ostream>
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 phone_number_.set_profile(this); 285 phone_number_.set_profile(this);
286 286
287 address_ = profile.address_; 287 address_ = profile.address_;
288 set_language_code(profile.language_code()); 288 set_language_code(profile.language_code());
289 289
290 server_id_ = profile.server_id(); 290 server_id_ = profile.server_id();
291 291
292 return *this; 292 return *this;
293 } 293 }
294 294
295 // TODO(crbug.com/589535): Disambiguate similar field types before uploading.
295 void AutofillProfile::GetMatchingTypes( 296 void AutofillProfile::GetMatchingTypes(
296 const base::string16& text, 297 const base::string16& text,
297 const std::string& app_locale, 298 const std::string& app_locale,
298 ServerFieldTypeSet* matching_types) const { 299 ServerFieldTypeSet* matching_types) const {
299 FormGroupList info = FormGroups(); 300 FormGroupList info = FormGroups();
300 for (const auto& it : info) { 301 for (const auto& it : info) {
301 it->GetMatchingTypes(text, app_locale, matching_types); 302 it->GetMatchingTypes(text, app_locale, matching_types);
302 } 303 }
303 } 304 }
304 305
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 << " " << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_CITY)) << " " 1047 << " " << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_CITY)) << " "
1047 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_STATE)) << " " 1048 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_STATE)) << " "
1048 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_ZIP)) << " " 1049 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_ZIP)) << " "
1049 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_SORTING_CODE)) << " " 1050 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_SORTING_CODE)) << " "
1050 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_COUNTRY)) << " " 1051 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_COUNTRY)) << " "
1051 << profile.language_code() << " " 1052 << profile.language_code() << " "
1052 << UTF16ToUTF8(profile.GetRawInfo(PHONE_HOME_WHOLE_NUMBER)); 1053 << UTF16ToUTF8(profile.GetRawInfo(PHONE_HOME_WHOLE_NUMBER));
1053 } 1054 }
1054 1055
1055 } // namespace autofill 1056 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/browser/autofill_metrics.cc ('k') | components/autofill/core/browser/autofill_regex_constants.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698