| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/autofill/autofill_country.h" | 5 #include "chrome/browser/autofill/autofill_country.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 | 415 |
| 416 DISALLOW_COPY_AND_ASSIGN(CountryNames); | 416 DISALLOW_COPY_AND_ASSIGN(CountryNames); |
| 417 }; | 417 }; |
| 418 | 418 |
| 419 // static | 419 // static |
| 420 CountryNames* CountryNames::GetInstance() { | 420 CountryNames* CountryNames::GetInstance() { |
| 421 return Singleton<CountryNames>::get(); | 421 return Singleton<CountryNames>::get(); |
| 422 } | 422 } |
| 423 | 423 |
| 424 const std::string CountryNames::ApplicationLocale() { | 424 const std::string CountryNames::ApplicationLocale() { |
| 425 if (application_locale_.empty()) | 425 if (application_locale_.empty()) { |
| 426 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 426 application_locale_ = g_browser_process->GetApplicationLocale(); | 427 application_locale_ = g_browser_process->GetApplicationLocale(); |
| 428 } |
| 427 | 429 |
| 428 return application_locale_; | 430 return application_locale_; |
| 429 } | 431 } |
| 430 | 432 |
| 431 CountryNames::CountryNames() { | 433 CountryNames::CountryNames() { |
| 432 // Add 2- and 3-letter ISO country codes. | 434 // Add 2- and 3-letter ISO country codes. |
| 433 for (CountryDataMap::Iterator it = CountryDataMap::Begin(); | 435 for (CountryDataMap::Iterator it = CountryDataMap::Begin(); |
| 434 it != CountryDataMap::End(); | 436 it != CountryDataMap::End(); |
| 435 ++it) { | 437 ++it) { |
| 436 const std::string& country_code = it->first; | 438 const std::string& country_code = it->first; |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 | 636 |
| 635 AutofillCountry::AutofillCountry(const std::string& country_code, | 637 AutofillCountry::AutofillCountry(const std::string& country_code, |
| 636 const string16& name, | 638 const string16& name, |
| 637 const string16& postal_code_label, | 639 const string16& postal_code_label, |
| 638 const string16& state_label) | 640 const string16& state_label) |
| 639 : country_code_(country_code), | 641 : country_code_(country_code), |
| 640 name_(name), | 642 name_(name), |
| 641 postal_code_label_(postal_code_label), | 643 postal_code_label_(postal_code_label), |
| 642 state_label_(state_label) { | 644 state_label_(state_label) { |
| 643 } | 645 } |
| OLD | NEW |