OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/webui/options/autofill_options_handler.h" | 5 #include "chrome/browser/ui/webui/options/autofill_options_handler.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 break; | 121 break; |
122 case i18n::addressinput::SORTING_CODE: | 122 case i18n::addressinput::SORTING_CODE: |
123 component->SetString(kField, kSortingCodeField); | 123 component->SetString(kField, kSortingCodeField); |
124 break; | 124 break; |
125 case i18n::addressinput::POSTAL_CODE: | 125 case i18n::addressinput::POSTAL_CODE: |
126 component->SetString(kField, kPostalCodeField); | 126 component->SetString(kField, kPostalCodeField); |
127 break; | 127 break; |
128 case i18n::addressinput::STREET_ADDRESS: | 128 case i18n::addressinput::STREET_ADDRESS: |
129 component->SetString(kField, kAddressLineField); | 129 component->SetString(kField, kAddressLineField); |
130 break; | 130 break; |
| 131 case i18n::addressinput::ORGANIZATION: |
| 132 component->SetString(kField, kCompanyNameField); |
| 133 break; |
131 case i18n::addressinput::RECIPIENT: | 134 case i18n::addressinput::RECIPIENT: |
132 component->SetString(kField, kFullNameField); | 135 component->SetString(kField, kFullNameField); |
133 component->SetString( | 136 component->SetString( |
134 "placeholder", | 137 "placeholder", |
135 l10n_util::GetStringUTF16(IDS_AUTOFILL_FIELD_LABEL_ADD_NAME)); | 138 l10n_util::GetStringUTF16(IDS_AUTOFILL_FIELD_LABEL_ADD_NAME)); |
136 break; | 139 break; |
137 } | 140 } |
138 | 141 |
139 switch (components[i].length_hint) { | 142 switch (components[i].length_hint) { |
140 case AddressUiComponent::HINT_LONG: | 143 case AddressUiComponent::HINT_LONG: |
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
711 scoped_ptr<base::ListValue> components(new base::ListValue); | 714 scoped_ptr<base::ListValue> components(new base::ListValue); |
712 GetAddressComponents( | 715 GetAddressComponents( |
713 base::UTF16ToUTF8(profile.GetRawInfo(autofill::ADDRESS_HOME_COUNTRY)), | 716 base::UTF16ToUTF8(profile.GetRawInfo(autofill::ADDRESS_HOME_COUNTRY)), |
714 profile.language_code(), | 717 profile.language_code(), |
715 components.get(), | 718 components.get(), |
716 NULL); | 719 NULL); |
717 address->Set(kComponents, components.release()); | 720 address->Set(kComponents, components.release()); |
718 } | 721 } |
719 | 722 |
720 } // namespace options | 723 } // namespace options |
OLD | NEW |