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

Side by Side Diff: chrome/browser/ui/autofill/autofill_dialog_i18n_input.h

Issue 212873003: Store the language code for the address in autofill profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 6 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_I18N_INPUT_H_ 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_I18N_INPUT_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_I18N_INPUT_H_ 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_I18N_INPUT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 10 matching lines...) Expand all
21 } 21 }
22 22
23 namespace autofill { 23 namespace autofill {
24 24
25 class AutofillProfile; 25 class AutofillProfile;
26 class CreditCard; 26 class CreditCard;
27 27
28 namespace i18ninput { 28 namespace i18ninput {
29 29
30 // Builds internationalized address input fields for |country_code| and adds 30 // Builds internationalized address input fields for |country_code| and adds
31 // them (at most 13) to |inputs|. |address_type| is which kind of address to 31 // them (at most 13) to |inputs|.
32 // build (e.g. billing or shipping). 32 //
33 // Sets the |language_code| to be used for address formatting. The
34 // |language_code| parameter can be NULL.
35 //
36 // The |address_type| parameter is which kind of address to build (e.g. billing
37 // or shipping).
Ilya Sherman 2014/03/29 01:24:42 nit: I'd move this above the description for the |
please use gerrit instead 2014/04/02 21:54:52 Done.
33 void BuildAddressInputs(common::AddressType address_type, 38 void BuildAddressInputs(common::AddressType address_type,
34 const std::string& country_code, 39 const std::string& country_code,
35 DetailInputs* inputs); 40 DetailInputs* inputs,
41 std::string* language_code);
36 42
37 // Returns whether the given card is complete and verified (i.e. was reviewed 43 // Returns whether the given card is complete and verified (i.e. was reviewed
38 // by the user and not just automatically aggregated). 44 // by the user and not just automatically aggregated).
39 bool CardHasCompleteAndVerifiedData(const CreditCard& card); 45 bool CardHasCompleteAndVerifiedData(const CreditCard& card);
40 46
41 // As above, but for the address in |profile|. Region-aware, meaning that the 47 // As above, but for the address in |profile|. Region-aware, meaning that the
42 // exact set of required fields depends on the region. 48 // exact set of required fields depends on the region.
43 bool AddressHasCompleteAndVerifiedData(const AutofillProfile& profile); 49 bool AddressHasCompleteAndVerifiedData(const AutofillProfile& profile);
44 50
45 // Returns the corresponding Autofill server type for |field|. 51 // Returns the corresponding Autofill server type for |field|.
(...skipping 14 matching lines...) Expand all
60 66
61 // Whether or not |country_code| has a fully supported address format. 67 // Whether or not |country_code| has a fully supported address format.
62 // TODO(dbeam): remove this when filling dependent locality is supported. 68 // TODO(dbeam): remove this when filling dependent locality is supported.
63 // http://crbug.com/340929 69 // http://crbug.com/340929
64 bool CountryIsFullySupported(const std::string& country_code); 70 bool CountryIsFullySupported(const std::string& country_code);
65 71
66 } // namespace i18ninput 72 } // namespace i18ninput
67 } // namespace autofill 73 } // namespace autofill
68 74
69 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_I18N_INPUT_H_ 75 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_I18N_INPUT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698