| 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/string_split.h" |
| 9 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/browser_process.h" | 11 #include "chrome/browser/browser_process.h" |
| 11 #include "chrome/browser/metrics/user_metrics.h" | 12 #include "chrome/browser/metrics/user_metrics.h" |
| 12 #include "chrome/browser/prefs/pref_service.h" | 13 #include "chrome/browser/prefs/pref_service.h" |
| 13 #include "chrome/browser/profile.h" | 14 #include "chrome/browser/profile.h" |
| 14 #include "grit/generated_resources.h" | 15 #include "grit/generated_resources.h" |
| 15 #include "unicode/uloc.h" | 16 #include "unicode/uloc.h" |
| 16 | 17 |
| 17 /////////////////////////////////////////////////////////////////////////////// | 18 /////////////////////////////////////////////////////////////////////////////// |
| 18 // LanguageList used to enumerate native names corresponding to the | 19 // LanguageList used to enumerate native names corresponding to the |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 if (!profile_) | 172 if (!profile_) |
| 172 local_state = g_browser_process->local_state(); | 173 local_state = g_browser_process->local_state(); |
| 173 else | 174 else |
| 174 local_state = profile_->GetPrefs(); | 175 local_state = profile_->GetPrefs(); |
| 175 | 176 |
| 176 DCHECK(local_state); | 177 DCHECK(local_state); |
| 177 const std::string& current_locale = local_state->GetString(prefs.c_str()); | 178 const std::string& current_locale = local_state->GetString(prefs.c_str()); |
| 178 | 179 |
| 179 return GetIndexFromLocale(current_locale); | 180 return GetIndexFromLocale(current_locale); |
| 180 } | 181 } |
| OLD | NEW |