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

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

Issue 772253003: Create an autofill Suggestion class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 6 years 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
OLDNEW
(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
OLDNEW
« no previous file with comments | « components/autofill/core/browser/suggestion.h ('k') | components/autofill/core/browser/suggestion_test_helpers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698