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

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

Issue 10828154: Remove autofill's dependency on BrowserProcess. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to latest parent. Created 8 years, 4 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/DEPS ('k') | no next file » | 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>
11 11
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/singleton.h" 14 #include "base/memory/singleton.h"
15 #include "base/stl_util.h" 15 #include "base/stl_util.h"
16 #include "base/string_util.h" 16 #include "base/string_util.h"
17 #include "base/utf_string_conversions.h" 17 #include "base/utf_string_conversions.h"
18 #include "chrome/browser/browser_process.h" 18 #include "content/public/browser/content_browser_client.h"
19 #include "content/public/browser/browser_thread.h" 19 #include "content/public/browser/browser_thread.h"
20 #include "grit/generated_resources.h" 20 #include "grit/generated_resources.h"
21 #include "ui/base/l10n/l10n_util.h" 21 #include "ui/base/l10n/l10n_util.h"
22 #include "unicode/coll.h" 22 #include "unicode/coll.h"
23 #include "unicode/locid.h" 23 #include "unicode/locid.h"
24 #include "unicode/ucol.h" 24 #include "unicode/ucol.h"
25 #include "unicode/uloc.h" 25 #include "unicode/uloc.h"
26 #include "unicode/unistr.h" 26 #include "unicode/unistr.h"
27 #include "unicode/urename.h" 27 #include "unicode/urename.h"
28 #include "unicode/utypes.h" 28 #include "unicode/utypes.h"
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
427 application_locale_ = g_browser_process->GetApplicationLocale(); 427 application_locale_ =
428 content::GetContentClient()->browser()->GetApplicationLocale();
428 } 429 }
429 430
430 return application_locale_; 431 return application_locale_;
431 } 432 }
432 433
433 CountryNames::CountryNames() { 434 CountryNames::CountryNames() {
434 // Add 2- and 3-letter ISO country codes. 435 // Add 2- and 3-letter ISO country codes.
435 for (CountryDataMap::Iterator it = CountryDataMap::Begin(); 436 for (CountryDataMap::Iterator it = CountryDataMap::Begin();
436 it != CountryDataMap::End(); 437 it != CountryDataMap::End();
437 ++it) { 438 ++it) {
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 637
637 AutofillCountry::AutofillCountry(const std::string& country_code, 638 AutofillCountry::AutofillCountry(const std::string& country_code,
638 const string16& name, 639 const string16& name,
639 const string16& postal_code_label, 640 const string16& postal_code_label,
640 const string16& state_label) 641 const string16& state_label)
641 : country_code_(country_code), 642 : country_code_(country_code),
642 name_(name), 643 name_(name),
643 postal_code_label_(postal_code_label), 644 postal_code_label_(postal_code_label),
644 state_label_(state_label) { 645 state_label_(state_label) {
645 } 646 }
OLDNEW
« no previous file with comments | « chrome/browser/autofill/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698