1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "components/autofill/core/browser/suggestion.h"
7 #include "base/strings/utf_string_conversions.h"
8 #include "components/autofill/core/browser/autofill_profile.h"
9 #include "components/autofill/core/browser/credit_card.h"
13 SuggestionBackendID::SuggestionBackendID()
17 SuggestionBackendID::SuggestionBackendID(const std::string
& g
, size_t v
)
22 SuggestionBackendID::~SuggestionBackendID() {
25 bool SuggestionBackendID::operator<(const SuggestionBackendID
& other
) const {
26 if (variant
!= other
.variant
)
27 return variant
< other
.variant
;
28 return guid
< other
.guid
;
31 Suggestion::Suggestion()
35 Suggestion::Suggestion(const Suggestion
& other
)
36 : backend_id(other
.backend_id
),
37 frontend_id(other
.frontend_id
),
43 Suggestion::Suggestion(const base::string16
& v
)
48 Suggestion::Suggestion(const std::string
& v
,
53 value(base::UTF8ToUTF16(v
)),
54 label(base::UTF8ToUTF16(l
)),
55 icon(base::UTF8ToUTF16(i
)) {
58 Suggestion::~Suggestion() {
61 } // namespace autofill