OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/autofill/autofill_dialog_common.h" | 5 #include "chrome/browser/ui/autofill/autofill_dialog_common.h" |
6 | 6 |
| 7 #include "chrome/browser/browser_process.h" |
| 8 #include "components/autofill/core/browser/autofill_country.h" |
7 #include "components/autofill/core/browser/autofill_field.h" | 9 #include "components/autofill/core/browser/autofill_field.h" |
8 #include "components/autofill/core/browser/autofill_type.h" | 10 #include "components/autofill/core/browser/autofill_type.h" |
9 #include "grit/chromium_strings.h" | 11 #include "grit/chromium_strings.h" |
10 #include "grit/component_strings.h" | 12 #include "grit/component_strings.h" |
11 #include "grit/generated_resources.h" | 13 #include "grit/generated_resources.h" |
12 #include "grit/theme_resources.h" | 14 #include "grit/theme_resources.h" |
13 #include "grit/webkit_resources.h" | 15 #include "grit/webkit_resources.h" |
14 | 16 |
15 namespace autofill { | 17 namespace autofill { |
16 namespace common { | 18 namespace common { |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 return AutofillMetrics::DIALOG_UI_SHIPPING_SELECTED_SUGGESTION_CHANGED; | 171 return AutofillMetrics::DIALOG_UI_SHIPPING_SELECTED_SUGGESTION_CHANGED; |
170 | 172 |
171 case SECTION_CC: | 173 case SECTION_CC: |
172 return AutofillMetrics::DIALOG_UI_CC_SELECTED_SUGGESTION_CHANGED; | 174 return AutofillMetrics::DIALOG_UI_CC_SELECTED_SUGGESTION_CHANGED; |
173 } | 175 } |
174 | 176 |
175 NOTREACHED(); | 177 NOTREACHED(); |
176 return AutofillMetrics::NUM_DIALOG_UI_EVENTS; | 178 return AutofillMetrics::NUM_DIALOG_UI_EVENTS; |
177 } | 179 } |
178 | 180 |
| 181 string16 GetHardcodedValueForType(ServerFieldType type) { |
| 182 if (AutofillType(type).GetStorableType() == ADDRESS_HOME_COUNTRY) { |
| 183 AutofillCountry country("US", g_browser_process->GetApplicationLocale()); |
| 184 return country.name(); |
| 185 } |
| 186 |
| 187 return string16(); |
| 188 } |
| 189 |
179 } // namespace common | 190 } // namespace common |
180 } // namespace autofill | 191 } // namespace autofill |
OLD | NEW |