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

Side by Side Diff: chrome/browser/autofill/autofill_country.h

Issue 6676031: Autofill database migration to clean up bogus profiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 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 (c) 2011 The Chromium Authors. All rights reserved. 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 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_AUTOFILL_AUTOFILL_COUNTRY_H_ 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_COUNTRY_H_
6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_COUNTRY_H_ 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_COUNTRY_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 19 matching lines...) Expand all
30 static const std::string CountryCodeForLocale(const std::string& locale); 30 static const std::string CountryCodeForLocale(const std::string& locale);
31 31
32 // Returns the country code corresponding to |country|, which should be a 32 // Returns the country code corresponding to |country|, which should be a
33 // country code or country name localized to |locale|. 33 // country code or country name localized to |locale|.
34 static const std::string GetCountryCode(const string16& country, 34 static const std::string GetCountryCode(const string16& country,
35 const std::string& locale); 35 const std::string& locale);
36 36
37 // Returns the application locale. 37 // Returns the application locale.
38 static const std::string ApplicationLocale(); 38 static const std::string ApplicationLocale();
39 39
40 // Returns true if |value| is a valid country.
41 static bool IsValidCountry(const string16& value);
Ilya Sherman 2011/03/16 04:58:57 I would prefer not to add this method, as the impl
dhollowa 2011/03/16 16:13:35 Done.
42
40 const std::string country_code() const { return country_code_; } 43 const std::string country_code() const { return country_code_; }
41 const string16 name() const { return name_; } 44 const string16 name() const { return name_; }
42 const string16 postal_code_label() const { return postal_code_label_; } 45 const string16 postal_code_label() const { return postal_code_label_; }
43 const string16 state_label() const { return state_label_; } 46 const string16 state_label() const { return state_label_; }
44 47
45 private: 48 private:
46 AutofillCountry(const std::string& country_code, 49 AutofillCountry(const std::string& country_code,
47 const string16& name, 50 const string16& name,
48 const string16& postal_code_label, 51 const string16& postal_code_label,
49 const string16& state_label); 52 const string16& state_label);
50 53
51 // The two-letter ISO-3166 country code. 54 // The two-letter ISO-3166 country code.
52 std::string country_code_; 55 std::string country_code_;
53 56
54 // The country's name, localized to the app locale. 57 // The country's name, localized to the app locale.
55 string16 name_; 58 string16 name_;
56 59
57 // The localized label for the postal code (or zip code) field. 60 // The localized label for the postal code (or zip code) field.
58 string16 postal_code_label_; 61 string16 postal_code_label_;
59 62
60 // The localized label for the state (or province, district, etc.) field. 63 // The localized label for the state (or province, district, etc.) field.
61 string16 state_label_; 64 string16 state_label_;
62 65
63 DISALLOW_COPY_AND_ASSIGN(AutofillCountry); 66 DISALLOW_COPY_AND_ASSIGN(AutofillCountry);
64 }; 67 };
65 68
66 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_COUNTRY_H_ 69 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_COUNTRY_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autofill/autofill_country.cc » ('j') | chrome/browser/autofill/autofill_country.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698