Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(548)

Side by Side Diff: ui/base/l10n/l10n_util.cc

Issue 1227413007: Move ReplaceStringPlaceholders to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@join
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « remoting/host/disconnect_window_win.cc ('k') | ui/base/webui/web_ui_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « remoting/host/disconnect_window_win.cc ('k') | ui/base/webui/web_ui_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698