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

Unified Diff: base/string_util.cc

Issue 113996: Move a few functions commonly called with char* to StringPiece. (Closed)
Patch Set: Created 11 years, 7 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 side-by-side diff with in-line comments
Download patch
« base/file_path.h ('K') | « base/string_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/string_util.cc
diff --git a/base/string_util.cc b/base/string_util.cc
index c6669600562cfad33b48fbec5d1c41f1c39b0dcf..1cdbd7b7507a86dc5e26f8848bffcfe04537cd56 100644
--- a/base/string_util.cc
+++ b/base/string_util.cc
@@ -466,7 +466,7 @@ std::string WideToASCII(const std::wstring& wide) {
return std::string(wide.begin(), wide.end());
}
-std::wstring ASCIIToWide(const std::string& ascii) {
+std::wstring ASCIIToWide(const StringPiece& ascii) {
DCHECK(IsStringASCII(ascii));
return std::wstring(ascii.begin(), ascii.end());
}
@@ -476,7 +476,7 @@ std::string UTF16ToASCII(const string16& utf16) {
return std::string(utf16.begin(), utf16.end());
}
-string16 ASCIIToUTF16(const std::string& ascii) {
+string16 ASCIIToUTF16(const StringPiece& ascii) {
DCHECK(IsStringASCII(ascii));
return string16(ascii.begin(), ascii.end());
}
@@ -523,7 +523,7 @@ bool IsStringASCII(const string16& str) {
}
#endif
-bool IsStringASCII(const std::string& str) {
+bool IsStringASCII(const StringPiece& str) {
return DoIsStringASCII(str);
}
« base/file_path.h ('K') | « base/string_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698