ozone: evdev: Sync caps lock LED state to evdev
[chromium-blink-merge.git] / components / autofill / core / browser / suggestion.cc
blobd906207eb9cd47b104e346b5cb69ccdf83e246b2
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"
11 namespace autofill {
13 SuggestionBackendID::SuggestionBackendID()
14 : variant(0) {
17 SuggestionBackendID::SuggestionBackendID(const std::string& g, size_t v)
18 : guid(g),
19 variant(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()
32 : frontend_id(0) {
35 Suggestion::Suggestion(const Suggestion& other)
36 : backend_id(other.backend_id),
37 frontend_id(other.frontend_id),
38 value(other.value),
39 label(other.label),
40 icon(other.icon) {
43 Suggestion::Suggestion(const base::string16& v)
44 : frontend_id(0),
45 value(v) {
48 Suggestion::Suggestion(const std::string& v,
49 const std::string& l,
50 const std::string& i,
51 int fid)
52 : frontend_id(fid),
53 value(base::UTF8ToUTF16(v)),
54 label(base::UTF8ToUTF16(l)),
55 icon(base::UTF8ToUTF16(i)) {
58 Suggestion::~Suggestion() {
61 } // namespace autofill