| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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/suggestion.h" | 5 #include "components/autofill/core/browser/suggestion.h" |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 | 8 |
| 9 namespace autofill { | 9 namespace autofill { |
| 10 | 10 |
| 11 Suggestion::Suggestion() | 11 Suggestion::Suggestion() |
| 12 : frontend_id(0), | 12 : frontend_id(0), |
| 13 match(PREFIX_MATCH) { | 13 match(PREFIX_MATCH), |
| 14 is_value_bold(false) { |
| 14 } | 15 } |
| 15 | 16 |
| 16 Suggestion::Suggestion(const Suggestion& other) | 17 Suggestion::Suggestion(const Suggestion& other) |
| 17 : backend_id(other.backend_id), | 18 : backend_id(other.backend_id), |
| 18 frontend_id(other.frontend_id), | 19 frontend_id(other.frontend_id), |
| 19 value(other.value), | 20 value(other.value), |
| 20 label(other.label), | 21 label(other.label), |
| 21 icon(other.icon), | 22 icon(other.icon), |
| 22 match(other.match) { | 23 match(other.match), |
| 24 is_value_bold(other.is_value_bold) { |
| 23 } | 25 } |
| 24 | 26 |
| 25 Suggestion::Suggestion(const base::string16& v) | 27 Suggestion::Suggestion(const base::string16& v) |
| 26 : frontend_id(0), | 28 : frontend_id(0), |
| 27 value(v), | 29 value(v), |
| 28 match(PREFIX_MATCH) { | 30 match(PREFIX_MATCH), |
| 31 is_value_bold(false) { |
| 29 } | 32 } |
| 30 | 33 |
| 31 Suggestion::Suggestion(const std::string& v, | 34 Suggestion::Suggestion(const std::string& v, |
| 32 const std::string& l, | 35 const std::string& l, |
| 33 const std::string& i, | 36 const std::string& i, |
| 34 int fid) | 37 int fid) |
| 35 : frontend_id(fid), | 38 : frontend_id(fid), |
| 36 value(base::UTF8ToUTF16(v)), | 39 value(base::UTF8ToUTF16(v)), |
| 37 label(base::UTF8ToUTF16(l)), | 40 label(base::UTF8ToUTF16(l)), |
| 38 icon(base::UTF8ToUTF16(i)), | 41 icon(base::UTF8ToUTF16(i)), |
| 39 match(PREFIX_MATCH) { | 42 match(PREFIX_MATCH), |
| 43 is_value_bold(false) { |
| 40 } | 44 } |
| 41 | 45 |
| 42 Suggestion::~Suggestion() { | 46 Suggestion::~Suggestion() { |
| 43 } | 47 } |
| 44 | 48 |
| 45 } // namespace autofill | 49 } // namespace autofill |
| OLD | NEW |