| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/language_combobox_model.h" | 5 #include "chrome/browser/language_combobox_model.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/i18n/rtl.h" | 8 #include "base/i18n/rtl.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| 11 #include "chrome/browser/metrics/user_metrics.h" | 11 #include "chrome/browser/metrics/user_metrics.h" |
| 12 #include "chrome/browser/pref_service.h" | 12 #include "chrome/browser/prefs/pref_service.h" |
| 13 #include "chrome/browser/profile.h" | 13 #include "chrome/browser/profile.h" |
| 14 #include "grit/generated_resources.h" | 14 #include "grit/generated_resources.h" |
| 15 #include "unicode/uloc.h" | 15 #include "unicode/uloc.h" |
| 16 | 16 |
| 17 /////////////////////////////////////////////////////////////////////////////// | 17 /////////////////////////////////////////////////////////////////////////////// |
| 18 // LanguageList used to enumerate native names corresponding to the | 18 // LanguageList used to enumerate native names corresponding to the |
| 19 // language code (e.g. English (United States) for en-US) | 19 // language code (e.g. English (United States) for en-US) |
| 20 // | 20 // |
| 21 | 21 |
| 22 LanguageList::LanguageList() { | 22 LanguageList::LanguageList() { |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 if (!profile_) | 171 if (!profile_) |
| 172 local_state = g_browser_process->local_state(); | 172 local_state = g_browser_process->local_state(); |
| 173 else | 173 else |
| 174 local_state = profile_->GetPrefs(); | 174 local_state = profile_->GetPrefs(); |
| 175 | 175 |
| 176 DCHECK(local_state); | 176 DCHECK(local_state); |
| 177 const std::string& current_locale = local_state->GetString(prefs.c_str()); | 177 const std::string& current_locale = local_state->GetString(prefs.c_str()); |
| 178 | 178 |
| 179 return GetIndexFromLocale(current_locale); | 179 return GetIndexFromLocale(current_locale); |
| 180 } | 180 } |
| OLD | NEW |