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

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

Issue 10545169: Move thread checking from autofill_country.cc to browser_process_impl.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove code about thread in address_unittest.cc which is no longer needed Created 8 years, 6 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
« no previous file with comments | « chrome/browser/autofill/address_unittest.cc ('k') | chrome/browser/browser_process_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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));
427 application_locale_ = g_browser_process->GetApplicationLocale(); 426 application_locale_ = g_browser_process->GetApplicationLocale();
428 }
429 427
430 return application_locale_; 428 return application_locale_;
431 } 429 }
432 430
433 CountryNames::CountryNames() { 431 CountryNames::CountryNames() {
434 // Add 2- and 3-letter ISO country codes. 432 // Add 2- and 3-letter ISO country codes.
435 for (CountryDataMap::Iterator it = CountryDataMap::Begin(); 433 for (CountryDataMap::Iterator it = CountryDataMap::Begin();
436 it != CountryDataMap::End(); 434 it != CountryDataMap::End();
437 ++it) { 435 ++it) {
438 const std::string& country_code = it->first; 436 const std::string& country_code = it->first;
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 634
637 AutofillCountry::AutofillCountry(const std::string& country_code, 635 AutofillCountry::AutofillCountry(const std::string& country_code,
638 const string16& name, 636 const string16& name,
639 const string16& postal_code_label, 637 const string16& postal_code_label,
640 const string16& state_label) 638 const string16& state_label)
641 : country_code_(country_code), 639 : country_code_(country_code),
642 name_(name), 640 name_(name),
643 postal_code_label_(postal_code_label), 641 postal_code_label_(postal_code_label),
644 state_label_(state_label) { 642 state_label_(state_label) {
645 } 643 }
OLDNEW
« no previous file with comments | « chrome/browser/autofill/address_unittest.cc ('k') | chrome/browser/browser_process_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698