| 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 "app/l10n_util.h" | 5 #include "app/l10n_util.h" |
| 6 | 6 |
| 7 #if defined(TOOLKIT_USES_GTK) | 7 #if defined(TOOLKIT_USES_GTK) |
| 8 #include <glib/gutils.h> | 8 #include <glib/gutils.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 772 #if CRBUG_9911_OBSOLETE_GOING_AWAY | 772 #if CRBUG_9911_OBSOLETE_GOING_AWAY |
| 773 std::wstring GetStringF(int message_id, int a) { | 773 std::wstring GetStringF(int message_id, int a) { |
| 774 return GetStringF(message_id, UTF8ToWide(base::IntToString(a))); | 774 return GetStringF(message_id, UTF8ToWide(base::IntToString(a))); |
| 775 } | 775 } |
| 776 | 776 |
| 777 std::wstring GetStringF(int message_id, int64 a) { | 777 std::wstring GetStringF(int message_id, int64 a) { |
| 778 return GetStringF(message_id, UTF8ToWide(base::Int64ToString(a))); | 778 return GetStringF(message_id, UTF8ToWide(base::Int64ToString(a))); |
| 779 } | 779 } |
| 780 #endif | 780 #endif |
| 781 | 781 |
| 782 string16 GetStringFUTF16(int message_id, int a) { | 782 string16 GetStringFUTF16Int(int message_id, int a) { |
| 783 return GetStringFUTF16(message_id, UTF8ToUTF16(base::IntToString(a))); | 783 return GetStringFUTF16(message_id, UTF8ToUTF16(base::IntToString(a))); |
| 784 } | 784 } |
| 785 | 785 |
| 786 string16 GetStringFUTF16(int message_id, int64 a) { | 786 string16 GetStringFUTF16Int(int message_id, int64 a) { |
| 787 return GetStringFUTF16(message_id, UTF8ToUTF16(base::Int64ToString(a))); | 787 return GetStringFUTF16(message_id, UTF8ToUTF16(base::Int64ToString(a))); |
| 788 } | 788 } |
| 789 | 789 |
| 790 string16 TruncateString(const string16& string, size_t length) { | 790 string16 TruncateString(const string16& string, size_t length) { |
| 791 if (string.size() <= length) | 791 if (string.size() <= length) |
| 792 // String fits, return it. | 792 // String fits, return it. |
| 793 return string; | 793 return string; |
| 794 | 794 |
| 795 if (length == 0) { | 795 if (length == 0) { |
| 796 // No room for the elide string, return an empty string. | 796 // No room for the elide string, return an empty string. |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 958 for (size_t i = 0; i < arraysize(kAcceptLanguageList); ++i) { | 958 for (size_t i = 0; i < arraysize(kAcceptLanguageList); ++i) { |
| 959 if (!IsLocaleNameTranslated(kAcceptLanguageList[i], display_locale)) | 959 if (!IsLocaleNameTranslated(kAcceptLanguageList[i], display_locale)) |
| 960 // TODO(jungshik) : Put them at the of the list with language codes | 960 // TODO(jungshik) : Put them at the of the list with language codes |
| 961 // enclosed by brackets instead of skipping. | 961 // enclosed by brackets instead of skipping. |
| 962 continue; | 962 continue; |
| 963 locale_codes->push_back(kAcceptLanguageList[i]); | 963 locale_codes->push_back(kAcceptLanguageList[i]); |
| 964 } | 964 } |
| 965 } | 965 } |
| 966 | 966 |
| 967 } // namespace l10n_util | 967 } // namespace l10n_util |
| OLD | NEW |