| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/views/options/language_combobox_model.h" | 5 #include "chrome/browser/views/options/language_combobox_model.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" |
| 7 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 8 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 9 #include "chrome/browser/metrics/user_metrics.h" | 10 #include "chrome/browser/metrics/user_metrics.h" |
| 10 #include "chrome/common/l10n_util.h" | |
| 11 #include "chrome/common/pref_service.h" | 11 #include "chrome/common/pref_service.h" |
| 12 #include "grit/generated_resources.h" | 12 #include "grit/generated_resources.h" |
| 13 #include "unicode/uloc.h" | 13 #include "unicode/uloc.h" |
| 14 | 14 |
| 15 /////////////////////////////////////////////////////////////////////////////// | 15 /////////////////////////////////////////////////////////////////////////////// |
| 16 // LanguageComboboxModel used to populate a combobox with native names | 16 // LanguageComboboxModel used to populate a combobox with native names |
| 17 // corresponding to the language code (e.g. English (United States) for en-US) | 17 // corresponding to the language code (e.g. English (United States) for en-US) |
| 18 // | 18 // |
| 19 | 19 |
| 20 LanguageComboboxModel::LanguageComboboxModel() | 20 LanguageComboboxModel::LanguageComboboxModel() |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 local_state = g_browser_process->local_state(); | 156 local_state = g_browser_process->local_state(); |
| 157 else | 157 else |
| 158 local_state = profile_->GetPrefs(); | 158 local_state = profile_->GetPrefs(); |
| 159 | 159 |
| 160 DCHECK(local_state); | 160 DCHECK(local_state); |
| 161 const std::string& current_locale = | 161 const std::string& current_locale = |
| 162 WideToASCII(local_state->GetString(prefs.c_str())); | 162 WideToASCII(local_state->GetString(prefs.c_str())); |
| 163 | 163 |
| 164 return GetIndexFromLocale(current_locale); | 164 return GetIndexFromLocale(current_locale); |
| 165 } | 165 } |
| OLD | NEW |