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

Side by Side Diff: chrome/browser/autofill/form_group.cc

Issue 6484022: Autofill i18n: Set postal code and state field labels based on the selected country. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Still needs tests Created 9 years, 10 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 | Annotate | Revision Log
OLDNEW
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 <algorithm> 5 #include <algorithm>
6 6
7 #include "chrome/browser/autofill/form_group.h" 7 #include "chrome/browser/autofill/form_group.h"
8 8
9 #include <iterator> 9 #include <iterator>
10 10
11 string16 FormGroup::GetPreviewText(const AutoFillType& type) const { 11 string16 FormGroup::GetPreviewText(const AutoFillType& type) const {
12 return GetFieldText(type); 12 return GetFieldText(type);
13 } 13 }
14 14
15 const string16 FormGroup::Label() const { return string16(); } 15 string16 FormGroup::Label() const { return string16(); }
16 16
17 bool FormGroup::operator!=(const FormGroup& form_group) const { 17 bool FormGroup::operator!=(const FormGroup& form_group) const {
18 FieldTypeSet a, b, symmetric_difference; 18 FieldTypeSet a, b, symmetric_difference;
19 GetAvailableFieldTypes(&a); 19 GetAvailableFieldTypes(&a);
20 form_group.GetAvailableFieldTypes(&b); 20 form_group.GetAvailableFieldTypes(&b);
21 std::set_symmetric_difference( 21 std::set_symmetric_difference(
22 a.begin(), a.end(), 22 a.begin(), a.end(),
23 b.begin(), b.end(), 23 b.begin(), b.end(),
24 std::inserter(symmetric_difference, symmetric_difference.begin())); 24 std::inserter(symmetric_difference, symmetric_difference.begin()));
25 25
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 void FormGroup::OverwriteWith(const FormGroup& form_group) { 84 void FormGroup::OverwriteWith(const FormGroup& form_group) {
85 FieldTypeSet a;; 85 FieldTypeSet a;;
86 form_group.GetAvailableFieldTypes(&a); 86 form_group.GetAvailableFieldTypes(&a);
87 87
88 for (FieldTypeSet::const_iterator iter = a.begin(); iter != a.end(); ++iter) { 88 for (FieldTypeSet::const_iterator iter = a.begin(); iter != a.end(); ++iter) {
89 AutoFillType type(*iter); 89 AutoFillType type(*iter);
90 SetInfo(type, form_group.GetFieldText(type)); 90 SetInfo(type, form_group.GetFieldText(type));
91 } 91 }
92 } 92 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698