OLD | NEW |
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 "ui/base/l10n/l10n_util.h" | 5 #include "ui/base/l10n/l10n_util.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cstdlib> | 8 #include <cstdlib> |
9 #include <iterator> | 9 #include <iterator> |
10 #include <string> | 10 #include <string> |
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 utf8_string; | 700 utf8_string; |
701 } else { | 701 } else { |
702 DCHECK_EQ(std::string::npos, pos) << | 702 DCHECK_EQ(std::string::npos, pos) << |
703 " Unexpectedly found a " << placeholder << " placeholder in " << | 703 " Unexpectedly found a " << placeholder << " placeholder in " << |
704 utf8_string; | 704 utf8_string; |
705 } | 705 } |
706 } | 706 } |
707 } | 707 } |
708 #endif | 708 #endif |
709 | 709 |
710 base::string16 formatted = ReplaceStringPlaceholders( | 710 base::string16 formatted = base::ReplaceStringPlaceholders( |
711 format_string, replacements, offsets); | 711 format_string, replacements, offsets); |
712 AdjustParagraphDirectionality(&formatted); | 712 AdjustParagraphDirectionality(&formatted); |
713 | 713 |
714 return formatted; | 714 return formatted; |
715 } | 715 } |
716 | 716 |
717 std::string GetStringFUTF8(int message_id, | 717 std::string GetStringFUTF8(int message_id, |
718 const base::string16& a) { | 718 const base::string16& a) { |
719 return base::UTF16ToUTF8(GetStringFUTF16(message_id, a)); | 719 return base::UTF16ToUTF8(GetStringFUTF16(message_id, a)); |
720 } | 720 } |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
873 | 873 |
874 const char* const* GetAcceptLanguageListForTesting() { | 874 const char* const* GetAcceptLanguageListForTesting() { |
875 return kAcceptLanguageList; | 875 return kAcceptLanguageList; |
876 } | 876 } |
877 | 877 |
878 size_t GetAcceptLanguageListSizeForTesting() { | 878 size_t GetAcceptLanguageListSizeForTesting() { |
879 return arraysize(kAcceptLanguageList); | 879 return arraysize(kAcceptLanguageList); |
880 } | 880 } |
881 | 881 |
882 } // namespace l10n_util | 882 } // namespace l10n_util |
OLD | NEW |