OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_COUNTRY_H_ | |
6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_COUNTRY_H_ | |
7 #pragma once | |
8 | |
9 #include <string> | |
10 #include <vector> | |
11 | |
12 #include "base/string16.h" | |
13 | |
14 class AutoFillCountry { | |
James Hawkins
2011/02/12 20:32:45
Document the class.
Ilya Sherman
2011/02/16 10:27:18
Done.
| |
15 public: | |
16 // Returns country data corresponding to the two-letter ISO code | |
17 // |country_code|. | |
18 static AutoFillCountry CountryForCountryCode(const std::string& country_code); | |
19 | |
20 // Tries to return the country data most appropriate for the given |locale|. | |
James Hawkins
2011/02/12 20:32:45
Ambiguities like 'tries' are best removed. The met
Ilya Sherman
2011/02/16 10:27:18
Done.
| |
21 static AutoFillCountry CountryForLocale(const std::string& locale); | |
22 | |
23 // Fills |countries| with a list of the available countries. | |
24 static void GetAvailableCountries(std::vector<AutoFillCountry>* countries); | |
25 | |
26 std::string country_code() const { return country_code_; } | |
27 string16 name() const { return name_; } | |
28 string16 postal_code_label() const { return postal_code_label_; } | |
29 string16 state_label() const { return state_label_; } | |
30 | |
31 private: | |
32 AutoFillCountry(const std::string& country_code, | |
33 const string16& name_, | |
34 const string16& postal_code_label_, | |
35 const string16& state_label_); | |
36 | |
37 std::string country_code_; | |
James Hawkins
2011/02/12 20:32:45
It's up to you, but I think these members could us
Ilya Sherman
2011/02/16 10:27:18
Done.
| |
38 string16 name_; | |
39 string16 postal_code_label_; | |
40 string16 state_label_; | |
41 }; | |
42 | |
43 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_COUNTRY_H_ | |
OLD | NEW |