OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/autofill/form_group.h" | 5 #include "chrome/browser/autofill/form_group.h" |
6 | 6 |
| 7 string16 FormGroup::GetPreviewText(const AutoFillType& type) const { |
| 8 return GetFieldText(type); |
| 9 } |
| 10 |
| 11 const string16& FormGroup::Label() const { return EmptyString16(); } |
| 12 |
7 bool FormGroup::operator!=(const FormGroup& form_group) const { | 13 bool FormGroup::operator!=(const FormGroup& form_group) const { |
8 FieldTypeSet a, b, symmetric_difference; | 14 FieldTypeSet a, b, symmetric_difference; |
9 GetAvailableFieldTypes(&a); | 15 GetAvailableFieldTypes(&a); |
10 form_group.GetAvailableFieldTypes(&b); | 16 form_group.GetAvailableFieldTypes(&b); |
11 std::set_symmetric_difference( | 17 std::set_symmetric_difference( |
12 a.begin(), a.end(), | 18 a.begin(), a.end(), |
13 b.begin(), b.end(), | 19 b.begin(), b.end(), |
14 std::inserter(symmetric_difference, symmetric_difference.begin())); | 20 std::inserter(symmetric_difference, symmetric_difference.begin())); |
15 | 21 |
16 if (!symmetric_difference.empty()) | 22 if (!symmetric_difference.empty()) |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 std::set_difference(b.begin(), b.end(), | 69 std::set_difference(b.begin(), b.end(), |
64 a.begin(), a.end(), | 70 a.begin(), a.end(), |
65 std::inserter(intersection, intersection.begin())); | 71 std::inserter(intersection, intersection.begin())); |
66 | 72 |
67 for (FieldTypeSet::const_iterator iter = intersection.begin(); | 73 for (FieldTypeSet::const_iterator iter = intersection.begin(); |
68 iter != intersection.end(); ++iter) { | 74 iter != intersection.end(); ++iter) { |
69 AutoFillType type(*iter); | 75 AutoFillType type(*iter); |
70 SetInfo(type, form_group.GetFieldText(type)); | 76 SetInfo(type, form_group.GetFieldText(type)); |
71 } | 77 } |
72 } | 78 } |
OLD | NEW |