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

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

Issue 1208133002: [Autofill/Autocomplete Feature] Substring matching instead of prefix matching. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added |match_start| usage. Created 5 years, 5 months 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
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 #include "components/autofill/core/browser/autofill_profile.h" 8 #include "components/autofill/core/browser/autofill_profile.h"
9 #include "components/autofill/core/browser/credit_card.h" 9 #include "components/autofill/core/browser/credit_card.h"
10 10
11 namespace autofill { 11 namespace autofill {
12 12
13 Suggestion::Suggestion() 13 Suggestion::Suggestion()
14 : frontend_id(0) { 14 : frontend_id(0),
15 match_start(0) {
15 } 16 }
16 17
17 Suggestion::Suggestion(const Suggestion& other) 18 Suggestion::Suggestion(const Suggestion& other)
18 : backend_id(other.backend_id), 19 : backend_id(other.backend_id),
19 frontend_id(other.frontend_id), 20 frontend_id(other.frontend_id),
20 value(other.value), 21 value(other.value),
21 label(other.label), 22 label(other.label),
22 icon(other.icon) { 23 icon(other.icon),
24 match_start(other.match_start) {
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), value(v), match_start(0) {
27 value(v) {
28 } 29 }
29 30
30 Suggestion::Suggestion(const std::string& v, 31 Suggestion::Suggestion(const std::string& v,
31 const std::string& l, 32 const std::string& l,
32 const std::string& i, 33 const std::string& i,
33 int fid) 34 int fid)
34 : frontend_id(fid), 35 : frontend_id(fid),
35 value(base::UTF8ToUTF16(v)), 36 value(base::UTF8ToUTF16(v)),
36 label(base::UTF8ToUTF16(l)), 37 label(base::UTF8ToUTF16(l)),
37 icon(base::UTF8ToUTF16(i)) { 38 icon(base::UTF8ToUTF16(i)),
39 match_start(0) {
38 } 40 }
39 41
40 Suggestion::~Suggestion() { 42 Suggestion::~Suggestion() {
41 } 43 }
42 44
43 } // namespace autofill 45 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/browser/suggestion.h ('k') | components/autofill/core/browser/test_autofill_driver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698