OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/extensions/api/autofill_private/autofill_util.h" | 5 #include "chrome/browser/extensions/api/autofill_private/autofill_util.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
12 #include "base/strings/string_split.h" | 12 #include "base/strings/string_split.h" |
13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
14 #include "chrome/browser/browser_process.h" | 14 #include "chrome/browser/browser_process.h" |
15 #include "chrome/browser/extensions/api/settings_private/prefs_util.h" | 15 #include "chrome/browser/extensions/api/settings_private/prefs_util.h" |
16 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
17 #include "chrome/browser/ui/autofill/country_combobox_model.h" | 17 #include "chrome/browser/ui/autofill/country_combobox_model.h" |
18 #include "chrome/common/extensions/api/autofill_private.h" | 18 #include "chrome/common/extensions/api/autofill_private.h" |
19 #include "chrome/common/pref_names.h" | 19 #include "chrome/common/pref_names.h" |
20 #include "components/autofill/core/browser/autofill_country.h" | 20 #include "components/autofill/core/browser/autofill_country.h" |
21 #include "components/autofill/core/browser/autofill_profile.h" | 21 #include "components/autofill/core/browser/autofill_profile.h" |
22 #include "components/autofill/core/browser/autofill_type.h" | 22 #include "components/autofill/core/browser/autofill_type.h" |
23 #include "components/autofill/core/browser/credit_card.h" | 23 #include "components/autofill/core/browser/credit_card.h" |
24 #include "components/autofill/core/browser/field_types.h" | 24 #include "components/autofill/core/browser/field_types.h" |
25 #include "components/prefs/pref_service.h" | 25 #include "components/prefs/pref_service.h" |
26 #include "grit/components_strings.h" | 26 #include "components/strings/grit/components_strings.h" |
27 #include "ui/base/l10n/l10n_util.h" | 27 #include "ui/base/l10n/l10n_util.h" |
28 | 28 |
29 namespace autofill_private = extensions::api::autofill_private; | 29 namespace autofill_private = extensions::api::autofill_private; |
30 | 30 |
31 namespace { | 31 namespace { |
32 | 32 |
33 // Get the multi-valued element for |type| and return it as a |vector|. | 33 // Get the multi-valued element for |type| and return it as a |vector|. |
34 // TODO(khorimoto): remove this function since multi-valued types are | 34 // TODO(khorimoto): remove this function since multi-valued types are |
35 // deprecated. | 35 // deprecated. |
36 std::unique_ptr<std::vector<std::string>> GetValueList( | 36 std::unique_ptr<std::vector<std::string>> GetValueList( |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 CreditCardEntryList list; | 209 CreditCardEntryList list; |
210 for (const autofill::CreditCard* card : cards) | 210 for (const autofill::CreditCard* card : cards) |
211 list.push_back(CreditCardToCreditCardEntry(*card)); | 211 list.push_back(CreditCardToCreditCardEntry(*card)); |
212 | 212 |
213 return list; | 213 return list; |
214 } | 214 } |
215 | 215 |
216 } // namespace autofill_util | 216 } // namespace autofill_util |
217 | 217 |
218 } // namespace extensions | 218 } // namespace extensions |
OLD | NEW |