OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #include "components/autofill/core/browser/suggestion.h" |
| 6 |
| 7 #include "base/strings/utf_string_conversions.h" |
| 8 |
| 9 namespace autofill { |
| 10 |
| 11 SuggestionBackendID::SuggestionBackendID() |
| 12 : variant(0) { |
| 13 } |
| 14 |
| 15 SuggestionBackendID::SuggestionBackendID(const std::string& g, size_t v) |
| 16 : guid(g), |
| 17 variant(v) { |
| 18 } |
| 19 |
| 20 SuggestionBackendID::~SuggestionBackendID() { |
| 21 } |
| 22 |
| 23 bool SuggestionBackendID::operator<(const SuggestionBackendID& other) const { |
| 24 if (variant != other.variant) |
| 25 return variant < other.variant; |
| 26 return guid < other.guid; |
| 27 } |
| 28 |
| 29 Suggestion::Suggestion(const base::string16& v) |
| 30 : frontend_id(0), |
| 31 value(v), |
| 32 is_masked(false) { |
| 33 } |
| 34 |
| 35 Suggestion::Suggestion(const std::string& v, |
| 36 const std::string& l, |
| 37 const std::string& i, |
| 38 int fid) |
| 39 : frontend_id(fid), |
| 40 value(base::UTF8ToUTF16(v)), |
| 41 label(base::UTF8ToUTF16(l)), |
| 42 icon(base::UTF8ToUTF16(i)), |
| 43 is_masked(false) { |
| 44 } |
| 45 |
| 46 Suggestion::Suggestion() |
| 47 : frontend_id(0), |
| 48 is_masked(false) { |
| 49 } |
| 50 |
| 51 Suggestion::~Suggestion() { |
| 52 } |
| 53 |
| 54 } // namespace autofill |
OLD | NEW |