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

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

Issue 2775553004: [WebPayments] Implementing Profile filter and dedupe (Closed)
Patch Set: rebasing Created 3 years, 8 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
« no previous file with comments | « components/autofill/core/browser/form_group.h ('k') | components/payments/README » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_profile.h" 7 #include "components/autofill/core/browser/autofill_profile.h"
8 #include "components/autofill/core/browser/autofill_profile_comparator.h" 8 #include "components/autofill/core/browser/autofill_profile_comparator.h"
9 #include "components/autofill/core/browser/autofill_type.h" 9 #include "components/autofill/core/browser/autofill_type.h"
10 #include "components/autofill/core/common/autofill_l10n_util.h" 10 #include "components/autofill/core/common/autofill_l10n_util.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 return GetRawInfo(type.GetStorableType()); 50 return GetRawInfo(type.GetStorableType());
51 } 51 }
52 52
53 bool FormGroup::SetInfo(const AutofillType& type, 53 bool FormGroup::SetInfo(const AutofillType& type,
54 const base::string16& value, 54 const base::string16& value,
55 const std::string& app_locale) { 55 const std::string& app_locale) {
56 SetRawInfo(type.GetStorableType(), value); 56 SetRawInfo(type.GetStorableType(), value);
57 return true; 57 return true;
58 } 58 }
59 59
60 bool FormGroup::HasInfo(ServerFieldType type) const {
61 return HasInfo(AutofillType(type));
62 }
63
64 bool FormGroup::HasInfo(const AutofillType& type) const {
65 // Use "en-US" as a placeholder locale. We are only interested in emptiness,
66 // not in the presentation of the string.
67 return !GetInfo(type, "en-US").empty();
68 }
69
60 } // namespace autofill 70 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/browser/form_group.h ('k') | components/payments/README » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698