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

Side by Side Diff: components/autofill/core/browser/autofill_manager.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: Patch2 Created 4 years, 10 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_manager.h" 5 #include "components/autofill/core/browser/autofill_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after
1038 const base::Time now = base::Time::Now(); 1038 const base::Time now = base::Time::Now();
1039 const base::TimeDelta fifteen_minutes = base::TimeDelta::FromMinutes(15); 1039 const base::TimeDelta fifteen_minutes = base::TimeDelta::FromMinutes(15);
1040 1040
1041 for (AutofillProfile* profile : personal_data_->GetProfiles()) { 1041 for (AutofillProfile* profile : personal_data_->GetProfiles()) {
1042 if ((now - profile->use_date()) > fifteen_minutes && 1042 if ((now - profile->use_date()) > fifteen_minutes &&
1043 (now - profile->modification_date()) > fifteen_minutes) { 1043 (now - profile->modification_date()) > fifteen_minutes) {
1044 continue; 1044 continue;
1045 } 1045 }
1046 1046
1047 if (profile->GetInfo(AutofillType(NAME_FULL), app_locale_) != 1047 if (profile->GetInfo(AutofillType(NAME_FULL), app_locale_) !=
1048 card.GetInfo(AutofillType(CREDIT_CARD_NAME), app_locale_)) { 1048 card.GetInfo(AutofillType(CREDIT_CARD_NAME_FULL), app_locale_)) {
1049 continue; 1049 continue;
1050 } 1050 }
1051 1051
1052 if (profile->GetRawInfo(ADDRESS_HOME_ZIP).empty()) 1052 if (profile->GetRawInfo(ADDRESS_HOME_ZIP).empty())
1053 continue; 1053 continue;
1054 1054
1055 profiles.push_back(*profile); 1055 profiles.push_back(*profile);
1056 } 1056 }
1057 1057
1058 return profiles; 1058 return profiles;
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
1727 if (i > 0) 1727 if (i > 0)
1728 fputs("Next oldest form:\n", file); 1728 fputs("Next oldest form:\n", file);
1729 } 1729 }
1730 fputs("\n", file); 1730 fputs("\n", file);
1731 1731
1732 fclose(file); 1732 fclose(file);
1733 } 1733 }
1734 #endif // ENABLE_FORM_DEBUG_DUMP 1734 #endif // ENABLE_FORM_DEBUG_DUMP
1735 1735
1736 } // namespace autofill 1736 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698