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

Side by Side Diff: chrome/browser/character_encoding.h

Issue 126223: Replace std:;wstring with std::string in locale-name related APIs.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/character_encoding.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) 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 #ifndef CHROME_BROWSER_CHARACTER_ENCODING_H__ 5 #ifndef CHROME_BROWSER_CHARACTER_ENCODING_H__
6 #define CHROME_BROWSER_CHARACTER_ENCODING_H__ 6 #define CHROME_BROWSER_CHARACTER_ENCODING_H__
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // come next. Finally, the rest of encodings are listed. 72 // come next. Finally, the rest of encodings are listed.
73 // The vector will be created and destroyed by CharacterEncoding. 73 // The vector will be created and destroyed by CharacterEncoding.
74 // The returned std::vector is maintained by this class. The parameter 74 // The returned std::vector is maintained by this class. The parameter
75 // |locale| points to the current application (UI) locale. The parameter 75 // |locale| points to the current application (UI) locale. The parameter
76 // |locale_encodings| is string of static encodings list which is from the 76 // |locale_encodings| is string of static encodings list which is from the
77 // corresponding string resource that is stored in the resource bundle. 77 // corresponding string resource that is stored in the resource bundle.
78 // The parameter |recently_select_encodings| is string of encoding list which 78 // The parameter |recently_select_encodings| is string of encoding list which
79 // is from user recently selected. THIS FUNCTION IS NOT THREADSAFE. You must 79 // is from user recently selected. THIS FUNCTION IS NOT THREADSAFE. You must
80 // run this function only in UI thread. 80 // run this function only in UI thread.
81 static const std::vector<EncodingInfo>* GetCurrentDisplayEncodings( 81 static const std::vector<EncodingInfo>* GetCurrentDisplayEncodings(
82 const std::wstring& locale, 82 const std::string& locale,
83 const std::wstring& locale_encodings, 83 const std::wstring& locale_encodings,
84 const std::wstring& recently_select_encodings); 84 const std::wstring& recently_select_encodings);
85 85
86 // This function is for updating |original_selected_encoding_list| with a 86 // This function is for updating |original_selected_encoding_list| with a
87 // |new_selected_encoding_id|. If the encoding is already in the original 87 // |new_selected_encoding_id|. If the encoding is already in the original
88 // list, then returns false. Otherwise |selected_encoding_list| will return a 88 // list, then returns false. Otherwise |selected_encoding_list| will return a
89 // new string for user selected encoding short list and function returns true. 89 // new string for user selected encoding short list and function returns true.
90 static bool UpdateRecentlySelectdEncoding( 90 static bool UpdateRecentlySelectdEncoding(
91 const std::wstring& original_selected_encodings, 91 const std::wstring& original_selected_encodings,
92 int new_selected_encoding_id, 92 int new_selected_encoding_id,
93 std::wstring* selected_encodings); 93 std::wstring* selected_encodings);
94 94
95 // Get encoding command id according to input encoding name. If the name is 95 // Get encoding command id according to input encoding name. If the name is
96 // valid, return corresponding encoding command id. Otherwise return 0; 96 // valid, return corresponding encoding command id. Otherwise return 0;
97 static int GetCommandIdByCanonicalEncodingName( 97 static int GetCommandIdByCanonicalEncodingName(
98 const std::wstring& encoding_name); 98 const std::wstring& encoding_name);
99 99
100 private: 100 private:
101 // Disallow instantiating it since this class only contains static methods. 101 // Disallow instantiating it since this class only contains static methods.
102 DISALLOW_IMPLICIT_CONSTRUCTORS(CharacterEncoding); 102 DISALLOW_IMPLICIT_CONSTRUCTORS(CharacterEncoding);
103 }; 103 };
104 104
105 #endif // CHROME_BROWSER_CHARACTER_ENCODING_H__ 105 #endif // CHROME_BROWSER_CHARACTER_ENCODING_H__
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/character_encoding.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698